##// END OF EJS Templates
Adding the context bar too all pages related to a Repository....
Leonardo -
r3527:87c97fce beta
parent child Browse files
Show More
@@ -0,0 +1,330 b''
1 /**
2 * Stylesheets for the context bar
3 */
4
5 #context-bar button.follow { background-image: url("../images/icons/heart.png"); }
6 #context-bar button.following { background-image: url("../images/icons/heart_delete.png"); }
7 #context-bar a.fork { background-image: url("../images/icons/arrow_divide.png"); }
8 #context-bar a.summary { background-image: url("../images/icons/clipboard_16.png"); }
9 #context-bar a.changelogs { background-image: url("../images/icons/time.png"); }
10 #context-bar a.files { background-image: url("../images/icons/file.png"); }
11 #context-bar a.switch-to { background-image: url("../images/icons/arrow_switch.png"); }
12 #context-bar a.options { background-image: url("../images/icons/table_gear.png"); }
13 #context-bar a.pull-request { background-image: url("../images/icons/arrow_join.png"); }
14 #context-bar a.branches { background-image: url("../images/icons/arrow_branch.png"); }
15 #context-bar a.tags { background-image: url("../images/icons/tag_blue.png"); }
16 #context-bar a.bookmarks { background-image: url("../images/icons/tag_green.png"); }
17 #context-bar a.settings { background-image: url("../images/icons/cog.png"); }
18 #context-bar a.shortlog { background-image: url("../images/icons/time.png"); }
19 #context-bar a.search { background-image: url("../images/icons/search_16.png"); }
20 #context-bar a.admin { background-image: url("../images/icons/cog_edit.png"); }
21
22 #context-bar a.journal { background-image: url("../images/icons/book.png"); }
23 #context-bar a.repos { background-image: url("../images/icons/database_edit.png"); }
24 #context-bar a.repos_groups { background-image: url("../images/icons/database_link.png"); }
25 #context-bar a.users { background-image: url("../images/icons/user_edit.png"); }
26 #context-bar a.groups { background-image: url("../images/icons/group_edit.png"); }
27 #context-bar a.permissions { background-image: url("../images/icons/key.png"); }
28 #context-bar a.ldap { background-image: url("../images/icons/server_key.png"); }
29 #context-bar a.defaults { background-image: url("../images/icons/wrench.png"); }
30 #context-bar a.settings { background-image: url("../images/icons/cog_edit.png"); }
31
32 #content #context-bar {
33 position: relative;
34 background-color: #003B76 !important;
35 padding: 0px;
36 overflow: visible;
37 }
38
39 #content #context-bar,
40 #content #context-bar a,
41 #content #context-bar button {
42 color: #FFFFFF;
43 }
44
45 #content #context-bar a:hover,
46 #content #context-bar button:hover {
47 text-decoration: none;
48 color: #bfe3ff;
49 }
50
51 #content #context-bar .icon {
52 display: inline-block;
53 width: 16px;
54 height: 16px;
55 vertical-align: text-bottom;
56 }
57
58 ul.horizontal-list {
59 display: block;
60 /* overflow: hidden;*/
61 }
62 ul.horizontal-list > li {
63 float: left;
64 padding-right: 5px;
65 position: relative;
66 }
67
68 ul.horizontal-list > li ul {
69 position: absolute;
70 display: none;
71 right: 0;
72 }
73
74 ul.horizontal-list li:hover > ul {
75 display: block;
76 }
77
78 ul.horizontal-list ul li {
79 position: relative;
80 border-bottom: 1px solid rgba(0,0,0,0.1);
81 border-top: 1px solid rgba(255,255,255,0.1);
82 }
83
84 ul.horizontal-list > li ul ul {
85 position: absolute;
86 right: 100%;
87 top: -1px;
88 min-width: 200px;
89 max-height: 400px;
90 overflow-x:hidden;
91 overflow-y:auto;
92 }
93
94 ul.horizontal-list > li a {
95 white-space: nowrap;
96 }
97
98 #breadcrumbs {
99 float:left;
100 padding: 12px 0;
101 font-weight: bold;
102 }
103
104 #breadcrumbs span{
105 font-weight: bold;
106 font-size: 2em;
107 }
108
109 #context-top {
110 position: relative;
111 overflow: hidden;
112 border-bottom: 1px solid #003162;
113 padding: 10px;
114 }
115
116 #revision-changer,
117 #context-pages,
118 #context-pages ul,
119 ul#context-actions {
120 background: #3b6998; /* Old browsers */
121 background: -moz-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* FF3.6+ */
122 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4574a2), color-stop(100%,#2f5d8b)); /* Chrome,Safari4+ */
123 background: -webkit-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* Chrome10+,Safari5.1+ */
124 background: -o-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* Opera 11.10+ */
125 background: -ms-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* IE10+ */
126 background: linear-gradient(to bottom, #4574a2 0%, #2f5d8b 100%); /* W3C */
127 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4574a2', endColorstr='#2f5d8b',GradientType=0 ); /* IE6-9 */
128 }
129
130 #context-actions a,
131 #context-pages a {
132 background-repeat: no-repeat;
133 background-position: 10px 50%;
134 padding-left: 30px;
135 }
136
137 #context-pages ul ul a{
138 padding-left: 10px;
139 }
140
141 ul#context-actions {
142 display: inline-block;
143 float: right;
144 border-radius: 4px;
145 background-color:#3b6998;
146 background-image: linear-gradient(top, #4574a2 0%, #2f5d8b 100%);
147 padding: 5px;
148 }
149
150 #content ul#context-actions li {
151 padding: 0px;
152 border-right: 1px solid rgba(0,0,0,0.1);
153 border-left: 1px solid rgba(255,255,255,0.1);
154 }
155
156 #context-actions button,
157 #context-actions a {
158 display: block;
159 cursor: pointer;
160 background: none;
161 border: none;
162 margin: 0px;
163 height: 13px;
164 padding: 3px 7px;
165 background-repeat: no-repeat;
166 background-position: 50% 3px;
167 padding-top: 24px;
168 }
169
170 #context-actions button{
171 padding-top: 22px;
172 height: 40px;
173 }
174
175 #revision-changer:hover,
176 #context-pages li:hover,
177 #context-actions li:hover,
178 #content #context-actions li:hover {
179 /*background: rgba(255,255,255,0.2);*/
180 background: #6388ad; /* Old browsers */
181 background: -moz-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */
182 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
183 background: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
184 background: -o-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%); /* Opera 11.10+ */
185 background: -ms-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%); /* IE10+ */
186 background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%); /* W3C */
187 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#88bfe8', endColorstr='#70b0e0',GradientType=0 ); /* IE6-9 */
188
189 background-image: -webkit-gradient(linear, left top, left bottom, rgb(255,255,255) 0%, rgb(255,255,255) 100%);
190
191 /*border-radius: 4px;*/
192 }
193
194
195 #content #context-actions li:first-child {
196 border-left: none;
197 border-radius:4px 0 0px 4px;
198 }
199
200 #content #context-actions li:last-child {
201 border-right: none;
202 border-radius:0 4px 4px 0;
203 }
204
205 #content #context-actions .icon{
206 margin: auto;
207 margin-bottom: 5px;
208 display: block;
209 clear: both;
210 float: none;
211 }
212
213 #content #context-actions button.follow,
214 #content #context-actions button.following{
215 width: auto;
216 float: none;
217 }
218
219 #content #context-actions button .show-following,
220 #content #context-actions button .show-follow {
221 display: none;
222 }
223
224 #content #context-bar #context-actions button.follow .show-follow {
225 display: block;
226 }
227
228 #content #context-bar #context-actions button.following .show-following {
229 display: block;
230 }
231
232 #context-state {
233 background-color: #336699;
234 border-top: 1px solid #517da8;
235 /* overflow: hidden;*/
236 }
237
238 #context-pages {
239 float: right;
240 border-left: 1px solid rgba(0,0,0,0.1);
241 /* overflow: hidden;*/
242 }
243
244 #context-pages li.current{
245 background: #535353; /* Old browsers */
246 background: -moz-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* FF3.6+ */
247 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5d5d5d), color-stop(100%,#484848)); /* Chrome,Safari4+ */
248 background: -webkit-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* Chrome10+,Safari5.1+ */
249 background: -o-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* Opera 11.10+ */
250 background: -ms-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* IE10+ */
251 background: linear-gradient(to bottom, #5d5d5d 0%, #484848 100%); /* W3C */
252 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5d5d5d', endColorstr='#484848',GradientType=0 ); /* IE6-9 */
253 }
254
255 #content #context-pages .icon {
256 margin-right:5px;
257 }
258
259 #content #context-pages li {
260 border-right: 1px solid rgba(0,0,0,0.1);
261 border-left: 1px solid rgba(255,255,255,0.1);
262 padding: 0;
263 }
264
265 #content #context-pages li:last-child {
266 border-right:none;
267 }
268
269 #context-pages a,
270 #context-pages .admin_menu a{
271 display: block;
272 padding: 0px 10px;
273 padding-left: 30px;
274 line-height: 35px;
275 }
276
277 #revision-changer:before,
278 #context-pages a.childs:after,
279 #context-pages a.dropdown:after {
280 content: ' \25BE';
281 }
282 #context-pages a.childs:after{
283 float: right;
284 padding-left: 5px;
285 }
286
287 #revision-changer:before {
288 position: absolute;
289 top: 0px;
290 right: 0px;
291 border-right: 1px solid rgba(0,0,0,0.1);
292 height: 25px;
293 padding-top: 10px;
294 padding-right: 10px;
295 }
296
297 #context-pages li:last-child a {
298 padding-right: 10px;
299 }
300
301 #context-bar #revision-changer {
302 position: relative;
303 cursor: pointer;
304 border: none;
305 padding: 0;
306 margin: 0;
307 color: #FFFFFF;
308 font-size: 0.85em;
309 padding: 2px 15px;
310 padding-bottom: 3px;
311 padding-right: 30px;
312 border-right: 1px solid rgba(255,255,255,0.1);
313 }
314
315 #revision-changer .branch-name,
316 #revision-changer .revision {
317 display: block;
318 text-align: center;
319 line-height: 1.5em;
320 }
321
322 #revision-changer .branch-name {
323 font-weight: bold;
324 }
325
326 #revision-changer .revision{
327 text-transform: uppercase;
328 }
329
330
@@ -316,6 +316,8 b' class BaseRepoController(BaseController)'
316 316 c.rhodecode_db_repo: instance of db
317 317 c.repository_followers: number of followers
318 318 c.repository_forks: number of forks
319 c.repository_following: weather the current user is following the current repo
320
319 321 """
320 322
321 323 def __before__(self):
@@ -336,3 +338,5 b' class BaseRepoController(BaseController)'
336 338 c.repository_followers = self.scm_model.get_followers(dbr)
337 339 c.repository_forks = self.scm_model.get_forks(dbr)
338 340 c.repository_pull_requests = self.scm_model.get_pull_requests(dbr)
341 c.repository_following = self.scm_model.is_following_repo(c.repo_name,
342 self.rhodecode_user.user_id)
@@ -905,13 +905,13 b' def repo_link(groups_and_repos, last_url'
905 905
906 906 if not groups:
907 907 if last_url:
908 return last_link
909 return repo_name
908 return literal('<span>%s</span>' % last_link)
909 return literal('<span>%s</span>' % repo_name)
910 910 else:
911 911 def make_link(group):
912 912 return link_to(group.name,
913 913 url('repos_group_home', group_name=group.group_name))
914 return literal(' &raquo; '.join(map(make_link, groups) + [last_link]))
914 return literal(' &raquo; '.join(map(make_link, groups) + ['<span>' + last_link + '</span>']))
915 915
916 916
917 917 def fancy_file_stats(stats):
@@ -3501,7 +3501,7 b' div.gravatar img {'
3501 3501
3502 3502 #content {
3503 3503 clear: both;
3504 overflow: hidden;
3504 /*overflow: hidden;*/
3505 3505 padding: 10px 10px 14px 10px;
3506 3506 }
3507 3507
@@ -509,7 +509,7 b' var show_changeset_tooltip = function(){'
509 509 };
510 510
511 511 var onSuccessFollow = function(target){
512 var f = YUD.get(target.id);
512 var f = YUD.get(target);
513 513 var f_cnt = YUD.get('current_followers_count');
514 514
515 515 if(YUD.hasClass(f, 'follow')){
@@ -576,6 +576,7 b' var showRepoSize = function(target, repo'
576 576 return false;
577 577 }
578 578
579
579 580 /**
580 581 * TOOLTIP IMPL.
581 582 */
@@ -18,6 +18,7 b''
18 18 </%def>
19 19
20 20 <%def name="main()">
21 ${self.context_bar('options')}
21 22 <div class="box box-left">
22 23 <!-- box / title -->
23 24 <div class="title">
@@ -61,6 +61,146 b''
61 61 </div>
62 62 </%def>
63 63
64 <%def name="context_bar(current=None)">
65 %if c.repo_name:
66 ${repo_context_bar(current)}
67 %endif
68 </%def>
69
70 <%def name="repo_context_bar(current=None)">
71 <%
72 def follow_class():
73 if c.repository_following:
74 return h.literal('following')
75 else:
76 return h.literal('follow')
77 %>
78 <%
79 def is_current(selected):
80 if selected == current:
81 return h.literal('class="current"')
82 %>
83
84 <!--- CONTEXT BAR -->
85 <div id="context-bar" class="box">
86 <div id="context-top">
87 <div id= "breadcrumbs">
88 ${h.link_to(_(u'Repositories'),h.url('home'))}
89 »
90 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
91 </div>
92 ## TODO: this check feels wrong, it would be better to have a check for permissions
93 ## also it feels like a job for the controller
94 %if c.rhodecode_user.username != 'default':
95 <ul id="context-actions" class="horizontal-list">
96 <li>
97 <button class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
98 <!--span class="icon show-follow follow"></span>
99 <span class="icon show-following following"></span-->
100 <span class="show-follow">${_('Follow')}</span>
101 <span class="show-following">${_('Unfollow')}</span>
102 </button>
103 </li>
104 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
105 %if h.is_hg(c.rhodecode_repo):
106 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Pull Request')}</a></li>
107 %endif
108 </ul>
109 %endif
110 </div>
111 <div id="context-state">
112 <button id="revision-changer">
113 <span class="branch-name">graphics/shader-move</span>
114 <span class="revision">@73318:8d3d6ee94072</span>
115 </button>
116 <ul id="context-pages" class="horizontal-list">
117 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
118 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelogs')}</a></li>
119 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
120 <li>
121 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
122 <ul id="switch_to_list_2" class="switch_to submenu">
123 <li><a href="#">${_('loading...')}</a></li>
124 </ul>
125 </li>
126 <li ${is_current('options')}>
127 <a href="#" class="dropdown options"></span>Options</a>
128 <ul>
129 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
130 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
131 <li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
132 %else:
133 <li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
134 %endif
135 %endif
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'),class_='compare_request')}</li>
138 %endif
139 <li>${h.link_to(_('lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
140 <li>${h.link_to(_('search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
141
142 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
143 %if c.rhodecode_db_repo.locked[0]:
144 <li>${h.link_to(_('unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
145 %else:
146 <li>${h.link_to(_('lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
147 %endif
148 %endif
149
150 % if h.HasPermissionAll('hg.admin')('access admin main page'):
151 <li>
152 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin childs')}
153 <%def name="admin_menu()">
154 <ul class="admin_menu">
155 <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal')}</li>
156 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
157 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
158 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
159 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
160 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
161 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
162 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
163 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
164 </ul>
165 </%def>
166 ## ADMIN MENU
167 ${admin_menu()}
168 </li>
169 ## if you're a admin of any groups, show admin menu for it
170 % elif c.rhodecode_user.groups_admin:
171 <li>
172 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
173 <%def name="admin_menu_simple()">
174 <ul>
175 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
176 </ul>
177 </%def>
178 ## ADMIN MENU
179 ${admin_menu_simple()}
180 </li>
181 % endif
182 </ul>
183 </li>
184 <li ${is_current('showpullrequest')}><a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">1</a></li>
185 </ul>
186 </div>
187 </div>
188 <script type="text/javascript">
189 YUE.on('branch_tag_switcher_2','mouseover',function(){
190 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
191 if(!loaded){
192 YUD.addClass('branch_tag_switcher_2','loaded');
193 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2',
194 function(o){},
195 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
196 ,null);
197 }
198 return false;
199 });
200 </script>
201 <!--- END CONTEXT BAR -->
202 </%def>
203
64 204 <%def name="usermenu()">
65 205 ## USER MENU
66 206 <li>
@@ -164,109 +304,6 b''
164 304 ## we render this menu only not for those pages
165 305 %if current not in ['home','admin', 'search', 'journal']:
166 306 ##REGULAR MENU
167 <li ${is_current('summary')}>
168 <a class="menu_link" title="${_('Summary page')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
169 <span class="icon">
170 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
171 </span>
172 <span>${_('Summary')}</span>
173 </a>
174 </li>
175 <li ${is_current('changelog')}>
176 <a class="menu_link" title="${_('Changeset list')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
177 <span class="icon">
178 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
179 </span>
180 <span>${_('Changelog')}</span>
181 </a>
182 </li>
183 <li ${is_current('switch_to')}>
184 <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#">
185 <span class="icon">
186 <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" />
187 </span>
188 <span>${_('Switch to')}</span>
189 </a>
190 <ul id="switch_to_list" class="switch_to">
191 <li><a href="#">${_('loading...')}</a></li>
192 </ul>
193 </li>
194 <li ${is_current('files')}>
195 <a class="menu_link" title="${_('Show repository content')}" href="${h.url('files_home',repo_name=c.repo_name)}">
196 <span class="icon">
197 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
198 </span>
199 <span>${_('Files')}</span>
200 </a>
201 </li>
202 <li ${is_current('options')}>
203 <a class="menu_link" title="${_('Options')}" href="#">
204 <span class="icon">
205 <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" />
206 </span>
207 <span>${_('Options')}</span>
208 </a>
209 <ul>
210 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
211 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
212 <li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
213 %else:
214 <li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
215 %endif
216 %endif
217
218 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
219 %if h.is_hg(c.rhodecode_repo):
220 <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li>
221 %endif
222 %if c.rhodecode_db_repo.fork:
223 <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'),class_='compare_request')}</li>
224 %endif
225 <li>${h.link_to(_('lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
226 <li>${h.link_to(_('search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
227
228 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
229 %if c.rhodecode_db_repo.locked[0]:
230 <li>${h.link_to(_('unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
231 %else:
232 <li>${h.link_to(_('lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
233 %endif
234 %endif
235
236 % if h.HasPermissionAll('hg.admin')('access admin main page'):
237 <li>
238 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
239 <%def name="admin_menu()">
240 <ul>
241 <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal')}</li>
242 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
243 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
244 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
245 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
246 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
247 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
248 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
249 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
250 </ul>
251 </%def>
252 ## ADMIN MENU
253 ${admin_menu()}
254 </li>
255 ## if you're a admin of any groups, show admin menu for it
256 % elif c.rhodecode_user.groups_admin:
257 <li>
258 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
259 <%def name="admin_menu_simple()">
260 <ul>
261 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
262 </ul>
263 </%def>
264 ## ADMIN MENU
265 ${admin_menu_simple()}
266 </li>
267 % endif
268 </ul>
269 </li>
270 307 <li>
271 308 <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
272 309 <span class="icon_short">
@@ -283,14 +320,6 b''
283 320 <span class="short">${c.repository_forks}</span>
284 321 </a>
285 322 </li>
286 <li>
287 <a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}">
288 <span class="icon_short">
289 <img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" />
290 </span>
291 <span class="short">${c.repository_pull_requests}</span>
292 </a>
293 </li>
294 323 ${usermenu()}
295 324 <script type="text/javascript">
296 325 YUE.on('branch_tag_switcher','mouseover',function(){
@@ -11,6 +11,8 b''
11 11 <%def name="css()">
12 12 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/>
13 13 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/>
14
15 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.rhodecode_version)}"/>
14 16 ## EXTRA FOR CSS
15 17 ${self.css_extra()}
16 18 </%def>
@@ -20,6 +20,7 b''
20 20 </%def>
21 21
22 22 <%def name="main()">
23 ${self.context_bar('changelog')}
23 24 <div class="box">
24 25 <!-- box / title -->
25 26 <div class="title">
@@ -20,6 +20,7 b''
20 20 </%def>
21 21
22 22 <%def name="main()">
23 ${self.context_bar('files')}
23 24 <div class="box">
24 25 <!-- box / title -->
25 26 <div class="title">
@@ -13,7 +13,7 b''
13 13 </%def>
14 14
15 15 <%def name="main()">
16
16 ${self.context_bar('showpullrequest')}
17 17 <div class="box">
18 18 <!-- box / title -->
19 19 <div class="title">
@@ -33,7 +33,7 b''
33 33 %endif
34 34 </%def>
35 35 <%def name="main()">
36
36 ${self.context_bar('options')}
37 37 <div class="box">
38 38 <!-- box / title -->
39 39 <div class="title">
@@ -24,6 +24,7 b''
24 24 ${self.menu('shortlog')}
25 25 </%def>
26 26 <%def name="main()">
27 ${self.context_bar('options')}
27 28 <div class="box">
28 29 <!-- box / title -->
29 30 <div class="title">
@@ -22,6 +22,7 b''
22 22 </%def>
23 23
24 24 <%def name="main()">
25 ${self.context_bar('summary')}
25 26 <%
26 27 summary = lambda n:{False:'summary-short'}.get(n)
27 28 %>
@@ -96,7 +97,7 b''
96 97
97 98 ##FORK
98 99 %if c.dbrepo.fork:
99 <div style="margin-top:5px;clear:both"">
100 <div style="margin-top:5px;clear:both">
100 101 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/>
101 102 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
102 103 </a>
General Comments 0
You need to be logged in to leave comments. Login now