Pass snapshot formats as requirejs config rather than globally
[gitphp.git] / templates / jsconst.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{*
 * JSConst
 *
 * Javascript constants template
 *
 * @author Christopher Han <xiphux@gmail.com>
 * @copyright Copyright (c) 2011 Christopher Han
 * @package GitPHP
 * @subpackage Template
 *}
<script type="text/javascript">

var GitPHP = GitPHP || {ldelim}{rdelim};

GitPHP.Resources = {ldelim}
	Loading: "{t escape='js'}Loading…{/t}",
	LoadingBlameData: "{t escape='js'}Loading blame data…{/t}",
	Snapshot: "{t escape='js'}snapshot{/t}",
	NoMatchesFound: '{t escape=no}No matches found for "%1"{/t}'
{rdelim};

GitPHP.Snapshot = {ldelim}
	Formats: {ldelim}{foreach from=$snapshotformats key=format item=extension name=formats}"{$format}": "{$extension}"{if !$smarty.foreach.formats.last},{/if}{/foreach}{rdelim}
{rdelim}

GitPHP.BaseUrl = '{$baseurl}/';
{if $project}
GitPHP.Project = '{$project->GetProject()}';
{/if}
		
</script>

comments