##// END OF EJS Templates
hide gravatar and login info for anonymous user
marcink -
r778:c3fab5b0 beta
parent child Browse files
Show More
@@ -1,354 +1,354
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <title>${next.title()}</title>
6 6 <link rel="icon" href="/images/icons/database_gear.png" type="image/png" />
7 7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8 <meta name="robots" content="index, nofollow"/>
9 9 <!-- stylesheets -->
10 10 ${self.css()}
11 11 <!-- scripts -->
12 12 ${self.js()}
13 13 </head>
14 14 <body>
15 15 <!-- header -->
16 16 <div id="header">
17 17 <!-- user -->
18 18 <ul id="logged-user">
19 <li class="first">
20 <div class="gravatar">
21 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" />
22 </div>
23 %if c.rhodecode_user.username == 'default':
24 <div class="account">
25 ${h.link_to('%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname),h.url('#'))}<br/>
26 ${h.link_to(c.rhodecode_user.username,h.url('#'))}
27 </div>
28 </li>
29 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li>
19 %if c.rhodecode_user.username == 'default':
20 <li class="first">
21 <div class="account">
22 ## ${h.link_to('%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname),h.url('#'))}<br/>
23 ## ${h.link_to(c.rhodecode_user.username,h.url('#'))}
24 </div>
25 </li>
26 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li>
30 27 %else:
31
32 <div class="account">
33 ${h.link_to('%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname),h.url('admin_settings_my_account'))}<br/>
34 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'))}
35 </div>
36 </li>
37 <li class="last highlight">${h.link_to(u'Logout',h.url('logout_home'))}</li>
28 <li class="first">
29 <div class="gravatar">
30 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" />
31 </div>
32 <div class="account">
33 ${h.link_to('%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname),h.url('admin_settings_my_account'))}<br/>
34 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'))}
35 </div>
36 </li>
37 <li class="last highlight">${h.link_to(u'Logout',h.url('logout_home'))}</li>
38 38 %endif
39 39 </ul>
40 40 <!-- end user -->
41 41 <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner">
42 42 <!-- logo -->
43 43 <div id="logo">
44 44 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
45 45 </div>
46 46 <!-- end logo -->
47 47 <!-- menu -->
48 48 ${self.page_nav()}
49 49 <!-- quick -->
50 50 </div>
51 51 </div>
52 52 <!-- end header -->
53 53
54 54 <!-- CONTENT -->
55 55 <div id="content">
56 56 <div class="flash_msg">
57 57 <% messages = h.flash.pop_messages() %>
58 58 % if messages:
59 59 <ul id="flash-messages">
60 60 % for message in messages:
61 61 <li class="${message.category}_msg">${message}</li>
62 62 % endfor
63 63 </ul>
64 64 % endif
65 65 </div>
66 66 <div id="main">
67 67 ${next.main()}
68 68 </div>
69 69 </div>
70 70 <!-- END CONTENT -->
71 71
72 72 <!-- footer -->
73 73 <div id="footer">
74 74 <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner">
75 75 <div>
76 76 <p class="footer-link">${h.link_to(_('Submit a bug'),h.url('bugtracker'))}</p>
77 77 <p class="footer-link">${h.link_to(_('GPL license'),h.url('gpl_license'))}</p>
78 78 <p>RhodeCode ${c.rhodecode_version} &copy; 2010 by Marcin Kuzminski</p>
79 79 </div>
80 80 </div>
81 81 <script type="text/javascript">${h.tooltip.activate()}</script>
82 82 </div>
83 83 <!-- end footer -->
84 84 </body>
85 85
86 86 </html>
87 87
88 88 ### MAKO DEFS ###
89 89 <%def name="page_nav()">
90 90 ${self.menu()}
91 91 </%def>
92 92
93 93 <%def name="menu(current=None)">
94 94 <%
95 95 def is_current(selected):
96 96 if selected == current:
97 97 return h.literal('class="current"')
98 98 %>
99 99 %if current not in ['home','admin']:
100 100 ##REGULAR MENU
101 101 <ul id="quick">
102 102 <!-- repo switcher -->
103 103 <li>
104 104 <a id="repo_switcher" title="${_('Switch repository')}" href="#">
105 105 <span class="icon">
106 106 <img src="/images/icons/database.png" alt="${_('Products')}" />
107 107 </span>
108 108 <span>&darr;</span>
109 109 </a>
110 110 <ul class="repo_switcher">
111 111 %for repo in c.cached_repo_list:
112 112
113 113 %if repo['repo'].dbrepo.private:
114 114 <li><img src="/images/icons/lock.png" alt="${_('Private repository')}" class="repo_switcher_type"/>${h.link_to(repo['repo'].name,h.url('summary_home',repo_name=repo['repo'].name),class_="%s" % repo['repo'].dbrepo.repo_type)}</li>
115 115 %else:
116 116 <li><img src="/images/icons/lock_open.png" alt="${_('Public repository')}" class="repo_switcher_type" />${h.link_to(repo['repo'].name,h.url('summary_home',repo_name=repo['repo'].name),class_="%s" % repo['repo'].dbrepo.repo_type)}</li>
117 117 %endif
118 118 %endfor
119 119 </ul>
120 120 </li>
121 121
122 122 <li ${is_current('summary')}>
123 123 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
124 124 <span class="icon">
125 125 <img src="/images/icons/clipboard_16.png" alt="${_('Summary')}" />
126 126 </span>
127 127 <span>${_('Summary')}</span>
128 128 </a>
129 129 </li>
130 130 ##<li ${is_current('shortlog')}>
131 131 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
132 132 ## <span class="icon">
133 133 ## <img src="/images/icons/application_view_list.png" alt="${_('Shortlog')}" />
134 134 ## </span>
135 135 ## <span>${_('Shortlog')}</span>
136 136 ## </a>
137 137 ##</li>
138 138 <li ${is_current('changelog')}>
139 139 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
140 140 <span class="icon">
141 141 <img src="/images/icons/time.png" alt="${_('Changelog')}" />
142 142 </span>
143 143 <span>${_('Changelog')}</span>
144 144 </a>
145 145 </li>
146 146
147 147 <li ${is_current('switch_to')}>
148 148 <a title="${_('Switch to')}" href="#">
149 149 <span class="icon">
150 150 <img src="/images/icons/arrow_switch.png" alt="${_('Switch to')}" />
151 151 </span>
152 152 <span>${_('Switch to')}</span>
153 153 </a>
154 154 <ul>
155 155 <li>
156 156 ${h.link_to('%s (%s)' % (_('branches'),len(c.repository_branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
157 157 <ul>
158 158 %if c.repository_branches.values():
159 159 %for cnt,branch in enumerate(c.repository_branches.items()):
160 160 <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
161 161 %endfor
162 162 %else:
163 163 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
164 164 %endif
165 165 </ul>
166 166 </li>
167 167 <li>
168 168 ${h.link_to('%s (%s)' % (_('tags'),len(c.repository_tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
169 169 <ul>
170 170 %if c.repository_tags.values():
171 171 %for cnt,tag in enumerate(c.repository_tags.items()):
172 172 <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
173 173 %endfor
174 174 %else:
175 175 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
176 176 %endif
177 177 </ul>
178 178 </li>
179 179 </ul>
180 180 </li>
181 181 <li ${is_current('files')}>
182 182 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
183 183 <span class="icon">
184 184 <img src="/images/icons/file.png" alt="${_('Files')}" />
185 185 </span>
186 186 <span>${_('Files')}</span>
187 187 </a>
188 188 </li>
189 189
190 190 <li ${is_current('options')}>
191 191 <a title="${_('Options')}" href="#">
192 192 <span class="icon">
193 193 <img src="/images/icons/table_gear.png" alt="${_('Admin')}" />
194 194 </span>
195 195 <span>${_('Options')}</span>
196 196 </a>
197 197 <ul>
198 198 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
199 199 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
200 200 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
201 201 %endif
202 202 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
203 203
204 204 %if h.HasPermissionAll('hg.admin')('access admin main page'):
205 205 <li>
206 206 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
207 207 <%def name="admin_menu()">
208 208 <ul>
209 209 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
210 210 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
211 211 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
212 212 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
213 213 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
214 214 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
215 215 </ul>
216 216 </%def>
217 217
218 218 ${admin_menu()}
219 219 </li>
220 220 %endif
221 221
222 222 </ul>
223 223 </li>
224 224
225 225 <li>
226 226 <a title="${_('Followers')}" href="#">
227 227 <span class="icon_short">
228 228 <img src="/images/icons/heart.png" alt="${_('Followers')}" />
229 229 </span>
230 230 <span class="short">${c.repository_followers}</span>
231 231 </a>
232 232 </li>
233 233 <li>
234 234 <a title="${_('Forks')}" href="#">
235 235 <span class="icon_short">
236 236 <img src="/images/icons/arrow_divide.png" alt="${_('Forks')}" />
237 237 </span>
238 238 <span class="short">${c.repository_forks}</span>
239 239 </a>
240 240 </li>
241 241
242 242
243 243
244 244 </ul>
245 245 %else:
246 246 ##ROOT MENU
247 247 <ul id="quick">
248 248 <li>
249 249 <a title="${_('Home')}" href="${h.url('home')}">
250 250 <span class="icon">
251 251 <img src="/images/icons/home_16.png" alt="${_('Home')}" />
252 252 </span>
253 253 <span>${_('Home')}</span>
254 254 </a>
255 255 </li>
256 256
257 257 <li>
258 258 <a title="${_('Journal')}" href="${h.url('journal')}">
259 259 <span class="icon">
260 260 <img src="/images/icons/book.png" alt="${_('Journal')}" />
261 261 </span>
262 262 <span>${_('Journal')}</span>
263 263 </a>
264 264 </li>
265 265
266 266 <li>
267 267 <a title="${_('Search')}" href="${h.url('search')}">
268 268 <span class="icon">
269 269 <img src="/images/icons/search_16.png" alt="${_('Search')}" />
270 270 </span>
271 271 <span>${_('Search')}</span>
272 272 </a>
273 273 </li>
274 274
275 275 %if h.HasPermissionAll('hg.admin')('access admin main page'):
276 276 <li ${is_current('admin')}>
277 277 <a title="${_('Admin')}" href="${h.url('admin_home')}">
278 278 <span class="icon">
279 279 <img src="/images/icons/cog_edit.png" alt="${_('Admin')}" />
280 280 </span>
281 281 <span>${_('Admin')}</span>
282 282 </a>
283 283 ${admin_menu()}
284 284 </li>
285 285 %endif
286 286 </ul>
287 287 %endif
288 288 </%def>
289 289
290 290
291 291 <%def name="css()">
292 292 <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
293 293 <link rel="stylesheet" type="text/css" href="/css/pygments.css" />
294 294 <link rel="stylesheet" type="text/css" href="/css/diff.css" />
295 295 </%def>
296 296
297 297 <%def name="js()">
298 298 ##<script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
299 299 ##<script type="text/javascript" src="/js/yui/container/container.js"></script>
300 300 ##<script type="text/javascript" src="/js/yui/datasource/datasource.js"></script>
301 301 ##<script type="text/javascript" src="/js/yui/autocomplete/autocomplete.js"></script>
302 302 ##<script type="text/javascript" src="/js/yui/selector/selector-min.js"></script>
303 303
304 304 <script type="text/javascript" src="/js/yui2a.js"></script>
305 305 <!--[if IE]><script language="javascript" type="text/javascript" src="/js/excanvas.min.js"></script><![endif]-->
306 306 <script type="text/javascript" src="/js/yui.flot.js"></script>
307 307
308 308 <script type="text/javascript">
309 309 var base_url ='/_admin/toggle_following';
310 310 var YUC = YAHOO.util.Connect;
311 311 var YUD = YAHOO.util.Dom;
312 312 var YUE = YAHOO.util.Event;
313 313
314 314 function onSuccess(){
315 315
316 316 var f = YUD.get('follow_toggle');
317 317 if(f.getAttribute('class')=='follow'){
318 318 f.setAttribute('class','following');
319 319 f.setAttribute('title',"${_('Stop following this repository')}");
320 320 }
321 321 else{
322 322 f.setAttribute('class','follow');
323 323 f.setAttribute('title',"${_('Start following this repository')}");
324 324 }
325 325 }
326 326
327 327 function toggleFollowingUser(fallows_user_id,token){
328 328 args = 'follows_user_id='+fallows_user_id;
329 329 args+= '&auth_token='+token;
330 330 YUC.asyncRequest('POST',base_url,{
331 331 success:function(o){
332 332 onSuccess();
333 333 }
334 334 },args); return false;
335 335 }
336 336
337 337 function toggleFollowingRepo(fallows_repo_id,token){
338 338 args = 'follows_repo_id='+fallows_repo_id;
339 339 args+= '&auth_token='+token;
340 340 YUC.asyncRequest('POST',base_url,{
341 341 success:function(o){
342 342 onSuccess();
343 343 }
344 344 },args); return false;
345 345 }
346 346 </script>
347 347
348 348 </%def>
349 349
350 350 <%def name="breadcrumbs()">
351 351 <div class="breadcrumbs">
352 352 ${self.breadcrumbs_links()}
353 353 </div>
354 354 </%def> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now