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