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