##// END OF EJS Templates
update footer instance id and copyrights
marcink -
r3667:16c153cf beta
parent child Browse files
Show More
@@ -1,334 +1,336 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="root.html"/>
3 3
4 4 <!-- HEADER -->
5 5 <div id="header-dd"></div>
6 6 <div id="header">
7 7 <div id="header-inner" class="title">
8 8 <div id="logo">
9 9 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
10 10 </div>
11 11 <!-- MENU -->
12 12 ${self.page_nav()}
13 13 <!-- END MENU -->
14 14 ${self.body()}
15 15 </div>
16 16 </div>
17 17 <!-- END HEADER -->
18 18
19 19 <!-- CONTENT -->
20 20 <div id="content">
21 21 <div class="flash_msg">
22 22 <% messages = h.flash.pop_messages() %>
23 23 % if messages:
24 24 <ul id="flash-messages">
25 25 % for message in messages:
26 26 <li class="${message.category}_msg">${message}</li>
27 27 % endfor
28 28 </ul>
29 29 % endif
30 30 </div>
31 31 <div id="main">
32 32 ${next.main()}
33 33 </div>
34 34 </div>
35 35 <!-- END CONTENT -->
36 36
37 37 <!-- FOOTER -->
38 38 <div id="footer">
39 39 <div id="footer-inner" class="title">
40 40 <div>
41 41 <p class="footer-link">
42 42 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
43 43 </p>
44 44 <p class="footer-link-right">
45 <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
46 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
45 <a href="${h.url('rhodecode_official')}">RhodeCode ${c.rhodecode_version}</a>
46 &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
47 ${'(%s)' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}
47 48 </p>
48 49 </div>
49 50 </div>
50 51 </div>
52
51 53 <!-- END FOOTER -->
52 54
53 55 ### MAKO DEFS ###
54 56 <%def name="breadcrumbs()">
55 57 <div class="breadcrumbs">
56 58 ${self.breadcrumbs_links()}
57 59 </div>
58 60 </%def>
59 61
60 62 <%def name="context_bar(current)">
61 63 ${repo_context_bar(current)}
62 64 </%def>
63 65
64 66 <%def name="admin_menu()">
65 67 <ul class="admin_menu">
66 68 <li>${h.link_to(_('Admin journal'),h.url('admin_home'),class_='journal ')}</li>
67 69 <li>${h.link_to(_('Repositories'),h.url('repos'),class_='repos')}</li>
68 70 <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
69 71 <li>${h.link_to(_('Users'),h.url('users'),class_='users')}</li>
70 72 <li>${h.link_to(_('User groups'),h.url('users_groups'),class_='groups')}</li>
71 73 <li>${h.link_to(_('Permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
72 74 <li>${h.link_to(_('LDAP'),h.url('ldap_home'),class_='ldap')}</li>
73 75 <li>${h.link_to(_('Defaults'),h.url('defaults'),class_='defaults')}</li>
74 76 <li class="last">${h.link_to(_('Settings'),h.url('admin_settings'),class_='settings')}</li>
75 77 </ul>
76 78 </%def>
77 79
78 80 <%def name="admin_menu_simple()">
79 81 <ul>
80 82 <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
81 83 </ul>
82 84 </%def>
83 85
84 86 <%def name="repo_context_bar(current=None)">
85 87 <%
86 88 def follow_class():
87 89 if c.repository_following:
88 90 return h.literal('following')
89 91 else:
90 92 return h.literal('follow')
91 93 %>
92 94 <%
93 95 def is_current(selected):
94 96 if selected == current:
95 97 return h.literal('class="current"')
96 98 %>
97 99
98 100 <!--- CONTEXT BAR -->
99 101 <div id="context-bar" class="box">
100 102 <div id="breadcrumbs">
101 103 ${h.link_to(_(u'Repositories'),h.url('home'))}
102 104 &raquo;
103 105 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
104 106 </div>
105 107 <ul id="context-pages" class="horizontal-list">
106 108 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
107 109 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li>
108 110 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
109 111 <li ${is_current('switch-to')}>
110 112 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
111 113 <ul id="switch_to_list_2" class="switch_to submenu">
112 114 <li><a href="#">${_('loading...')}</a></li>
113 115 </ul>
114 116 </li>
115 117 <li ${is_current('options')}>
116 118 <a href="#" class="dropdown options"></span>${_('Options')}</a>
117 119 <ul>
118 120 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
119 121 <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
120 122 %endif
121 123 %if c.rhodecode_db_repo.fork:
122 124 <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default', merge=1),class_='compare_request')}</li>
123 125 %endif
124 126 <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
125 127 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
126 128
127 129 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
128 130 %if c.rhodecode_db_repo.locked[0]:
129 131 <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
130 132 %else:
131 133 <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
132 134 %endif
133 135 %endif
134 136 ## TODO: this check feels wrong, it would be better to have a check for permissions
135 137 ## also it feels like a job for the controller
136 138 %if c.rhodecode_user.username != 'default':
137 139 <li>
138 140 <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
139 141 <span class="show-follow">${_('Follow')}</span>
140 142 <span class="show-following">${_('Unfollow')}</span>
141 143 </a>
142 144 </li>
143 145 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
144 146 %if h.is_hg(c.rhodecode_repo):
145 147 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
146 148 %endif
147 149 %endif
148 150 </ul>
149 151 </li>
150 152 <li ${is_current('showpullrequest')}>
151 153 <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')}
152 154 %if c.repository_pull_requests:
153 155 <span>${c.repository_pull_requests}</span>
154 156 %endif
155 157 </a>
156 158 </li>
157 159 </ul>
158 160 </div>
159 161 <script type="text/javascript">
160 162 YUE.on('branch_tag_switcher_2','mouseover',function(){
161 163 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
162 164 if(!loaded){
163 165 YUD.addClass('branch_tag_switcher_2','loaded');
164 166 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2',
165 167 function(o){},
166 168 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
167 169 ,null);
168 170 }
169 171 return false;
170 172 });
171 173 </script>
172 174 <!--- END CONTEXT BAR -->
173 175 </%def>
174 176
175 177 <%def name="usermenu()">
176 178 ## USER MENU
177 179 <li>
178 180 <a class="menu_link childs" id="quick_login_link">
179 181 <span class="icon">
180 182 <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
181 183 </span>
182 184 %if c.rhodecode_user.username != 'default':
183 185 <span class="menu_link_user">${c.rhodecode_user.username}</span>
184 186 %if c.unread_notifications != 0:
185 187 <span class="menu_link_notifications">${c.unread_notifications}</span>
186 188 %endif
187 189 %else:
188 190 <span>${_('Not logged in')}</span>
189 191 %endif
190 192 </a>
191 193
192 194 <div class="user-menu">
193 195 <div id="quick_login">
194 196 %if c.rhodecode_user.username == 'default':
195 197 <h4>${_('Login to your account')}</h4>
196 198 ${h.form(h.url('login_home',came_from=h.url.current()))}
197 199 <div class="form">
198 200 <div class="fields">
199 201 <div class="field">
200 202 <div class="label">
201 203 <label for="username">${_('Username')}:</label>
202 204 </div>
203 205 <div class="input">
204 206 ${h.text('username',class_='focus')}
205 207 </div>
206 208
207 209 </div>
208 210 <div class="field">
209 211 <div class="label">
210 212 <label for="password">${_('Password')}:</label>
211 213 </div>
212 214 <div class="input">
213 215 ${h.password('password',class_='focus')}
214 216 </div>
215 217
216 218 </div>
217 219 <div class="buttons">
218 220 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
219 221 <div class="register">
220 222 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
221 223 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
222 224 %endif
223 225 </div>
224 226 <div class="submit">
225 227 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
226 228 </div>
227 229 </div>
228 230 </div>
229 231 </div>
230 232 ${h.end_form()}
231 233 %else:
232 234 <div class="links_left">
233 235 <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
234 236 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
235 237 <div class="email">${c.rhodecode_user.email}</div>
236 238 </div>
237 239 <div class="links_right">
238 240 <ol class="links">
239 241 <li><a href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a></li>
240 242 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
241 243 <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
242 244 </ol>
243 245 </div>
244 246 %endif
245 247 </div>
246 248 </div>
247 249
248 250 </li>
249 251 </%def>
250 252
251 253 <%def name="menu(current=None)">
252 254 <%
253 255 def is_current(selected):
254 256 if selected == current:
255 257 return h.literal('class="current"')
256 258 %>
257 259 <ul id="quick" class="horizontal-list">
258 260 <!-- repo switcher -->
259 261 <li ${is_current('repositories')}>
260 262 <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}">
261 263 ${_('Repositories')}
262 264 </a>
263 265 <ul id="repo_switcher_list" class="repo_switcher">
264 266 <li>
265 267 <a href="#">${_('loading...')}</a>
266 268 </li>
267 269 </ul>
268 270 </li>
269 271 ##ROOT MENU
270 272 %if c.rhodecode_user.username != 'default':
271 273 <li ${is_current('journal')}>
272 274 <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}">
273 275 ${_('Journal')}
274 276 </a>
275 277 </li>
276 278 %else:
277 279 <li ${is_current('journal')}>
278 280 <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}">
279 281 ${_('Public journal')}
280 282 </a>
281 283 </li>
282 284 %endif
283 285 <li ${is_current('search')}>
284 286 <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}">
285 287 ${_('Search')}
286 288 </a>
287 289 </li>
288 290 % if h.HasPermissionAll('hg.admin')('access admin main page'):
289 291 <li ${is_current('admin')}>
290 292 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
291 293 ${_('Admin')}
292 294 </a>
293 295 ${admin_menu()}
294 296 </li>
295 297 % elif c.rhodecode_user.groups_admin:
296 298 <li ${is_current('admin')}>
297 299 <a class="menu_link admin childs" title="${_('Admin')}">
298 300 ${_('Admin')}
299 301 </a>
300 302 ${admin_menu_simple()}
301 303 </li>
302 304 % endif
303 305 ${usermenu()}
304 306 <script type="text/javascript">
305 307 YUE.on('repo_switcher','mouseover',function(){
306 308 var target = 'q_filter_rs';
307 309 var qfilter_activate = function(){
308 310 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
309 311 var func = function(node){
310 312 return node.parentNode;
311 313 }
312 314 q_filter(target,nodes,func);
313 315 }
314 316
315 317 var loaded = YUD.hasClass('repo_switcher','loaded');
316 318 if(!loaded){
317 319 YUD.addClass('repo_switcher','loaded');
318 320 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
319 321 function(o){qfilter_activate();YUD.get(target).focus()},
320 322 function(o){YUD.removeClass('repo_switcher','loaded');}
321 323 ,null);
322 324 }else{
323 325 YUD.get(target).focus();
324 326 }
325 327 return false;
326 328 });
327 329
328 330 YUE.on('header-dd', 'click',function(e){
329 331 YUD.addClass('header-inner', 'hover');
330 332 YUD.addClass('content', 'hover');
331 333 });
332 334
333 335 </script>
334 336 </%def>
General Comments 0
You need to be logged in to leave comments. Login now