Mercurial > kallithea
comparison rhodecode/templates/base/base.html @ 1512:bf263968da47
merge beta in stable branch
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 07 Oct 2011 01:08:50 +0200 |
parents | 0dc8d578ff49 6ebb165c3942 |
children | 82a88013a3fd |
comparison
equal
deleted
inserted
replaced
1329:e058df3ff2b4 | 1512:bf263968da47 |
---|---|
1 ## -*- coding: utf-8 -*- | 1 ## -*- coding: utf-8 -*- |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | 2 <%inherit file="root.html"/> |
3 <html xmlns="http://www.w3.org/1999/xhtml"> | 3 |
4 <head> | 4 <!-- HEADER --> |
5 <title>${next.title()}</title> | 5 <div id="header"> |
6 <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> | 6 <!-- user --> |
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | 7 <ul id="logged-user"> |
8 <meta name="robots" content="index, nofollow"/> | 8 <li class="first"> |
9 <!-- stylesheets --> | 9 <div id="quick_login" style="display:none"> |
10 ${self.css()} | 10 ${h.form(h.url('login_home',came_from=h.url.current()))} |
11 <!-- scripts --> | 11 <div class="form"> |
12 ${self.js()} | 12 <div class="fields"> |
13 </head> | 13 <div class="field"> |
14 <body> | 14 <div class="label"> |
15 <!-- header --> | 15 <label for="username">${_('Username')}:</label> |
16 <div id="header"> | 16 </div> |
17 <!-- user --> | 17 <div class="input"> |
18 <ul id="logged-user"> | 18 ${h.text('username',class_='focus',size=40)} |
19 <li class="first"> | 19 </div> |
20 <div class="gravatar"> | 20 |
21 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" /> | 21 </div> |
22 </div> | 22 <div class="field"> |
23 <div class="account"> | 23 <div class="label"> |
24 %if c.rhodecode_user.username == 'default': | 24 <label for="password">${_('Password')}:</label> |
25 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): | 25 </div> |
26 ${h.link_to('anonymous',h.url('register'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} | 26 <div class="input"> |
27 %else: | 27 ${h.password('password',class_='focus',size=40)} |
28 ${h.link_to('anonymous',h.url('#'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} | 28 </div> |
29 %endif | 29 |
30 | 30 </div> |
31 %else: | 31 <div class="buttons"> |
32 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} | 32 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> |
33 %endif | 33 <div class="register"> |
34 </div> | 34 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
35 </li> | 35 ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
36 <li> | 36 %endif |
37 <a href="${h.url('home')}">${_('Home')}</a> | 37 </div> |
38 </li> | 38 ${h.submit('sign_in',_('Sign In'),class_="ui-button")} |
39 %if c.rhodecode_user.username != 'default': | 39 </div> |
40 <li> | 40 </div> |
41 <a href="${h.url('journal')}">${_('Journal')}</a> | 41 </div> |
42 ##(${c.unread_journal})</a> | 42 ${h.end_form()} |
43 </li> | 43 </div> |
44 %endif | 44 |
45 %if c.rhodecode_user.username == 'default': | 45 <div class="gravatar"> |
46 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li> | 46 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" /> |
47 %else: | 47 </div> |
48 <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li> | 48 <div class="account"> |
49 %endif | 49 %if c.rhodecode_user.username == 'default': |
50 <a href="${h.url('public_journal')}">${_('Public journal')}</a> | |
51 %else: | |
52 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} | |
53 %endif | |
54 </div> | |
55 </li> | |
56 <li> | |
57 <a href="${h.url('home')}">${_('Home')}</a> | |
58 </li> | |
59 %if c.rhodecode_user.username != 'default': | |
60 <li> | |
61 <a href="${h.url('journal')}">${_('Journal')}</a> | |
62 ##(${c.unread_journal} | |
63 </li> | |
64 %endif | |
65 %if c.rhodecode_user.username == 'default': | |
66 <li class="last highlight">${h.link_to(_(u'Login'),h.url('login_home'),id='quick_login_link')}</li> | |
67 %else: | |
68 <li class="last highlight">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> | |
69 %endif | |
70 </ul> | |
71 <!-- end user --> | |
72 <div id="header-inner" class="title"> | |
73 <div id="logo"> | |
74 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> | |
75 </div> | |
76 <!-- MENU --> | |
77 ${self.page_nav()} | |
78 <!-- END MENU --> | |
79 ${self.body()} | |
80 </div> | |
81 </div> | |
82 <!-- END HEADER --> | |
83 | |
84 <!-- CONTENT --> | |
85 <div id="content"> | |
86 <div class="flash_msg"> | |
87 <% messages = h.flash.pop_messages() %> | |
88 % if messages: | |
89 <ul id="flash-messages"> | |
90 % for message in messages: | |
91 <li class="${message.category}_msg">${message}</li> | |
92 % endfor | |
50 </ul> | 93 </ul> |
51 <!-- end user --> | 94 % endif |
52 <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner"> | 95 </div> |
53 <!-- logo --> | 96 <div id="main"> |
54 <div id="logo"> | 97 ${next.main()} |
55 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> | 98 </div> |
56 </div> | 99 </div> |
57 <!-- end logo --> | 100 <!-- END CONTENT --> |
58 <!-- menu --> | 101 |
59 ${self.page_nav()} | 102 <!-- FOOTER --> |
60 <!-- quick --> | 103 <div id="footer"> |
61 </div> | 104 <div id="footer-inner" class="title"> |
62 </div> | 105 <div> |
63 <!-- end header --> | 106 <p class="footer-link"> |
64 | 107 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
65 <!-- CONTENT --> | 108 </p> |
66 <div id="content"> | 109 <p class="footer-link-right"> |
67 <div class="flash_msg"> | 110 <a href="${h.url('rhodecode_official')}">RhodeCode</a> |
68 <% messages = h.flash.pop_messages() %> | 111 ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski |
69 % if messages: | 112 </p> |
70 <ul id="flash-messages"> | 113 </div> |
71 % for message in messages: | 114 </div> |
72 <li class="${message.category}_msg">${message}</li> | 115 </div> |
73 % endfor | 116 <!-- END FOOTER --> |
74 </ul> | 117 |
75 % endif | 118 ### MAKO DEFS ### |
76 </div> | |
77 <div id="main"> | |
78 ${next.main()} | |
79 </div> | |
80 </div> | |
81 <!-- END CONTENT --> | |
82 | |
83 <!-- footer --> | |
84 <div id="footer"> | |
85 <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner"> | |
86 <div> | |
87 <p class="footer-link">${h.link_to(_('Submit a bug'),h.url('bugtracker'))}</p> | |
88 <p class="footer-link-right"> | |
89 <a href="${h.url('rhodecode_official')}">RhodeCode</a> | |
90 ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski | |
91 </p> | |
92 </div> | |
93 </div> | |
94 <script type="text/javascript"> | |
95 function tooltip_activate(){ | |
96 ${h.tooltip.activate()} | |
97 } | |
98 tooltip_activate(); | |
99 </script> | |
100 </div> | |
101 <!-- end footer --> | |
102 </body> | |
103 | |
104 </html> | |
105 | |
106 ### MAKO DEFS ### | |
107 <%def name="page_nav()"> | 119 <%def name="page_nav()"> |
108 ${self.menu()} | 120 ${self.menu()} |
109 </%def> | 121 </%def> |
122 | |
123 <%def name="breadcrumbs()"> | |
124 <div class="breadcrumbs"> | |
125 ${self.breadcrumbs_links()} | |
126 </div> | |
127 </%def> | |
128 | |
110 | 129 |
111 <%def name="menu(current=None)"> | 130 <%def name="menu(current=None)"> |
112 <% | 131 <% |
113 def is_current(selected): | 132 def is_current(selected): |
114 if selected == current: | 133 if selected == current: |
119 <ul id="quick"> | 138 <ul id="quick"> |
120 <!-- repo switcher --> | 139 <!-- repo switcher --> |
121 <li> | 140 <li> |
122 <a id="repo_switcher" title="${_('Switch repository')}" href="#"> | 141 <a id="repo_switcher" title="${_('Switch repository')}" href="#"> |
123 <span class="icon"> | 142 <span class="icon"> |
124 <img src="${h.url("/images/icons/database.png")}" alt="${_('Products')}" /> | 143 <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> |
125 </span> | 144 </span> |
126 <span>↓</span> | 145 <span>↓</span> |
127 </a> | 146 </a> |
128 <ul class="repo_switcher"> | 147 <ul id="repo_switcher_list" class="repo_switcher"> |
129 %for repo in c.cached_repo_list: | 148 <li> |
130 | 149 <a href="#">${_('loading...')}</a> |
131 %if repo['repo'].dbrepo.private: | 150 </li> |
132 <li><img src="${h.url("/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> | 151 </ul> |
133 %else: | 152 <script type="text/javascript"> |
134 <li><img src="${h.url("/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> | 153 YUE.on('repo_switcher','mouseover',function(){ |
135 %endif | 154 function qfilter(){ |
136 %endfor | 155 var S = YAHOO.util.Selector; |
137 </ul> | 156 |
157 var q_filter = YUD.get('q_filter_rs'); | |
158 var F = YAHOO.namespace('q_filter_rs'); | |
159 | |
160 YUE.on(q_filter,'click',function(){ | |
161 q_filter.value = ''; | |
162 }); | |
163 | |
164 F.filterTimeout = null; | |
165 | |
166 F.updateFilter = function() { | |
167 // Reset timeout | |
168 F.filterTimeout = null; | |
169 | |
170 var obsolete = []; | |
171 var nodes = S.query('ul#repo_switcher_list li a.repo_name'); | |
172 var req = YUD.get('q_filter_rs').value; | |
173 for (n in nodes){ | |
174 YUD.setStyle(nodes[n].parentNode,'display','') | |
175 } | |
176 if (req){ | |
177 for (n in nodes){ | |
178 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { | |
179 obsolete.push(nodes[n]); | |
180 } | |
181 } | |
182 if(obsolete){ | |
183 for (n in obsolete){ | |
184 YUD.setStyle(obsolete[n].parentNode,'display','none'); | |
185 } | |
186 } | |
187 } | |
188 } | |
189 | |
190 YUE.on(q_filter,'keyup',function(e){ | |
191 clearTimeout(F.filterTimeout); | |
192 F.filterTimeout = setTimeout(F.updateFilter,600); | |
193 }); | |
194 } | |
195 var loaded = YUD.hasClass('repo_switcher','loaded'); | |
196 if(!loaded){ | |
197 YUD.addClass('repo_switcher','loaded'); | |
198 ypjax("${h.url('repo_switcher')}",'repo_switcher_list', | |
199 function(o){qfilter();}, | |
200 function(o){YUD.removeClass('repo_switcher','loaded');} | |
201 ,null); | |
202 } | |
203 return false; | |
204 }); | |
205 </script> | |
138 </li> | 206 </li> |
139 | 207 |
140 <li ${is_current('summary')}> | 208 <li ${is_current('summary')}> |
141 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> | 209 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> |
142 <span class="icon"> | 210 <span class="icon"> |
143 <img src="${h.url("/images/icons/clipboard_16.png")}" alt="${_('Summary')}" /> | 211 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> |
144 </span> | 212 </span> |
145 <span>${_('Summary')}</span> | 213 <span>${_('Summary')}</span> |
146 </a> | 214 </a> |
147 </li> | 215 </li> |
148 ##<li ${is_current('shortlog')}> | 216 ##<li ${is_current('shortlog')}> |
149 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}"> | 217 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}"> |
150 ## <span class="icon"> | 218 ## <span class="icon"> |
151 ## <img src="${h.url("/images/icons/application_view_list.png")}" alt="${_('Shortlog')}" /> | 219 ## <img src="${h.url('/images/icons/application_view_list.png')}" alt="${_('Shortlog')}" /> |
152 ## </span> | 220 ## </span> |
153 ## <span>${_('Shortlog')}</span> | 221 ## <span>${_('Shortlog')}</span> |
154 ## </a> | 222 ## </a> |
155 ##</li> | 223 ##</li> |
156 <li ${is_current('changelog')}> | 224 <li ${is_current('changelog')}> |
157 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> | 225 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> |
158 <span class="icon"> | 226 <span class="icon"> |
159 <img src="${h.url("/images/icons/time.png")}" alt="${_('Changelog')}" /> | 227 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
160 </span> | 228 </span> |
161 <span>${_('Changelog')}</span> | 229 <span>${_('Changelog')}</span> |
162 </a> | 230 </a> |
163 </li> | 231 </li> |
164 | 232 |
165 <li ${is_current('switch_to')}> | 233 <li ${is_current('switch_to')}> |
166 <a title="${_('Switch to')}" href="#"> | 234 <a title="${_('Switch to')}" href="#"> |
167 <span class="icon"> | 235 <span class="icon"> |
168 <img src="${h.url("/images/icons/arrow_switch.png")}" alt="${_('Switch to')}" /> | 236 <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> |
169 </span> | 237 </span> |
170 <span>${_('Switch to')}</span> | 238 <span>${_('Switch to')}</span> |
171 </a> | 239 </a> |
172 <ul> | 240 <ul> |
173 <li> | 241 <li> |
174 ${h.link_to('%s (%s)' % (_('branches'),len(c.repository_branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')} | 242 ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')} |
175 <ul> | 243 <ul> |
176 %if c.repository_branches.values(): | 244 %if c.rhodecode_repo.branches.values(): |
177 %for cnt,branch in enumerate(c.repository_branches.items()): | 245 %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()): |
178 <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> | 246 <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> |
179 %endfor | 247 %endfor |
180 %else: | 248 %else: |
181 <li>${h.link_to(_('There are no branches yet'),'#')}</li> | 249 <li>${h.link_to(_('There are no branches yet'),'#')}</li> |
182 %endif | 250 %endif |
183 </ul> | 251 </ul> |
184 </li> | 252 </li> |
185 <li> | 253 <li> |
186 ${h.link_to('%s (%s)' % (_('tags'),len(c.repository_tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')} | 254 ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')} |
187 <ul> | 255 <ul> |
188 %if c.repository_tags.values(): | 256 %if c.rhodecode_repo.tags.values(): |
189 %for cnt,tag in enumerate(c.repository_tags.items()): | 257 %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()): |
190 <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> | 258 <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> |
191 %endfor | 259 %endfor |
192 %else: | 260 %else: |
193 <li>${h.link_to(_('There are no tags yet'),'#')}</li> | 261 <li>${h.link_to(_('There are no tags yet'),'#')}</li> |
194 %endif | 262 %endif |
197 </ul> | 265 </ul> |
198 </li> | 266 </li> |
199 <li ${is_current('files')}> | 267 <li ${is_current('files')}> |
200 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> | 268 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> |
201 <span class="icon"> | 269 <span class="icon"> |
202 <img src="${h.url("/images/icons/file.png")}" alt="${_('Files')}" /> | 270 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
203 </span> | 271 </span> |
204 <span>${_('Files')}</span> | 272 <span>${_('Files')}</span> |
205 </a> | 273 </a> |
206 </li> | 274 </li> |
207 | 275 |
208 <li ${is_current('options')}> | 276 <li ${is_current('options')}> |
209 <a title="${_('Options')}" href="#"> | 277 <a title="${_('Options')}" href="#"> |
210 <span class="icon"> | 278 <span class="icon"> |
211 <img src="${h.url("/images/icons/table_gear.png")}" alt="${_('Admin')}" /> | 279 <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> |
212 </span> | 280 </span> |
213 <span>${_('Options')}</span> | 281 <span>${_('Options')}</span> |
214 </a> | 282 </a> |
215 <ul> | 283 <ul> |
216 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): | 284 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
221 %endif | 289 %endif |
222 %endif | 290 %endif |
223 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> | 291 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> |
224 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> | 292 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> |
225 | 293 |
226 %if h.HasPermissionAll('hg.admin')('access admin main page'): | 294 % if h.HasPermissionAll('hg.admin')('access admin main page'): |
227 <li> | 295 <li> |
228 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} | 296 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} |
229 <%def name="admin_menu()"> | 297 <%def name="admin_menu()"> |
230 <ul> | 298 <ul> |
231 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> | 299 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> |
232 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> | 300 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
301 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> | |
233 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> | 302 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
303 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> | |
234 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> | 304 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
235 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> | 305 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
236 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> | 306 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
237 </ul> | 307 </ul> |
238 </%def> | 308 </%def> |
239 | 309 |
240 ${admin_menu()} | 310 ${admin_menu()} |
241 </li> | 311 </li> |
242 %endif | 312 % endif |
243 | |
244 </ul> | 313 </ul> |
245 </li> | 314 </li> |
246 | 315 |
247 <li> | 316 <li> |
248 <a title="${_('Followers')}" href="#"> | 317 <a title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
249 <span class="icon_short"> | 318 <span class="icon_short"> |
250 <img src="${h.url("/images/icons/heart.png")}" alt="${_('Followers')}" /> | 319 <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> |
251 </span> | 320 </span> |
252 <span class="short">${c.repository_followers}</span> | 321 <span id="current_followers_count" class="short">${c.repository_followers}</span> |
253 </a> | 322 </a> |
254 </li> | 323 </li> |
255 <li> | 324 <li> |
256 <a title="${_('Forks')}" href="#"> | 325 <a title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
257 <span class="icon_short"> | 326 <span class="icon_short"> |
258 <img src="${h.url("/images/icons/arrow_divide.png")}" alt="${_('Forks')}" /> | 327 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> |
259 </span> | 328 </span> |
260 <span class="short">${c.repository_forks}</span> | 329 <span class="short">${c.repository_forks}</span> |
261 </a> | 330 </a> |
262 </li> | 331 </li> |
263 | |
264 | |
265 | 332 |
266 </ul> | 333 </ul> |
267 %else: | 334 %else: |
268 ##ROOT MENU | 335 ##ROOT MENU |
269 <ul id="quick"> | 336 <ul id="quick"> |
270 <li> | 337 <li> |
271 <a title="${_('Home')}" href="${h.url('home')}"> | 338 <a title="${_('Home')}" href="${h.url('home')}"> |
272 <span class="icon"> | 339 <span class="icon"> |
273 <img src="${h.url("/images/icons/home_16.png")}" alt="${_('Home')}" /> | 340 <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> |
274 </span> | 341 </span> |
275 <span>${_('Home')}</span> | 342 <span>${_('Home')}</span> |
276 </a> | 343 </a> |
277 </li> | 344 </li> |
278 %if c.rhodecode_user.username != 'default': | 345 % if c.rhodecode_user.username != 'default': |
279 <li> | 346 <li> |
280 <a title="${_('Journal')}" href="${h.url('journal')}"> | 347 <a title="${_('Journal')}" href="${h.url('journal')}"> |
281 <span class="icon"> | 348 <span class="icon"> |
282 <img src="${h.url("/images/icons/book.png")}" alt="${_('Journal')}" /> | 349 <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> |
283 </span> | 350 </span> |
284 <span>${_('Journal')}</span> | 351 <span>${_('Journal')}</span> |
285 </a> | 352 </a> |
286 </li> | 353 </li> |
287 %endif | 354 % endif |
288 <li> | 355 <li> |
289 <a title="${_('Search')}" href="${h.url('search')}"> | 356 <a title="${_('Search')}" href="${h.url('search')}"> |
290 <span class="icon"> | 357 <span class="icon"> |
291 <img src="${h.url("/images/icons/search_16.png")}" alt="${_('Search')}" /> | 358 <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> |
292 </span> | 359 </span> |
293 <span>${_('Search')}</span> | 360 <span>${_('Search')}</span> |
294 </a> | 361 </a> |
295 </li> | 362 </li> |
296 | 363 |
297 %if h.HasPermissionAll('hg.admin')('access admin main page'): | 364 %if h.HasPermissionAll('hg.admin')('access admin main page'): |
298 <li ${is_current('admin')}> | 365 <li ${is_current('admin')}> |
299 <a title="${_('Admin')}" href="${h.url('admin_home')}"> | 366 <a title="${_('Admin')}" href="${h.url('admin_home')}"> |
300 <span class="icon"> | 367 <span class="icon"> |
301 <img src="${h.url("/images/icons/cog_edit.png")}" alt="${_('Admin')}" /> | 368 <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> |
302 </span> | 369 </span> |
303 <span>${_('Admin')}</span> | 370 <span>${_('Admin')}</span> |
304 </a> | 371 </a> |
305 ${admin_menu()} | 372 ${admin_menu()} |
306 </li> | 373 </li> |
307 %endif | 374 %endif |
308 </ul> | 375 </ul> |
309 %endif | 376 %endif |
310 </%def> | 377 </%def> |
311 | |
312 | |
313 <%def name="css()"> | |
314 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css')}" media="screen" /> | |
315 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css')}" /> | |
316 <link rel="stylesheet" type="text/css" href="${h.url('/css/diff.css')}" /> | |
317 </%def> | |
318 | |
319 <%def name="js()"> | |
320 ##<script type="text/javascript" src="${h.url('/js/yui/utilities/utilities.js')}"></script> | |
321 ##<script type="text/javascript" src="${h.url('/js/yui/container/container.js')}"></script> | |
322 ##<script type="text/javascript" src="${h.url('/js/yui/datasource/datasource.js')}"></script> | |
323 ##<script type="text/javascript" src="${h.url('/js/yui/autocomplete/autocomplete.js')}"></script> | |
324 ##<script type="text/javascript" src="${h.url('/js/yui/selector/selector-min.js')}"></script> | |
325 | |
326 <script type="text/javascript" src="${h.url('/js/yui2a.js')}"></script> | |
327 <!--[if IE]><script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script><![endif]--> | |
328 <script type="text/javascript" src="${h.url('/js/yui.flot.js')}"></script> | |
329 | |
330 <script type="text/javascript"> | |
331 var base_url = "${h.url('toggle_following')}"; | |
332 var YUC = YAHOO.util.Connect; | |
333 var YUD = YAHOO.util.Dom; | |
334 var YUE = YAHOO.util.Event; | |
335 | |
336 function onSuccess(target){ | |
337 | |
338 var f = YUD.get(target.id); | |
339 if(f.getAttribute('class')=='follow'){ | |
340 f.setAttribute('class','following'); | |
341 f.setAttribute('title',"${_('Stop following this repository')}"); | |
342 } | |
343 else{ | |
344 f.setAttribute('class','follow'); | |
345 f.setAttribute('title',"${_('Start following this repository')}"); | |
346 } | |
347 } | |
348 | |
349 function toggleFollowingUser(fallows_user_id,token){ | |
350 args = 'follows_user_id='+fallows_user_id; | |
351 args+= '&auth_token='+token; | |
352 YUC.asyncRequest('POST',base_url,{ | |
353 success:function(o){ | |
354 onSuccess(); | |
355 } | |
356 },args); return false; | |
357 } | |
358 | |
359 function toggleFollowingRepo(target,fallows_repo_id,token){ | |
360 | |
361 args = 'follows_repo_id='+fallows_repo_id; | |
362 args+= '&auth_token='+token; | |
363 YUC.asyncRequest('POST',base_url,{ | |
364 success:function(o){ | |
365 onSuccess(target); | |
366 } | |
367 },args); return false; | |
368 } | |
369 </script> | |
370 | |
371 </%def> | |
372 | |
373 <%def name="breadcrumbs()"> | |
374 <div class="breadcrumbs"> | |
375 ${self.breadcrumbs_links()} | |
376 </div> | |
377 </%def> |