Merge pull request #11 from bessl/patch-2
[gitphp.git] / templates / main.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{*
 * Main
 *
 * Main page template
 *
 * @author Christopher Han <xiphux@gmail.com>
 * @copyright Copyright (c) 2011 Christopher Han
 * @packge GitPHP
 * @subpackage Template
 *}
<!DOCTYPE html>
<html lang="{$currentprimarylocale}">
  <!-- gitphp web interface {$version}, (C) 2006-2011 Christopher Han <xiphux@gmail.com> -->
  <head>
    <title>
    {block name=title}
    {$pagetitle}
    {/block}
    </title>
    {block name=feeds}
    {/block}
    {block name=links}
    {/block}
    {if file_exists('css/gitphp.min.css')}
    <link rel="stylesheet" href="{$baseurl}/css/gitphp.min.css" type="text/css" />
    {else}
    <link rel="stylesheet" href="{$baseurl}/css/gitphp.css" type="text/css" />
    {/if}
    {if file_exists("css/$stylesheet.min.css")}
    <link rel="stylesheet" href="{$baseurl}/css/{$stylesheet}.min.css" type="text/css" />
    {else}
    <link rel="stylesheet" href="{$baseurl}/css/{$stylesheet}.css" type="text/css" />
    {/if}
    <link rel="stylesheet" href="{$baseurl}/css/ext/jquery.qtip.min.css" type="text/css" />
    {block name=css}
    {/block}
    {if $javascript}
    <script type="text/javascript">
    var require = {
    	baseUrl: '{$baseurl}/js',
	paths: {
		jquery: [
			{if $googlejs}
			'//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min',
			{/if}
			'ext/jquery-1.8.2.min'
		],
		d3: 'ext/d3.v2.min',
		qtip: 'ext/jquery.qtip.min',
		modernizr: 'ext/modernizr.custom'
	},
	config: {
		'modules/snapshotformats': {
			formats: {
				{foreach from=$snapshotformats key=format item=extension name=formats}
				"{$format}": "{$extension}"{if !$smarty.foreach.formats.last},{/if}
				{/foreach}
			}
		},
		{if $project}
		'modules/getproject': {
			project: '{$project->GetProject()}'
		},
		{/if}
    {if $debug}
    'common': {
      debug: true
    },
    {/if}
		'modules/geturl': {
			baseurl: '{$baseurl}/'
		},
		'modules/resources': {
			resources: {
				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}',
        UsernameLabel: "{t escape='js'}username:{/t}",
        PasswordLabel: "{t escape='js'}password:{/t}",
        Login: "{t escape='js'}login{/t}",
        AnErrorOccurredWhileLoggingIn: "{t escape='js'}An error occurred while logging in{/t}",
        LoginTitle: "{t escape='js'}Login{/t}",
        UsernameIsRequired: "{t escape='js'}Username is required{/t}",
        PasswordIsRequired: "{t escape='js'}Password is required{/t}"
			}
		}
	}
    };
    {block name=javascript}
      {if file_exists('js/common.min.js')}
      require.paths.common = 'common.min';
      {/if}
      require.deps = ['common'];
    {/block}
    </script>
    <script type="text/javascript" src="{$baseurl}/js/ext/require.js"></script>
    {/if}
  </head>
  <body>
    <div class="page_header">
      {if $loginenabled}
      <div class="login">
      {if $loggedinuser}
        <a href="{geturl action=logout}" />{t 1=$loggedinuser}logout %1{/t}</a>
      {else if $action == 'login'}
        {t}login{/t}
      {else}
        <a href="{geturl action=login}" class="loginLink" />{t}login{/t}</a>
      {/if}
      </div>
      {/if}
      {if $supportedlocales}
      <div class="lang_select">
        <form action="{$requesturl}" method="get" id="frmLangSelect">
         <div>
	{foreach from=$requestvars key=var item=val}
	{if $var != "l"}
	<input type="hidden" name="{$var}" value="{$val|escape}" />
	{/if}
	{/foreach}
	<label for="selLang">{t}language:{/t}</label>
	<select name="l" id="selLang">
	  {foreach from=$supportedlocales key=locale item=language}
	    <option {if $locale == $currentlocale}selected="selected"{/if} value="{$locale}">{if $language}{$language} ({$locale}){else}{$locale}{/if}</option>
	  {/foreach}
	</select>
	<input type="submit" value="{t}set{/t}" id="btnLangSet" />
         </div>
	</form>
      </div>
      {/if}
      {block name=header}
      <a href="{geturl}">{if $homelink}{$homelink}{else}{t}projects{/t}{/if}</a> /
      {/block}
    </div>
{block name=main}

{/block}
    <div class="page_footer">
      {block name=footer}
      {/block}
    </div>
    <div class="attr_footer">
    	<a href="http://www.gitphp.org/" target="_blank">GitPHP by Chris Han</a>
    </div>
  </body>
</html>

comments