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