##// END OF EJS Templates
Addding context bar to more repo related pages....
leonardo -
r3529:1c32b729 beta
parent child Browse files
Show More
@@ -72,8 +72,6 b' class SummaryController(BaseRepoControll'
72
72
73 def index(self, repo_name):
73 def index(self, repo_name):
74 c.dbrepo = dbrepo = c.rhodecode_db_repo
74 c.dbrepo = dbrepo = c.rhodecode_db_repo
75 c.following = self.scm_model.is_following_repo(repo_name,
76 self.rhodecode_user.user_id)
77
75
78 def url_generator(**kw):
76 def url_generator(**kw):
79 return url('shortlog_home', repo_name=repo_name, size=10, **kw)
77 return url('shortlog_home', repo_name=repo_name, size=10, **kw)
@@ -59,9 +59,9 b' ul.horizontal-list {'
59 display: block;
59 display: block;
60 /* overflow: hidden;*/
60 /* overflow: hidden;*/
61 }
61 }
62
62 ul.horizontal-list > li {
63 ul.horizontal-list > li {
63 float: left;
64 float: left;
64 padding-right: 5px;
65 position: relative;
65 position: relative;
66 }
66 }
67
67
@@ -69,6 +69,7 b' ul.horizontal-list > li ul {'
69 position: absolute;
69 position: absolute;
70 display: none;
70 display: none;
71 right: 0;
71 right: 0;
72 z-index: 999;
72 }
73 }
73
74
74 ul.horizontal-list li:hover > ul {
75 ul.horizontal-list li:hover > ul {
@@ -270,7 +271,7 b' ul#context-actions {'
270 #context-pages a,
271 #context-pages a,
271 #context-pages .admin_menu a{
272 #context-pages .admin_menu a{
272 display: block;
273 display: block;
273 padding: 0px 10px;
274 padding: 0px 10px 1px 30px;
274 padding-left: 30px;
275 padding-left: 30px;
275 line-height: 35px;
276 line-height: 35px;
276 }
277 }
@@ -1090,7 +1090,7 b' tbody .yui-dt-editable { cursor: pointer'
1090
1090
1091 #content div.box {
1091 #content div.box {
1092 clear: both;
1092 clear: both;
1093 overflow: hidden;
1093 /* overflow: hidden;*/
1094 background: #fff;
1094 background: #fff;
1095 margin: 0 0 10px;
1095 margin: 0 0 10px;
1096 padding: 0 0 10px;
1096 padding: 0 0 10px;
@@ -1861,6 +1861,65 b' div.form div.fields div.field div.button'
1861 }
1861 }
1862
1862
1863 #summary {
1863 #summary {
1864 float: left;
1865 width: 80%;
1866 }
1867
1868 #summary-menu-stats{
1869 float: left;
1870 width: 20%;
1871 }
1872
1873 #summary-menu-stats ul {
1874 margin: 0 10px;
1875 display: block;
1876 background-color: #f9f9f9;
1877 border: 1px solid #d1d1d1;
1878 border-radius: 4px;
1879 }
1880
1881 #content #summary-menu-stats li {
1882 border-top: 1px solid #d1d1d1;
1883 line-height: 32px;
1884 padding: 0;
1885 }
1886
1887 #content #summary-menu-stats li:hover {
1888 background: #f0f0f0;
1889 }
1890
1891 #content #summary-menu-stats li:first-child {
1892 border-top: none;
1893 }
1894
1895 #summary-menu-stats a.followers { background-image: url('../images/icons/heart.png')}
1896 #summary-menu-stats a.forks { background-image: url('../images/icons/arrow_divide.png')}
1897 #summary-menu-stats a.settings { background-image: url('../images/icons/cog_edit.png')}
1898 #summary-menu-stats a.feed { background-image: url('../images/icons/rss_16.png')}
1899 #summary-menu-stats a.repo-size { background-image: url('../images/icons/server.png')}
1900
1901 #summary-menu-stats a {
1902 display: block;
1903 color: #000000;
1904 padding: 0 30px;
1905 background-repeat: no-repeat;
1906 background-position: 10px 50%;
1907 }
1908
1909 #repo_size_2 {
1910 margin-left: 25px;
1911 }
1912
1913 #summary-menu-stats a:hover {
1914 text-decoration: none;
1915 }
1916
1917 #summary-menu-stats a span{
1918 background-color: #FFF;
1919 border: 1px inset #f0f0f0;
1920 border-radius:7px;
1921 padding: 1px;
1922 font-size: 10px;
1864 }
1923 }
1865
1924
1866 #summary .metatag {
1925 #summary .metatag {
@@ -67,6 +67,26 b''
67 %endif
67 %endif
68 </%def>
68 </%def>
69
69
70 <%def name="admin_menu()">
71 <ul class="admin_menu">
72 <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal')}</li>
73 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
74 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
75 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
76 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
77 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
78 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
79 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
80 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
81 </ul>
82 </%def>
83
84 <%def name="admin_menu_simple()">
85 <ul>
86 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
87 </ul>
88 </%def>
89
70 <%def name="repo_context_bar(current=None)">
90 <%def name="repo_context_bar(current=None)">
71 <%
91 <%
72 def follow_class():
92 def follow_class():
@@ -113,12 +133,11 b''
113 <span class="branch-name">graphics/shader-move</span>
133 <span class="branch-name">graphics/shader-move</span>
114 <span class="revision">@73318:8d3d6ee94072</span>
134 <span class="revision">@73318:8d3d6ee94072</span>
115 </button-->
135 </button-->
116 &nbsp;
117 <ul id="context-pages" class="horizontal-list">
136 <ul id="context-pages" class="horizontal-list">
118 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
137 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
119 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelogs')}</a></li>
138 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelogs')}</a></li>
120 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
139 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
121 <li>
140 <li ${is_current('switch-to')}>
122 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
141 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
123 <ul id="switch_to_list_2" class="switch_to submenu">
142 <ul id="switch_to_list_2" class="switch_to submenu">
124 <li><a href="#">${_('loading...')}</a></li>
143 <li><a href="#">${_('loading...')}</a></li>
@@ -151,19 +170,6 b''
151 % if h.HasPermissionAll('hg.admin')('access admin main page'):
170 % if h.HasPermissionAll('hg.admin')('access admin main page'):
152 <li>
171 <li>
153 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin childs')}
172 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin childs')}
154 <%def name="admin_menu()">
155 <ul class="admin_menu">
156 <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal')}</li>
157 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
158 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
159 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
160 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
161 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
162 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
163 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
164 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
165 </ul>
166 </%def>
167 ## ADMIN MENU
173 ## ADMIN MENU
168 ${admin_menu()}
174 ${admin_menu()}
169 </li>
175 </li>
@@ -171,11 +177,7 b''
171 % elif c.rhodecode_user.groups_admin:
177 % elif c.rhodecode_user.groups_admin:
172 <li>
178 <li>
173 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
179 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
174 <%def name="admin_menu_simple()">
180
175 <ul>
176 <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li>
177 </ul>
178 </%def>
179 ## ADMIN MENU
181 ## ADMIN MENU
180 ${admin_menu_simple()}
182 ${admin_menu_simple()}
181 </li>
183 </li>
@@ -302,91 +304,56 b''
302 </li>
304 </li>
303 </ul>
305 </ul>
304 </li>
306 </li>
305 ## we render this menu only not for those pages
307 ##ROOT MENU
306 %if current not in ['home','admin', 'search', 'journal']:
308 %if c.rhodecode_user.username != 'default':
307 ##REGULAR MENU
309 <li ${is_current('journal')}>
308 <li>
310 <a class="menu_link" title="${_('Show recent activity')}" href="${h.url('journal')}">
309 <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
311 <span class="icon">
310 <span class="icon_short">
312 <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" />
311 <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" />
313 </span>
312 </span>
314 <span>${_('Journal')}</span>
313 <span id="current_followers_count" class="short">${c.repository_followers}</span>
315 </a>
314 </a>
315 </li>
316 <li>
317 <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
318 <span class="icon_short">
319 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" />
320 </span>
321 <span class="short">${c.repository_forks}</span>
322 </a>
323 </li>
316 </li>
324 ${usermenu()}
317 %else:
325 <script type="text/javascript">
318 <li ${is_current('journal')}>
326 YUE.on('branch_tag_switcher','mouseover',function(){
319 <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}">
327 var loaded = YUD.hasClass('branch_tag_switcher','loaded');
320 <span class="icon">
328 if(!loaded){
321 <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" />
329 YUD.addClass('branch_tag_switcher','loaded');
322 </span>
330 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list',
323 <span>${_('Public journal')}</span>
331 function(o){},
324 </a>
332 function(o){YUD.removeClass('branch_tag_switcher','loaded');}
325 </li>
333 ,null);
326 %endif
334 }
327 <li ${is_current('search')}>
335 return false;
328 <a class="menu_link" title="${_('Search in repositories')}" href="${h.url('search')}">
336 });
329 <span class="icon">
337 </script>
330 <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" />
338 %else:
331 </span>
339 ##ROOT MENU
332 <span>${_('Search')}</span>
340 %if c.rhodecode_user.username != 'default':
333 </a>
341 <li ${is_current('journal')}>
334 </li>
342 <a class="menu_link" title="${_('Show recent activity')}" href="${h.url('journal')}">
335 % if h.HasPermissionAll('hg.admin')('access admin main page'):
343 <span class="icon">
336 <li ${is_current('admin')}>
344 <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" />
337 <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
338 <span class="icon">
339 <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
345 </span>
340 </span>
346 <span>${_('Journal')}</span>
341 <span>${_('Admin')}</span>
347 </a>
342 </a>
348 </li>
343 ${admin_menu()}
349 %else:
350 <li ${is_current('journal')}>
351 <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}">
352 <span class="icon">
353 <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" />
354 </span>
355 <span>${_('Public journal')}</span>
356 </a>
357 </li>
358 %endif
359 <li ${is_current('search')}>
360 <a class="menu_link" title="${_('Search in repositories')}" href="${h.url('search')}">
361 <span class="icon">
362 <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" />
363 </span>
364 <span>${_('Search')}</span>
365 </a>
366 </li>
344 </li>
367 % if h.HasPermissionAll('hg.admin')('access admin main page'):
345 % elif c.rhodecode_user.groups_admin:
368 <li ${is_current('admin')}>
346 <li ${is_current('admin')}>
369 <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
347 <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
370 <span class="icon">
348 <span class="icon">
371 <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
349 <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
372 </span>
350 </span>
373 <span>${_('Admin')}</span>
351 <span>${_('Admin')}</span>
374 </a>
352 </a>
375 ${admin_menu()}
353 ${admin_menu_simple()}
376 </li>
354 </li>
377 % elif c.rhodecode_user.groups_admin:
355 % endif
378 <li ${is_current('admin')}>
356 ${usermenu()}
379 <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
380 <span class="icon">
381 <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" />
382 </span>
383 <span>${_('Admin')}</span>
384 </a>
385 ${admin_menu_simple()}
386 </li>
387 % endif
388 ${usermenu()}
389 %endif
390 <script type="text/javascript">
357 <script type="text/javascript">
391 YUE.on('repo_switcher','mouseover',function(){
358 YUE.on('repo_switcher','mouseover',function(){
392 var target = 'q_filter_rs';
359 var target = 'q_filter_rs';
@@ -20,6 +20,7 b''
20 </%def>
20 </%def>
21 <%def name="main()">
21 <%def name="main()">
22 <div class="box">
22 <div class="box">
23 ${self.context_bar('switch-to')}
23 <!-- box / title -->
24 <!-- box / title -->
24 <div class="title">
25 <div class="title">
25 ${self.breadcrumbs()}
26 ${self.breadcrumbs()}
@@ -19,6 +19,7 b''
19 </%def>
19 </%def>
20
20
21 <%def name="main()">
21 <%def name="main()">
22 ${self.context_bar('switch-to')}
22 <div class="box">
23 <div class="box">
23 <!-- box / title -->
24 <!-- box / title -->
24 <div class="title">
25 <div class="title">
@@ -17,6 +17,7 b''
17 ${self.menu('followers')}
17 ${self.menu('followers')}
18 </%def>
18 </%def>
19 <%def name="main()">
19 <%def name="main()">
20 ${self.context_bar('followers')}
20 <div class="box">
21 <div class="box">
21 <!-- box / title -->
22 <!-- box / title -->
22 <div class="title">
23 <div class="title">
@@ -17,6 +17,7 b''
17 ${self.menu('forks')}
17 ${self.menu('forks')}
18 </%def>
18 </%def>
19 <%def name="main()">
19 <%def name="main()">
20 ${self.context_bar('forks')}
20 <div class="box">
21 <div class="box">
21 <!-- box / title -->
22 <!-- box / title -->
22 <div class="title">
23 <div class="title">
@@ -44,30 +44,6 b''
44 <label>${_('Name')}:</label>
44 <label>${_('Name')}:</label>
45 </div>
45 </div>
46 <div class="input ${summary(c.show_stats)}">
46 <div class="input ${summary(c.show_stats)}">
47 <div style="float:right;padding:5px 0px 0px 5px">
48 %if c.rhodecode_user.username != 'default':
49 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')}
50 %else:
51 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')}
52 %endif
53 </div>
54 %if c.rhodecode_user.username != 'default':
55 %if c.following:
56 <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}"
57 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
58 </span>
59 %else:
60 <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}"
61 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
62 </span>
63 %endif
64 <div style="float:right;padding:0px 0px 0px 0px">
65 <span class="reposize tooltip" title="${_('Click to show size of repository')}"
66 onclick="javascript:showRepoSize('repo_size','${c.dbrepo.repo_name}','${str(h.get_token())}')">
67 </span>
68 <span id="repo_size"></span>
69 </div>
70 %endif:
71
47
72 ## locking icon
48 ## locking icon
73 %if c.rhodecode_db_repo.enable_locking:
49 %if c.rhodecode_db_repo.enable_locking:
@@ -189,7 +165,45 b''
189 %endif
165 %endif
190 </div>
166 </div>
191 </div>
167 </div>
192 </div>
168 </div>
169 <div id="summary-menu-stats">
170 <ul>
171 <li>
172 <a class="followers" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
173 <span id="current_followers_count">${c.repository_followers}</span>
174 ${_('Followes')}
175 </a>
176 </li>
177 <li>
178 <a class="forks" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
179 <span>${c.repository_forks}</span>
180 ${_('Forks')}
181 </a>
182 </li>
183 <li>
184 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
185 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
186 ${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}
187 %else:
188 ${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}
189 %endif
190 %endif
191 </li>
192 <li>
193 %if c.rhodecode_user.username != 'default':
194 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='feed')}
195 %else:
196 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='feed')}
197 %endif
198 </li>
199 %if c.rhodecode_user.username != 'default':
200 <li>
201 <a href="#" class="repo-size" onclick="javascript:showRepoSize('repo_size_2','${c.dbrepo.repo_name}','${str(h.get_token())}')">Repository Size</a>
202 <span id="repo_size_2"></span>
203 </li>
204 %endif
205 </ul>
206 </div>
193 </div>
207 </div>
194 </div>
208 </div>
195
209
@@ -19,6 +19,7 b''
19 ${self.menu('tags')}
19 ${self.menu('tags')}
20 </%def>
20 </%def>
21 <%def name="main()">
21 <%def name="main()">
22 ${self.context_bar('switch-to')}
22 <div class="box">
23 <div class="box">
23 <!-- box / title -->
24 <!-- box / title -->
24 <div class="title">
25 <div class="title">
General Comments 0
You need to be logged in to leave comments. Login now