##// END OF EJS Templates
when logged in as admin the repo settings will point to admin settings.
marcink -
r916:41532107 beta
parent child Browse files
Show More
@@ -1,381 +1,385
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 <head>
4 <head>
5 <title>${next.title()}</title>
5 <title>${next.title()}</title>
6 <link rel="icon" href="/images/icons/database_gear.png" type="image/png" />
6 <link rel="icon" href="/images/icons/database_gear.png" type="image/png" />
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 <meta name="robots" content="index, nofollow"/>
8 <meta name="robots" content="index, nofollow"/>
9 <!-- stylesheets -->
9 <!-- stylesheets -->
10 ${self.css()}
10 ${self.css()}
11 <!-- scripts -->
11 <!-- scripts -->
12 ${self.js()}
12 ${self.js()}
13 %if c.ga_code:
13 %if c.ga_code:
14 <script type="text/javascript">
14 <script type="text/javascript">
15
15
16 var _gaq = _gaq || [];
16 var _gaq = _gaq || [];
17 _gaq.push(['_setAccount', '${c.ga_code}']);
17 _gaq.push(['_setAccount', '${c.ga_code}']);
18 _gaq.push(['_trackPageview']);
18 _gaq.push(['_trackPageview']);
19
19
20 (function() {
20 (function() {
21 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
21 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
22 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
22 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
23 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
23 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
24 })();
24 })();
25
25
26
26
27 </script>
27 </script>
28 %endif
28 %endif
29 </head>
29 </head>
30 <body>
30 <body>
31 <!-- header -->
31 <!-- header -->
32 <div id="header">
32 <div id="header">
33 <!-- user -->
33 <!-- user -->
34 <ul id="logged-user">
34 <ul id="logged-user">
35 <li class="first">
35 <li class="first">
36 <div class="gravatar">
36 <div class="gravatar">
37 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" />
37 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" />
38 </div>
38 </div>
39 <div class="account">
39 <div class="account">
40 %if c.rhodecode_user.username == 'default':
40 %if c.rhodecode_user.username == 'default':
41 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
41 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
42 ${h.link_to('anonymous',h.url('register'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
42 ${h.link_to('anonymous',h.url('register'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
43 %else:
43 %else:
44 ${h.link_to('anonymous',h.url('#'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
44 ${h.link_to('anonymous',h.url('#'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
45 %endif
45 %endif
46
46
47 %else:
47 %else:
48 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
48 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
49 %endif
49 %endif
50 </div>
50 </div>
51 </li>
51 </li>
52 <li>
52 <li>
53 <a href="${h.url('home')}">${_('Home')}</a>
53 <a href="${h.url('home')}">${_('Home')}</a>
54 </li>
54 </li>
55 %if c.rhodecode_user.username != 'default':
55 %if c.rhodecode_user.username != 'default':
56 <li>
56 <li>
57 <a href="${h.url('journal')}">${_('Journal')}</a>
57 <a href="${h.url('journal')}">${_('Journal')}</a>
58 ##(${c.unread_journal})</a>
58 ##(${c.unread_journal})</a>
59 </li>
59 </li>
60 %endif
60 %endif
61 %if c.rhodecode_user.username == 'default':
61 %if c.rhodecode_user.username == 'default':
62 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li>
62 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li>
63 %else:
63 %else:
64 <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li>
64 <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li>
65 %endif
65 %endif
66 </ul>
66 </ul>
67 <!-- end user -->
67 <!-- end user -->
68 <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner">
68 <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner">
69 <!-- logo -->
69 <!-- logo -->
70 <div id="logo">
70 <div id="logo">
71 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
71 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
72 </div>
72 </div>
73 <!-- end logo -->
73 <!-- end logo -->
74 <!-- menu -->
74 <!-- menu -->
75 ${self.page_nav()}
75 ${self.page_nav()}
76 <!-- quick -->
76 <!-- quick -->
77 </div>
77 </div>
78 </div>
78 </div>
79 <!-- end header -->
79 <!-- end header -->
80
80
81 <!-- CONTENT -->
81 <!-- CONTENT -->
82 <div id="content">
82 <div id="content">
83 <div class="flash_msg">
83 <div class="flash_msg">
84 <% messages = h.flash.pop_messages() %>
84 <% messages = h.flash.pop_messages() %>
85 % if messages:
85 % if messages:
86 <ul id="flash-messages">
86 <ul id="flash-messages">
87 % for message in messages:
87 % for message in messages:
88 <li class="${message.category}_msg">${message}</li>
88 <li class="${message.category}_msg">${message}</li>
89 % endfor
89 % endfor
90 </ul>
90 </ul>
91 % endif
91 % endif
92 </div>
92 </div>
93 <div id="main">
93 <div id="main">
94 ${next.main()}
94 ${next.main()}
95 </div>
95 </div>
96 </div>
96 </div>
97 <!-- END CONTENT -->
97 <!-- END CONTENT -->
98
98
99 <!-- footer -->
99 <!-- footer -->
100 <div id="footer">
100 <div id="footer">
101 <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner">
101 <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner">
102 <div>
102 <div>
103 <p class="footer-link">${h.link_to(_('Submit a bug'),h.url('bugtracker'))}</p>
103 <p class="footer-link">${h.link_to(_('Submit a bug'),h.url('bugtracker'))}</p>
104 <p class="footer-link">${h.link_to(_('GPL license'),h.url('gpl_license'))}</p>
104 <p class="footer-link">${h.link_to(_('GPL license'),h.url('gpl_license'))}</p>
105 <p>RhodeCode ${c.rhodecode_version} &copy; 2010 by Marcin Kuzminski</p>
105 <p>RhodeCode ${c.rhodecode_version} &copy; 2010 by Marcin Kuzminski</p>
106 </div>
106 </div>
107 </div>
107 </div>
108 <script type="text/javascript">${h.tooltip.activate()}</script>
108 <script type="text/javascript">${h.tooltip.activate()}</script>
109 </div>
109 </div>
110 <!-- end footer -->
110 <!-- end footer -->
111 </body>
111 </body>
112
112
113 </html>
113 </html>
114
114
115 ### MAKO DEFS ###
115 ### MAKO DEFS ###
116 <%def name="page_nav()">
116 <%def name="page_nav()">
117 ${self.menu()}
117 ${self.menu()}
118 </%def>
118 </%def>
119
119
120 <%def name="menu(current=None)">
120 <%def name="menu(current=None)">
121 <%
121 <%
122 def is_current(selected):
122 def is_current(selected):
123 if selected == current:
123 if selected == current:
124 return h.literal('class="current"')
124 return h.literal('class="current"')
125 %>
125 %>
126 %if current not in ['home','admin']:
126 %if current not in ['home','admin']:
127 ##REGULAR MENU
127 ##REGULAR MENU
128 <ul id="quick">
128 <ul id="quick">
129 <!-- repo switcher -->
129 <!-- repo switcher -->
130 <li>
130 <li>
131 <a id="repo_switcher" title="${_('Switch repository')}" href="#">
131 <a id="repo_switcher" title="${_('Switch repository')}" href="#">
132 <span class="icon">
132 <span class="icon">
133 <img src="/images/icons/database.png" alt="${_('Products')}" />
133 <img src="/images/icons/database.png" alt="${_('Products')}" />
134 </span>
134 </span>
135 <span>&darr;</span>
135 <span>&darr;</span>
136 </a>
136 </a>
137 <ul class="repo_switcher">
137 <ul class="repo_switcher">
138 %for repo in c.cached_repo_list:
138 %for repo in c.cached_repo_list:
139
139
140 %if repo['repo'].dbrepo.private:
140 %if repo['repo'].dbrepo.private:
141 <li><img src="/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>
141 <li><img src="/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>
142 %else:
142 %else:
143 <li><img src="/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>
143 <li><img src="/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>
144 %endif
144 %endif
145 %endfor
145 %endfor
146 </ul>
146 </ul>
147 </li>
147 </li>
148
148
149 <li ${is_current('summary')}>
149 <li ${is_current('summary')}>
150 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
150 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
151 <span class="icon">
151 <span class="icon">
152 <img src="/images/icons/clipboard_16.png" alt="${_('Summary')}" />
152 <img src="/images/icons/clipboard_16.png" alt="${_('Summary')}" />
153 </span>
153 </span>
154 <span>${_('Summary')}</span>
154 <span>${_('Summary')}</span>
155 </a>
155 </a>
156 </li>
156 </li>
157 ##<li ${is_current('shortlog')}>
157 ##<li ${is_current('shortlog')}>
158 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
158 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
159 ## <span class="icon">
159 ## <span class="icon">
160 ## <img src="/images/icons/application_view_list.png" alt="${_('Shortlog')}" />
160 ## <img src="/images/icons/application_view_list.png" alt="${_('Shortlog')}" />
161 ## </span>
161 ## </span>
162 ## <span>${_('Shortlog')}</span>
162 ## <span>${_('Shortlog')}</span>
163 ## </a>
163 ## </a>
164 ##</li>
164 ##</li>
165 <li ${is_current('changelog')}>
165 <li ${is_current('changelog')}>
166 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
166 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
167 <span class="icon">
167 <span class="icon">
168 <img src="/images/icons/time.png" alt="${_('Changelog')}" />
168 <img src="/images/icons/time.png" alt="${_('Changelog')}" />
169 </span>
169 </span>
170 <span>${_('Changelog')}</span>
170 <span>${_('Changelog')}</span>
171 </a>
171 </a>
172 </li>
172 </li>
173
173
174 <li ${is_current('switch_to')}>
174 <li ${is_current('switch_to')}>
175 <a title="${_('Switch to')}" href="#">
175 <a title="${_('Switch to')}" href="#">
176 <span class="icon">
176 <span class="icon">
177 <img src="/images/icons/arrow_switch.png" alt="${_('Switch to')}" />
177 <img src="/images/icons/arrow_switch.png" alt="${_('Switch to')}" />
178 </span>
178 </span>
179 <span>${_('Switch to')}</span>
179 <span>${_('Switch to')}</span>
180 </a>
180 </a>
181 <ul>
181 <ul>
182 <li>
182 <li>
183 ${h.link_to('%s (%s)' % (_('branches'),len(c.repository_branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
183 ${h.link_to('%s (%s)' % (_('branches'),len(c.repository_branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
184 <ul>
184 <ul>
185 %if c.repository_branches.values():
185 %if c.repository_branches.values():
186 %for cnt,branch in enumerate(c.repository_branches.items()):
186 %for cnt,branch in enumerate(c.repository_branches.items()):
187 <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>
187 <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>
188 %endfor
188 %endfor
189 %else:
189 %else:
190 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
190 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
191 %endif
191 %endif
192 </ul>
192 </ul>
193 </li>
193 </li>
194 <li>
194 <li>
195 ${h.link_to('%s (%s)' % (_('tags'),len(c.repository_tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
195 ${h.link_to('%s (%s)' % (_('tags'),len(c.repository_tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
196 <ul>
196 <ul>
197 %if c.repository_tags.values():
197 %if c.repository_tags.values():
198 %for cnt,tag in enumerate(c.repository_tags.items()):
198 %for cnt,tag in enumerate(c.repository_tags.items()):
199 <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>
199 <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>
200 %endfor
200 %endfor
201 %else:
201 %else:
202 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
202 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
203 %endif
203 %endif
204 </ul>
204 </ul>
205 </li>
205 </li>
206 </ul>
206 </ul>
207 </li>
207 </li>
208 <li ${is_current('files')}>
208 <li ${is_current('files')}>
209 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
209 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
210 <span class="icon">
210 <span class="icon">
211 <img src="/images/icons/file.png" alt="${_('Files')}" />
211 <img src="/images/icons/file.png" alt="${_('Files')}" />
212 </span>
212 </span>
213 <span>${_('Files')}</span>
213 <span>${_('Files')}</span>
214 </a>
214 </a>
215 </li>
215 </li>
216
216
217 <li ${is_current('options')}>
217 <li ${is_current('options')}>
218 <a title="${_('Options')}" href="#">
218 <a title="${_('Options')}" href="#">
219 <span class="icon">
219 <span class="icon">
220 <img src="/images/icons/table_gear.png" alt="${_('Admin')}" />
220 <img src="/images/icons/table_gear.png" alt="${_('Admin')}" />
221 </span>
221 </span>
222 <span>${_('Options')}</span>
222 <span>${_('Options')}</span>
223 </a>
223 </a>
224 <ul>
224 <ul>
225 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
225 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
226 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
226 %if h.HasPermissionAll('hg.admin')('access admin main page'):
227 <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
228 %else:
229 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
230 %endif
227 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
231 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
228 %endif
232 %endif
229 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
233 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
230
234
231 %if h.HasPermissionAll('hg.admin')('access admin main page'):
235 %if h.HasPermissionAll('hg.admin')('access admin main page'):
232 <li>
236 <li>
233 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
237 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
234 <%def name="admin_menu()">
238 <%def name="admin_menu()">
235 <ul>
239 <ul>
236 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
240 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
237 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
241 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
238 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
242 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
239 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
243 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
240 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
244 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
241 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
245 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
242 </ul>
246 </ul>
243 </%def>
247 </%def>
244
248
245 ${admin_menu()}
249 ${admin_menu()}
246 </li>
250 </li>
247 %endif
251 %endif
248
252
249 </ul>
253 </ul>
250 </li>
254 </li>
251
255
252 <li>
256 <li>
253 <a title="${_('Followers')}" href="#">
257 <a title="${_('Followers')}" href="#">
254 <span class="icon_short">
258 <span class="icon_short">
255 <img src="/images/icons/heart.png" alt="${_('Followers')}" />
259 <img src="/images/icons/heart.png" alt="${_('Followers')}" />
256 </span>
260 </span>
257 <span class="short">${c.repository_followers}</span>
261 <span class="short">${c.repository_followers}</span>
258 </a>
262 </a>
259 </li>
263 </li>
260 <li>
264 <li>
261 <a title="${_('Forks')}" href="#">
265 <a title="${_('Forks')}" href="#">
262 <span class="icon_short">
266 <span class="icon_short">
263 <img src="/images/icons/arrow_divide.png" alt="${_('Forks')}" />
267 <img src="/images/icons/arrow_divide.png" alt="${_('Forks')}" />
264 </span>
268 </span>
265 <span class="short">${c.repository_forks}</span>
269 <span class="short">${c.repository_forks}</span>
266 </a>
270 </a>
267 </li>
271 </li>
268
272
269
273
270
274
271 </ul>
275 </ul>
272 %else:
276 %else:
273 ##ROOT MENU
277 ##ROOT MENU
274 <ul id="quick">
278 <ul id="quick">
275 <li>
279 <li>
276 <a title="${_('Home')}" href="${h.url('home')}">
280 <a title="${_('Home')}" href="${h.url('home')}">
277 <span class="icon">
281 <span class="icon">
278 <img src="/images/icons/home_16.png" alt="${_('Home')}" />
282 <img src="/images/icons/home_16.png" alt="${_('Home')}" />
279 </span>
283 </span>
280 <span>${_('Home')}</span>
284 <span>${_('Home')}</span>
281 </a>
285 </a>
282 </li>
286 </li>
283 %if c.rhodecode_user.username != 'default':
287 %if c.rhodecode_user.username != 'default':
284 <li>
288 <li>
285 <a title="${_('Journal')}" href="${h.url('journal')}">
289 <a title="${_('Journal')}" href="${h.url('journal')}">
286 <span class="icon">
290 <span class="icon">
287 <img src="/images/icons/book.png" alt="${_('Journal')}" />
291 <img src="/images/icons/book.png" alt="${_('Journal')}" />
288 </span>
292 </span>
289 <span>${_('Journal')}</span>
293 <span>${_('Journal')}</span>
290 </a>
294 </a>
291 </li>
295 </li>
292 %endif
296 %endif
293 <li>
297 <li>
294 <a title="${_('Search')}" href="${h.url('search')}">
298 <a title="${_('Search')}" href="${h.url('search')}">
295 <span class="icon">
299 <span class="icon">
296 <img src="/images/icons/search_16.png" alt="${_('Search')}" />
300 <img src="/images/icons/search_16.png" alt="${_('Search')}" />
297 </span>
301 </span>
298 <span>${_('Search')}</span>
302 <span>${_('Search')}</span>
299 </a>
303 </a>
300 </li>
304 </li>
301
305
302 %if h.HasPermissionAll('hg.admin')('access admin main page'):
306 %if h.HasPermissionAll('hg.admin')('access admin main page'):
303 <li ${is_current('admin')}>
307 <li ${is_current('admin')}>
304 <a title="${_('Admin')}" href="${h.url('admin_home')}">
308 <a title="${_('Admin')}" href="${h.url('admin_home')}">
305 <span class="icon">
309 <span class="icon">
306 <img src="/images/icons/cog_edit.png" alt="${_('Admin')}" />
310 <img src="/images/icons/cog_edit.png" alt="${_('Admin')}" />
307 </span>
311 </span>
308 <span>${_('Admin')}</span>
312 <span>${_('Admin')}</span>
309 </a>
313 </a>
310 ${admin_menu()}
314 ${admin_menu()}
311 </li>
315 </li>
312 %endif
316 %endif
313 </ul>
317 </ul>
314 %endif
318 %endif
315 </%def>
319 </%def>
316
320
317
321
318 <%def name="css()">
322 <%def name="css()">
319 <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
323 <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
320 <link rel="stylesheet" type="text/css" href="/css/pygments.css" />
324 <link rel="stylesheet" type="text/css" href="/css/pygments.css" />
321 <link rel="stylesheet" type="text/css" href="/css/diff.css" />
325 <link rel="stylesheet" type="text/css" href="/css/diff.css" />
322 </%def>
326 </%def>
323
327
324 <%def name="js()">
328 <%def name="js()">
325 ##<script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
329 ##<script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
326 ##<script type="text/javascript" src="/js/yui/container/container.js"></script>
330 ##<script type="text/javascript" src="/js/yui/container/container.js"></script>
327 ##<script type="text/javascript" src="/js/yui/datasource/datasource.js"></script>
331 ##<script type="text/javascript" src="/js/yui/datasource/datasource.js"></script>
328 ##<script type="text/javascript" src="/js/yui/autocomplete/autocomplete.js"></script>
332 ##<script type="text/javascript" src="/js/yui/autocomplete/autocomplete.js"></script>
329 ##<script type="text/javascript" src="/js/yui/selector/selector-min.js"></script>
333 ##<script type="text/javascript" src="/js/yui/selector/selector-min.js"></script>
330
334
331 <script type="text/javascript" src="/js/yui2a.js"></script>
335 <script type="text/javascript" src="/js/yui2a.js"></script>
332 <!--[if IE]><script language="javascript" type="text/javascript" src="/js/excanvas.min.js"></script><![endif]-->
336 <!--[if IE]><script language="javascript" type="text/javascript" src="/js/excanvas.min.js"></script><![endif]-->
333 <script type="text/javascript" src="/js/yui.flot.js"></script>
337 <script type="text/javascript" src="/js/yui.flot.js"></script>
334
338
335 <script type="text/javascript">
339 <script type="text/javascript">
336 var base_url ='/_admin/toggle_following';
340 var base_url ='/_admin/toggle_following';
337 var YUC = YAHOO.util.Connect;
341 var YUC = YAHOO.util.Connect;
338 var YUD = YAHOO.util.Dom;
342 var YUD = YAHOO.util.Dom;
339 var YUE = YAHOO.util.Event;
343 var YUE = YAHOO.util.Event;
340
344
341 function onSuccess(){
345 function onSuccess(){
342
346
343 var f = YUD.get('follow_toggle');
347 var f = YUD.get('follow_toggle');
344 if(f.getAttribute('class')=='follow'){
348 if(f.getAttribute('class')=='follow'){
345 f.setAttribute('class','following');
349 f.setAttribute('class','following');
346 f.setAttribute('title',"${_('Stop following this repository')}");
350 f.setAttribute('title',"${_('Stop following this repository')}");
347 }
351 }
348 else{
352 else{
349 f.setAttribute('class','follow');
353 f.setAttribute('class','follow');
350 f.setAttribute('title',"${_('Start following this repository')}");
354 f.setAttribute('title',"${_('Start following this repository')}");
351 }
355 }
352 }
356 }
353
357
354 function toggleFollowingUser(fallows_user_id,token){
358 function toggleFollowingUser(fallows_user_id,token){
355 args = 'follows_user_id='+fallows_user_id;
359 args = 'follows_user_id='+fallows_user_id;
356 args+= '&amp;auth_token='+token;
360 args+= '&amp;auth_token='+token;
357 YUC.asyncRequest('POST',base_url,{
361 YUC.asyncRequest('POST',base_url,{
358 success:function(o){
362 success:function(o){
359 onSuccess();
363 onSuccess();
360 }
364 }
361 },args); return false;
365 },args); return false;
362 }
366 }
363
367
364 function toggleFollowingRepo(fallows_repo_id,token){
368 function toggleFollowingRepo(fallows_repo_id,token){
365 args = 'follows_repo_id='+fallows_repo_id;
369 args = 'follows_repo_id='+fallows_repo_id;
366 args+= '&amp;auth_token='+token;
370 args+= '&amp;auth_token='+token;
367 YUC.asyncRequest('POST',base_url,{
371 YUC.asyncRequest('POST',base_url,{
368 success:function(o){
372 success:function(o){
369 onSuccess();
373 onSuccess();
370 }
374 }
371 },args); return false;
375 },args); return false;
372 }
376 }
373 </script>
377 </script>
374
378
375 </%def>
379 </%def>
376
380
377 <%def name="breadcrumbs()">
381 <%def name="breadcrumbs()">
378 <div class="breadcrumbs">
382 <div class="breadcrumbs">
379 ${self.breadcrumbs_links()}
383 ${self.breadcrumbs_links()}
380 </div>
384 </div>
381 </%def> No newline at end of file
385 </%def>
General Comments 0
You need to be logged in to leave comments. Login now