Show More
@@ -1,336 +1,337 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="root.html"/> |
|
3 | 3 | |
|
4 | 4 | <!-- HEADER --> |
|
5 | 5 | <div id="header"> |
|
6 | 6 | <div id="header-inner" class="title"> |
|
7 | 7 | <div id="logo"> |
|
8 | 8 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
9 | 9 | </div> |
|
10 | 10 | <!-- MENU --> |
|
11 | 11 | ${self.page_nav()} |
|
12 | 12 | <!-- END MENU --> |
|
13 | 13 | ${self.body()} |
|
14 | 14 | </div> |
|
15 | 15 | </div> |
|
16 | 16 | <!-- END HEADER --> |
|
17 | 17 | |
|
18 | 18 | <!-- CONTENT --> |
|
19 | 19 | <div id="content"> |
|
20 | 20 | <div class="flash_msg"> |
|
21 | 21 | <% messages = h.flash.pop_messages() %> |
|
22 | 22 | % if messages: |
|
23 | 23 | <ul id="flash-messages"> |
|
24 | 24 | % for message in messages: |
|
25 | 25 | <li class="${message.category}_msg">${message}</li> |
|
26 | 26 | % endfor |
|
27 | 27 | </ul> |
|
28 | 28 | % endif |
|
29 | 29 | </div> |
|
30 | 30 | <div id="main"> |
|
31 | 31 | ${next.main()} |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | <!-- END CONTENT --> |
|
35 | 35 | |
|
36 | 36 | <!-- FOOTER --> |
|
37 | 37 | <div id="footer"> |
|
38 | 38 | <div id="footer-inner" class="title"> |
|
39 | 39 | <div> |
|
40 | 40 | <p class="footer-link"> |
|
41 | 41 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
42 | 42 | </p> |
|
43 | 43 | <p class="footer-link-right"> |
|
44 | 44 | <a href="${h.url('rhodecode_official')}">RhodeCode</a> |
|
45 | 45 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski |
|
46 | 46 | </p> |
|
47 | 47 | </div> |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
|
50 | 50 | <!-- END FOOTER --> |
|
51 | 51 | |
|
52 | 52 | ### MAKO DEFS ### |
|
53 | 53 | <%def name="page_nav()"> |
|
54 | 54 | ${self.menu()} |
|
55 | 55 | </%def> |
|
56 | 56 | |
|
57 | 57 | <%def name="breadcrumbs()"> |
|
58 | 58 | <div class="breadcrumbs"> |
|
59 | 59 | ${self.breadcrumbs_links()} |
|
60 | 60 | </div> |
|
61 | 61 | </%def> |
|
62 | 62 | |
|
63 | 63 | <%def name="usermenu()"> |
|
64 | 64 | <div class="user-menu"> |
|
65 | 65 | <div class="container"> |
|
66 | 66 | <div class="gravatar" id="quick_login_link"> |
|
67 | 67 | <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,24)}" /> |
|
68 | 68 | </div> |
|
69 | 69 | %if c.rhodecode_user.username != 'default' and c.unread_notifications != 0: |
|
70 | 70 | <div class="notifications"> |
|
71 | 71 | <a id="notification_counter" href="${h.url('notifications')}">${c.unread_notifications}</a> |
|
72 | 72 | </div> |
|
73 | 73 | %endif |
|
74 | 74 | </div> |
|
75 | 75 | <div id="quick_login" style="display:none"> |
|
76 | 76 | %if c.rhodecode_user.username == 'default': |
|
77 | 77 | <h4>${_('Login to your account')}</h4> |
|
78 | 78 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
79 | 79 | <div class="form"> |
|
80 | 80 | <div class="fields"> |
|
81 | 81 | <div class="field"> |
|
82 | 82 | <div class="label"> |
|
83 | 83 | <label for="username">${_('Username')}:</label> |
|
84 | 84 | </div> |
|
85 | 85 | <div class="input"> |
|
86 | 86 | ${h.text('username',class_='focus',size=40)} |
|
87 | 87 | </div> |
|
88 | 88 | |
|
89 | 89 | </div> |
|
90 | 90 | <div class="field"> |
|
91 | 91 | <div class="label"> |
|
92 | 92 | <label for="password">${_('Password')}:</label> |
|
93 | 93 | </div> |
|
94 | 94 | <div class="input"> |
|
95 | 95 | ${h.password('password',class_='focus',size=40)} |
|
96 | 96 | </div> |
|
97 | 97 | |
|
98 | 98 | </div> |
|
99 | 99 | <div class="buttons"> |
|
100 | 100 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> |
|
101 | 101 | <div class="register"> |
|
102 | 102 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
103 | 103 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
104 | 104 | %endif |
|
105 | 105 | </div> |
|
106 | 106 | <div class="submit"> |
|
107 | 107 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} |
|
108 | 108 | </div> |
|
109 | 109 | </div> |
|
110 | 110 | </div> |
|
111 | 111 | </div> |
|
112 | 112 | ${h.end_form()} |
|
113 | 113 | %else: |
|
114 | 114 | <div class="links_left"> |
|
115 | 115 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
116 | 116 | <div class="email">${c.rhodecode_user.email}</div> |
|
117 | 117 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> |
|
118 | 118 | </div> |
|
119 | 119 | <div class="links_right"> |
|
120 | 120 | <ol class="links"> |
|
121 | 121 | <li>${h.link_to(_(u'Home'),h.url('home'))}</li> |
|
122 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> | |
|
122 | 123 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> |
|
123 | 124 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> |
|
124 | 125 | </ol> |
|
125 | 126 | </div> |
|
126 | 127 | %endif |
|
127 | 128 | </div> |
|
128 | 129 | </div> |
|
129 | 130 | </%def> |
|
130 | 131 | |
|
131 | 132 | <%def name="menu(current=None)"> |
|
132 | 133 | <% |
|
133 | 134 | def is_current(selected): |
|
134 | 135 | if selected == current: |
|
135 | 136 | return h.literal('class="current"') |
|
136 | 137 | %> |
|
137 | 138 | %if current not in ['home','admin']: |
|
138 | 139 | ##REGULAR MENU |
|
139 | 140 | <ul id="quick"> |
|
140 | 141 | <!-- repo switcher --> |
|
141 | 142 | <li> |
|
142 | 143 | <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#"> |
|
143 | 144 | <span class="icon"> |
|
144 | 145 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> |
|
145 | 146 | </span> |
|
146 | 147 | <span>↓</span> |
|
147 | 148 | </a> |
|
148 | 149 | <ul id="repo_switcher_list" class="repo_switcher"> |
|
149 | 150 | <li> |
|
150 | 151 | <a href="#">${_('loading...')}</a> |
|
151 | 152 | </li> |
|
152 | 153 | </ul> |
|
153 | 154 | </li> |
|
154 | 155 | |
|
155 | 156 | <li ${is_current('summary')}> |
|
156 | 157 | <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> |
|
157 | 158 | <span class="icon"> |
|
158 | 159 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> |
|
159 | 160 | </span> |
|
160 | 161 | <span>${_('Summary')}</span> |
|
161 | 162 | </a> |
|
162 | 163 | </li> |
|
163 | 164 | <li ${is_current('changelog')}> |
|
164 | 165 | <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> |
|
165 | 166 | <span class="icon"> |
|
166 | 167 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
|
167 | 168 | </span> |
|
168 | 169 | <span>${_('Changelog')}</span> |
|
169 | 170 | </a> |
|
170 | 171 | </li> |
|
171 | 172 | |
|
172 | 173 | <li ${is_current('switch_to')}> |
|
173 | 174 | <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#"> |
|
174 | 175 | <span class="icon"> |
|
175 | 176 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> |
|
176 | 177 | </span> |
|
177 | 178 | <span>${_('Switch to')}</span> |
|
178 | 179 | </a> |
|
179 | 180 | <ul id="switch_to_list" class="switch_to"> |
|
180 | 181 | <li><a href="#">${_('loading...')}</a></li> |
|
181 | 182 | </ul> |
|
182 | 183 | </li> |
|
183 | 184 | <li ${is_current('files')}> |
|
184 | 185 | <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> |
|
185 | 186 | <span class="icon"> |
|
186 | 187 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
|
187 | 188 | </span> |
|
188 | 189 | <span>${_('Files')}</span> |
|
189 | 190 | </a> |
|
190 | 191 | </li> |
|
191 | 192 | |
|
192 | 193 | <li ${is_current('options')}> |
|
193 | 194 | <a class="menu_link" title="${_('Options')}" href="#"> |
|
194 | 195 | <span class="icon"> |
|
195 | 196 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> |
|
196 | 197 | </span> |
|
197 | 198 | <span>${_('Options')}</span> |
|
198 | 199 | </a> |
|
199 | 200 | <ul> |
|
200 | 201 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
201 | 202 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
202 | 203 | <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
203 | 204 | %else: |
|
204 | 205 | <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> |
|
205 | 206 | %endif |
|
206 | 207 | %endif |
|
207 | 208 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> |
|
208 | 209 | <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> |
|
209 | 210 | |
|
210 | 211 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
211 | 212 | <li> |
|
212 | 213 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} |
|
213 | 214 | <%def name="admin_menu()"> |
|
214 | 215 | <ul> |
|
215 | 216 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> |
|
216 | 217 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
|
217 | 218 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
218 | 219 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
|
219 | 220 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> |
|
220 | 221 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
221 | 222 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
|
222 | 223 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
|
223 | 224 | </ul> |
|
224 | 225 | </%def> |
|
225 | 226 | |
|
226 | 227 | ${admin_menu()} |
|
227 | 228 | </li> |
|
228 | 229 | % endif |
|
229 | 230 | </ul> |
|
230 | 231 | </li> |
|
231 | 232 | |
|
232 | 233 | <li> |
|
233 | 234 | <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
234 | 235 | <span class="icon_short"> |
|
235 | 236 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> |
|
236 | 237 | </span> |
|
237 | 238 | <span id="current_followers_count" class="short">${c.repository_followers}</span> |
|
238 | 239 | </a> |
|
239 | 240 | </li> |
|
240 | 241 | <li> |
|
241 | 242 | <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
242 | 243 | <span class="icon_short"> |
|
243 | 244 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> |
|
244 | 245 | </span> |
|
245 | 246 | <span class="short">${c.repository_forks}</span> |
|
246 | 247 | </a> |
|
247 | 248 | </li> |
|
248 | 249 | ${usermenu()} |
|
249 | 250 | </ul> |
|
250 | 251 | <script type="text/javascript"> |
|
251 | 252 | YUE.on('repo_switcher','mouseover',function(){ |
|
252 | 253 | function qfilter(){ |
|
253 | 254 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); |
|
254 | 255 | var target = 'q_filter_rs'; |
|
255 | 256 | var func = function(node){ |
|
256 | 257 | return node.parentNode; |
|
257 | 258 | } |
|
258 | 259 | q_filter(target,nodes,func); |
|
259 | 260 | } |
|
260 | 261 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
261 | 262 | if(!loaded){ |
|
262 | 263 | YUD.addClass('repo_switcher','loaded'); |
|
263 | 264 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', |
|
264 | 265 | function(o){qfilter();}, |
|
265 | 266 | function(o){YUD.removeClass('repo_switcher','loaded');} |
|
266 | 267 | ,null); |
|
267 | 268 | } |
|
268 | 269 | return false; |
|
269 | 270 | }); |
|
270 | 271 | |
|
271 | 272 | YUE.on('branch_tag_switcher','mouseover',function(){ |
|
272 | 273 | var loaded = YUD.hasClass('branch_tag_switcher','loaded'); |
|
273 | 274 | if(!loaded){ |
|
274 | 275 | YUD.addClass('branch_tag_switcher','loaded'); |
|
275 | 276 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list', |
|
276 | 277 | function(o){}, |
|
277 | 278 | function(o){YUD.removeClass('branch_tag_switcher','loaded');} |
|
278 | 279 | ,null); |
|
279 | 280 | } |
|
280 | 281 | return false; |
|
281 | 282 | }); |
|
282 | 283 | </script> |
|
283 | 284 | %else: |
|
284 | 285 | ##ROOT MENU |
|
285 | 286 | <ul id="quick"> |
|
286 | 287 | <li> |
|
287 | 288 | <a class="menu_link" title="${_('Home')}" href="${h.url('home')}"> |
|
288 | 289 | <span class="icon"> |
|
289 | 290 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> |
|
290 | 291 | </span> |
|
291 | 292 | <span>${_('Home')}</span> |
|
292 | 293 | </a> |
|
293 | 294 | </li> |
|
294 | 295 | %if c.rhodecode_user.username != 'default': |
|
295 | 296 | <li> |
|
296 | 297 | <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}"> |
|
297 | 298 | <span class="icon"> |
|
298 | 299 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> |
|
299 | 300 | </span> |
|
300 | 301 | <span>${_('Journal')}</span> |
|
301 | 302 | </a> |
|
302 | 303 | </li> |
|
303 | 304 | %else: |
|
304 | 305 | <li> |
|
305 | 306 | <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}"> |
|
306 | 307 | <span class="icon"> |
|
307 | 308 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" /> |
|
308 | 309 | </span> |
|
309 | 310 | <span>${_('Public journal')}</span> |
|
310 | 311 | </a> |
|
311 | 312 | </li> |
|
312 | 313 | %endif |
|
313 | 314 | <li> |
|
314 | 315 | <a class="menu_link" title="${_('Search')}" href="${h.url('search')}"> |
|
315 | 316 | <span class="icon"> |
|
316 | 317 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> |
|
317 | 318 | </span> |
|
318 | 319 | <span>${_('Search')}</span> |
|
319 | 320 | </a> |
|
320 | 321 | </li> |
|
321 | 322 | |
|
322 | 323 | %if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
323 | 324 | <li ${is_current('admin')}> |
|
324 | 325 | <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
325 | 326 | <span class="icon"> |
|
326 | 327 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> |
|
327 | 328 | </span> |
|
328 | 329 | <span>${_('Admin')}</span> |
|
329 | 330 | </a> |
|
330 | 331 | ${admin_menu()} |
|
331 | 332 | </li> |
|
332 | 333 | %endif |
|
333 | 334 | ${usermenu()} |
|
334 | 335 | </ul> |
|
335 | 336 | %endif |
|
336 | 337 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now