##// END OF EJS Templates
notifications: removing flash_msg #4201
lisaq -
r841:2dc73e8b default
parent child Browse files
Show More
@@ -1,74 +1,70 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 ## don't trigger flash messages on this page
5 <%def name="flash_msg()">
6 </%def>
7
8 <%def name="title()">
4 <%def name="title()">
9 ${_('%s Creating repository') % c.repo_name}
5 ${_('%s Creating repository') % c.repo_name}
10 %if c.rhodecode_name:
6 %if c.rhodecode_name:
11 &middot; ${h.branding(c.rhodecode_name)}
7 &middot; ${h.branding(c.rhodecode_name)}
12 %endif
8 %endif
13 </%def>
9 </%def>
14
10
15 <%def name="breadcrumbs_links()">
11 <%def name="breadcrumbs_links()">
16 ${_('Creating repository')} ${c.repo}
12 ${_('Creating repository')} ${c.repo}
17 </%def>
13 </%def>
18
14
19 <%def name="menu_bar_nav()">
15 <%def name="menu_bar_nav()">
20 ${self.menu_items(active='repositories')}
16 ${self.menu_items(active='repositories')}
21 </%def>
17 </%def>
22 <%def name="main()">
18 <%def name="main()">
23 <div class="box">
19 <div class="box">
24 <!-- box / title -->
20 <!-- box / title -->
25 <div class="title">
21 <div class="title">
26 ${self.breadcrumbs()}
22 ${self.breadcrumbs()}
27 </div>
23 </div>
28
24
29 <div id="progress-message">
25 <div id="progress-message">
30 ${_('Repository "%(repo_name)s" is being created, you will be redirected when this process is finished.' % {'repo_name':c.repo_name})}
26 ${_('Repository "%(repo_name)s" is being created, you will be redirected when this process is finished.' % {'repo_name':c.repo_name})}
31 </div>
27 </div>
32
28
33 <div id="progress">
29 <div id="progress">
34 <div class="progress progress-striped active">
30 <div class="progress progress-striped active">
35 <div class="progress-bar progress-bar" role="progressbar"
31 <div class="progress-bar progress-bar" role="progressbar"
36 aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
32 aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
37 </div>
33 </div>
38 </div>
34 </div>
39 </div>
35 </div>
40 </div>
36 </div>
41
37
42 <script>
38 <script>
43 (function worker() {
39 (function worker() {
44 var skipCheck = false;
40 var skipCheck = false;
45 var url = "${h.url('repo_check_home', repo_name=c.repo_name, repo=c.repo, task_id=c.task_id)}";
41 var url = "${h.url('repo_check_home', repo_name=c.repo_name, repo=c.repo, task_id=c.task_id)}";
46 $.ajax({
42 $.ajax({
47 url: url,
43 url: url,
48 complete: function(resp) {
44 complete: function(resp) {
49 if (resp.status == 200) {
45 if (resp.status == 200) {
50 var jsonResponse = resp.responseJSON;
46 var jsonResponse = resp.responseJSON;
51
47
52 if (jsonResponse === undefined) {
48 if (jsonResponse === undefined) {
53 setTimeout(function () {
49 setTimeout(function () {
54 // we might have a backend problem, try dashboard again
50 // we might have a backend problem, try dashboard again
55 window.location = "${h.url('summary_home', repo_name = c.repo)}";
51 window.location = "${h.url('summary_home', repo_name = c.repo)}";
56 }, 3000);
52 }, 3000);
57 } else {
53 } else {
58 if (skipCheck || jsonResponse.result === true) {
54 if (skipCheck || jsonResponse.result === true) {
59 // success, means go to dashboard
55 // success, means go to dashboard
60 window.location = "${h.url('summary_home', repo_name = c.repo)}";
56 window.location = "${h.url('summary_home', repo_name = c.repo)}";
61 } else {
57 } else {
62 // Schedule the next request when the current one's complete
58 // Schedule the next request when the current one's complete
63 setTimeout(worker, 1000);
59 setTimeout(worker, 1000);
64 }
60 }
65 }
61 }
66 }
62 }
67 else {
63 else {
68 window.location = "${h.url('home')}";
64 window.location = "${h.url('home')}";
69 }
65 }
70 }
66 }
71 });
67 });
72 })();
68 })();
73 </script>
69 </script>
74 </%def> No newline at end of file
70 </%def>
@@ -1,245 +1,243 b''
1 ${h.secure_form(url('admin_settings_global'), method='post')}
1 ${h.secure_form(url('admin_settings_global'), method='post')}
2
2
3 <div class="panel panel-default">
3 <div class="panel panel-default">
4 <div class="panel-heading" id="branding-options">
4 <div class="panel-heading" id="branding-options">
5 <h3 class="panel-title">${_('Branding')} <a class="permalink" href="#branding-options"></a></h3>
5 <h3 class="panel-title">${_('Branding')} <a class="permalink" href="#branding-options"></a></h3>
6 </div>
6 </div>
7 <div class="panel-body">
7 <div class="panel-body">
8 <div class="label">
8 <div class="label">
9 <label for="rhodecode_title">${_('Title')}</label>
9 <label for="rhodecode_title">${_('Title')}</label>
10 </div>
10 </div>
11 <div class="field input">
11 <div class="field input">
12 ${h.text('rhodecode_title',size=60)}
12 ${h.text('rhodecode_title',size=60)}
13 </div>
13 </div>
14 <div class="field">
14 <div class="field">
15 <span class="help-block">
15 <span class="help-block">
16 ${_('Set a custom title for your RhodeCode instance (limited to 40 characters).')}
16 ${_('Set a custom title for your RhodeCode instance (limited to 40 characters).')}
17 </span>
17 </span>
18 </div>
18 </div>
19 <div class="label">
19 <div class="label">
20 <label for="rhodecode_realm">${_('HTTP[S] authentication realm')}</label>
20 <label for="rhodecode_realm">${_('HTTP[S] authentication realm')}</label>
21 </div>
21 </div>
22 <div class="field input">
22 <div class="field input">
23 ${h.text('rhodecode_realm',size=60)}
23 ${h.text('rhodecode_realm',size=60)}
24 </div>
24 </div>
25 <div class="field">
25 <div class="field">
26 <span class="help-block">
26 <span class="help-block">
27 ${_('Set a custom text that is shown as authentication message to clients trying to connect.')}
27 ${_('Set a custom text that is shown as authentication message to clients trying to connect.')}
28 </span>
28 </span>
29 </div>
29 </div>
30 </div>
30 </div>
31 </div>
31 </div>
32
32
33 <div class="panel panel-default">
33 <div class="panel panel-default">
34 <div class="panel-heading" id="captcha-options">
34 <div class="panel-heading" id="captcha-options">
35 <h3 class="panel-title">${_('Registration Captcha')} <a class="permalink" href="#captcha-options"></a></h3>
35 <h3 class="panel-title">${_('Registration Captcha')} <a class="permalink" href="#captcha-options"></a></h3>
36 </div>
36 </div>
37 <div class="panel-body">
37 <div class="panel-body">
38 <div class="label">
38 <div class="label">
39 <label for="rhodecode_captcha_public_key">${_('Google ReCaptcha public key')}</label>
39 <label for="rhodecode_captcha_public_key">${_('Google ReCaptcha public key')}</label>
40 </div>
40 </div>
41 <div class="field input">
41 <div class="field input">
42 ${h.text('rhodecode_captcha_public_key',size=60)}
42 ${h.text('rhodecode_captcha_public_key',size=60)}
43 </div>
43 </div>
44 <div class="field">
44 <div class="field">
45 <span class="help-block">
45 <span class="help-block">
46 ${_('Public key for reCaptcha system.')}
46 ${_('Public key for reCaptcha system.')}
47 </span>
47 </span>
48 </div>
48 </div>
49
49
50 <div class="label">
50 <div class="label">
51 <label for="rhodecode_captcha_private_key">${_('Google ReCaptcha private key')}</label>
51 <label for="rhodecode_captcha_private_key">${_('Google ReCaptcha private key')}</label>
52 </div>
52 </div>
53 <div class="field input">
53 <div class="field input">
54 ${h.text('rhodecode_captcha_private_key',size=60)}
54 ${h.text('rhodecode_captcha_private_key',size=60)}
55 </div>
55 </div>
56 <div class="field">
56 <div class="field">
57 <span class="help-block">
57 <span class="help-block">
58 ${_('Private key for reCaptcha system. Setting this value will enable captcha on registration')}
58 ${_('Private key for reCaptcha system. Setting this value will enable captcha on registration')}
59 </span>
59 </span>
60 </div>
60 </div>
61 </div>
61 </div>
62 </div>
62 </div>
63
63
64 <div class="panel panel-default">
64 <div class="panel panel-default">
65 <div class="panel-heading" id="header-code-options">
65 <div class="panel-heading" id="header-code-options">
66 <h3 class="panel-title">${_('Custom Header Code')} <a class="permalink" href="#header-code-options"></a></h3>
66 <h3 class="panel-title">${_('Custom Header Code')} <a class="permalink" href="#header-code-options"></a></h3>
67 </div>
67 </div>
68 <div class="panel-body">
68 <div class="panel-body">
69 <div class="select">
69 <div class="select">
70 <select id="pre_template" >
70 <select id="pre_template" >
71 <option value="#">${_('Templates...')}</option>
71 <option value="#">${_('Templates...')}</option>
72 <option value="ga">Google Analytics</option>
72 <option value="ga">Google Analytics</option>
73 <option value="clicky">Clicky</option>
73 <option value="clicky">Clicky</option>
74 <option value="server_announce">${_('Server Announcement')}</option>
74 <option value="server_announce">${_('Server Announcement')}</option>
75 </select>
75 </select>
76 </div>
76 </div>
77 <div style="padding: 10px 0px"></div>
77 <div style="padding: 10px 0px"></div>
78 <div class="textarea text-area">
78 <div class="textarea text-area">
79 ${h.textarea('rhodecode_pre_code',cols=23,rows=5,class_="medium")}
79 ${h.textarea('rhodecode_pre_code',cols=23,rows=5,class_="medium")}
80 <span class="help-block">${_('Custom js/css code added at the end of the <header/> tag.')}
80 <span class="help-block">${_('Custom js/css code added at the end of the <header/> tag.')}
81 ${_('Use <script/> or <css/> tags to define custom styling or scripting')}</span>
81 ${_('Use <script/> or <css/> tags to define custom styling or scripting')}</span>
82 </div>
82 </div>
83 </div>
83 </div>
84 </div>
84 </div>
85
85
86 <div class="panel panel-default">
86 <div class="panel panel-default">
87 <div class="panel-heading" id="footer-code-options">
87 <div class="panel-heading" id="footer-code-options">
88 <h3 class="panel-title">${_('Custom Footer Code')} <a class="permalink" href="#footer-code-options"> ¶</a></h3>
88 <h3 class="panel-title">${_('Custom Footer Code')} <a class="permalink" href="#footer-code-options"> ¶</a></h3>
89 </div>
89 </div>
90 <div class="panel-body">
90 <div class="panel-body">
91 <div class="select">
91 <div class="select">
92 <select id="post_template" >
92 <select id="post_template" >
93 <option value="#">${_('Templates...')}</option>
93 <option value="#">${_('Templates...')}</option>
94 <option value="ga">Google Analytics</option>
94 <option value="ga">Google Analytics</option>
95 <option value="clicky">Clicky</option>
95 <option value="clicky">Clicky</option>
96 <option value="server_announce">${_('Server Announcement')}</option>
96 <option value="server_announce">${_('Server Announcement')}</option>
97 </select>
97 </select>
98 </div>
98 </div>
99 <div style="padding: 10px 0px"></div>
99 <div style="padding: 10px 0px"></div>
100 <div class="textarea text-area">
100 <div class="textarea text-area">
101 ${h.textarea('rhodecode_post_code',cols=23,rows=5, class_="medium")}
101 ${h.textarea('rhodecode_post_code',cols=23,rows=5, class_="medium")}
102 <span class="help-block">${_('Custom js/css code added at the end of the <body> tag.')}
102 <span class="help-block">${_('Custom js/css code added at the end of the <body> tag.')}
103 ${_('Use <script> or <css> tags to define custom styling or scripting')}</span>
103 ${_('Use <script> or <css> tags to define custom styling or scripting')}</span>
104 </div>
104 </div>
105 </div>
105 </div>
106 </div>
106 </div>
107
107
108 <div class="buttons">
108 <div class="buttons">
109 ${h.submit('save',_('Save settings'),class_="btn")}
109 ${h.submit('save',_('Save settings'),class_="btn")}
110 ${h.reset('reset',_('Reset'),class_="btn")}
110 ${h.reset('reset',_('Reset'),class_="btn")}
111 </div>
111 </div>
112 ${h.end_form()}
112 ${h.end_form()}
113
113
114
114
115
115
116 ## TEMPLATES ##
116 ## TEMPLATES ##
117 ###############
117 ###############
118
118
119 <script id="ga_tmpl" type="text/x-template">
119 <script id="ga_tmpl" type="text/x-template">
120 <%text filter="h">
120 <%text filter="h">
121 <script>
121 <script>
122 // Google Analytics
122 // Google Analytics
123 // Put your Google Analytics code instead of _GACODE_
123 // Put your Google Analytics code instead of _GACODE_
124 var _gaq_code = '_GACODE_';
124 var _gaq_code = '_GACODE_';
125 var _gaq = _gaq || [];
125 var _gaq = _gaq || [];
126 _gaq.push(['_setAccount', _gaq_code]);
126 _gaq.push(['_setAccount', _gaq_code]);
127 _gaq.push(['_trackPageview']);
127 _gaq.push(['_trackPageview']);
128
128
129 (function() {
129 (function() {
130 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
130 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
131 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
131 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
132 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
132 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
133 })();
133 })();
134
134
135 rhodecode_statechange_callback = function(url, data){
135 rhodecode_statechange_callback = function(url, data){
136 // ANALYTICS callback on html5 history state changed
136 // ANALYTICS callback on html5 history state changed
137 // triggered by file browser, url is the new url,
137 // triggered by file browser, url is the new url,
138 // data is extra info passed from the State object
138 // data is extra info passed from the State object
139 if (typeof window._gaq !== 'undefined') {
139 if (typeof window._gaq !== 'undefined') {
140 _gaq.push(['_trackPageview', url]);
140 _gaq.push(['_trackPageview', url]);
141 }
141 }
142 };
142 };
143 </script>
143 </script>
144 </%text>
144 </%text>
145 </script>
145 </script>
146
146
147
147
148
148
149 <script id="clicky_tmpl" type="text/x-template">
149 <script id="clicky_tmpl" type="text/x-template">
150 <%text filter="h">
150 <%text filter="h">
151 <script src="//static.getclicky.com/js" type="text/javascript"></script>
151 <script src="//static.getclicky.com/js" type="text/javascript"></script>
152 <script type="text/javascript">
152 <script type="text/javascript">
153 // Clicky Analytics - should be used in the footer code section.
153 // Clicky Analytics - should be used in the footer code section.
154 // Put your Clicky code instead of _CLICKYCODE_ here,
154 // Put your Clicky code instead of _CLICKYCODE_ here,
155 // and below in the <img> tag.
155 // and below in the <img> tag.
156 var _cl_code = _CLICKYCODE_;
156 var _cl_code = _CLICKYCODE_;
157 try{clicky.init(_cl_code);}catch(e){}
157 try{clicky.init(_cl_code);}catch(e){}
158
158
159 rhodecode_statechange_callback = function(url, data){
159 rhodecode_statechange_callback = function(url, data){
160 // ANALYTICS callback on html5 history state changed
160 // ANALYTICS callback on html5 history state changed
161 // triggered by file browser, url is the new url,
161 // triggered by file browser, url is the new url,
162 // data is extra info passed from the State object
162 // data is extra info passed from the State object
163 if (typeof window.clicky !== 'undefined') {
163 if (typeof window.clicky !== 'undefined') {
164 clicky.log(url);
164 clicky.log(url);
165 }
165 }
166 }
166 }
167 </script>
167 </script>
168 <noscript>
168 <noscript>
169 // Put your clicky code in the src file.
169 // Put your clicky code in the src file.
170 <p><img alt="Clicky" width="1" height="1"
170 <p><img alt="Clicky" width="1" height="1"
171 src="//in.getclicky.com/_CLICKYCODE_ns.gif" /></p>
171 src="//in.getclicky.com/_CLICKYCODE_ns.gif" /></p>
172 </noscript>
172 </noscript>
173 </%text>
173 </%text>
174 </script>
174 </script>
175
175
176
176
177
177
178 <script id="server_announce_tmpl" type='text/x-template'>
178 <script id="server_announce_tmpl" type='text/x-template'>
179 <%text filter="h">
179 <%text filter="h">
180 <script>
180 <script>
181 // Server announcement displayed on the top of the page.
181 // Server announcement displayed on the top of the page.
182 // This can be used to send a global maintainance messages or other
182 // This can be used to send a global maintainance messages or other
183 // important messages to all users of the RhodeCode Enterprise system.
183 // important messages to all users of the RhodeCode Enterprise system.
184
184
185 $(document).ready(function(e){
185 $(document).ready(function(e){
186 // put your message below
186 // put your message below
187 var message = "TYPE YOUR MESSAGE HERE";
187 var message = "TYPE YOUR MESSAGE HERE";
188
188
189 $('#body').prepend(
189 $('#body').prepend(
190 ('<div class="flash_msg">'+
190 ('<div class="alert alert-info">_MSG_'+'</div>').replace('_MSG_', message)
191 '<div class="alert alert-info">_MSG_'+
192 '</div></div>').replace('_MSG_', message)
193 )
191 )
194 })
192 })
195 </script>
193 </script>
196 </%text>
194 </%text>
197 </script>
195 </script>
198
196
199
197
200
198
201 <script>
199 <script>
202 var pre_cm = initCodeMirror('rhodecode_pre_code', '', false);
200 var pre_cm = initCodeMirror('rhodecode_pre_code', '', false);
203 var pre_old = pre_cm.getValue();
201 var pre_old = pre_cm.getValue();
204
202
205 var post_cm = initCodeMirror('rhodecode_post_code', '', false);
203 var post_cm = initCodeMirror('rhodecode_post_code', '', false);
206 var post_old = post_cm.getValue();
204 var post_old = post_cm.getValue();
207
205
208 var get_data = function(type, old){
206 var get_data = function(type, old){
209 var get_tmpl = function(tmpl_name){
207 var get_tmpl = function(tmpl_name){
210 // unescape some stuff
208 // unescape some stuff
211 var html = htmlEnDeCode.htmlDecode($('#'+tmpl_name+'_tmpl').html());
209 var html = htmlEnDeCode.htmlDecode($('#'+tmpl_name+'_tmpl').html());
212 return html;
210 return html;
213 };
211 };
214 return {
212 return {
215 '#': old,
213 '#': old,
216 'ga': get_tmpl('ga'),
214 'ga': get_tmpl('ga'),
217 'clicky': get_tmpl('clicky'),
215 'clicky': get_tmpl('clicky'),
218 'server_announce': get_tmpl('server_announce')
216 'server_announce': get_tmpl('server_announce')
219 }[type]
217 }[type]
220 };
218 };
221
219
222 $('#pre_template').select2({
220 $('#pre_template').select2({
223 containerCssClass: 'drop-menu',
221 containerCssClass: 'drop-menu',
224 dropdownCssClass: 'drop-menu-dropdown',
222 dropdownCssClass: 'drop-menu-dropdown',
225 dropdownAutoWidth: true,
223 dropdownAutoWidth: true,
226 minimumResultsForSearch: -1
224 minimumResultsForSearch: -1
227 });
225 });
228
226
229 $('#post_template').select2({
227 $('#post_template').select2({
230 containerCssClass: 'drop-menu',
228 containerCssClass: 'drop-menu',
231 dropdownCssClass: 'drop-menu-dropdown',
229 dropdownCssClass: 'drop-menu-dropdown',
232 dropdownAutoWidth: true,
230 dropdownAutoWidth: true,
233 minimumResultsForSearch: -1
231 minimumResultsForSearch: -1
234 });
232 });
235
233
236 $('#post_template').on('change', function(e){
234 $('#post_template').on('change', function(e){
237 var sel = this.value;
235 var sel = this.value;
238 post_cm.setValue(get_data(sel, post_old))
236 post_cm.setValue(get_data(sel, post_old))
239 });
237 });
240
238
241 $('#pre_template').on('change', function(e){
239 $('#pre_template').on('change', function(e){
242 var sel = this.value;
240 var sel = this.value;
243 pre_cm.setValue(get_data(sel, pre_old))
241 pre_cm.setValue(get_data(sel, pre_old))
244 })
242 })
245 </script>
243 </script>
@@ -1,656 +1,651 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="root.html"/>
2 <%inherit file="root.html"/>
3
3
4 <div class="outerwrapper">
4 <div class="outerwrapper">
5 <!-- HEADER -->
5 <!-- HEADER -->
6 <div class="header">
6 <div class="header">
7 <div id="header-inner" class="wrapper">
7 <div id="header-inner" class="wrapper">
8 <div id="logo">
8 <div id="logo">
9 <div class="logo-wrapper">
9 <div class="logo-wrapper">
10 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
10 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
11 </div>
11 </div>
12 %if c.rhodecode_name:
12 %if c.rhodecode_name:
13 <div class="branding">- ${h.branding(c.rhodecode_name)}</div>
13 <div class="branding">- ${h.branding(c.rhodecode_name)}</div>
14 %endif
14 %endif
15 </div>
15 </div>
16 <!-- MENU BAR NAV -->
16 <!-- MENU BAR NAV -->
17 ${self.menu_bar_nav()}
17 ${self.menu_bar_nav()}
18 <!-- END MENU BAR NAV -->
18 <!-- END MENU BAR NAV -->
19 </div>
19 </div>
20 </div>
20 </div>
21 ${self.menu_bar_subnav()}
21 ${self.menu_bar_subnav()}
22 <!-- END HEADER -->
22 <!-- END HEADER -->
23
23
24 <!-- CONTENT -->
24 <!-- CONTENT -->
25 <div id="content" class="wrapper">
25 <div id="content" class="wrapper">
26 ${self.flash_msg()}
27 <div class="main">
26 <div class="main">
28 ${next.main()}
27 ${next.main()}
29 </div>
28 </div>
30 </div>
29 </div>
31 <!-- END CONTENT -->
30 <!-- END CONTENT -->
32
31
33 </div>
32 </div>
34 <!-- FOOTER -->
33 <!-- FOOTER -->
35 <div id="footer">
34 <div id="footer">
36 <div id="footer-inner" class="title wrapper">
35 <div id="footer-inner" class="title wrapper">
37 <div>
36 <div>
38 <p class="footer-link-right">
37 <p class="footer-link-right">
39 % if c.visual.show_version:
38 % if c.visual.show_version:
40 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
39 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
41 % endif
40 % endif
42 &copy; 2010-${h.datetime.today().year}, <a href="${h.url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved.
41 &copy; 2010-${h.datetime.today().year}, <a href="${h.url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved.
43 % if c.visual.rhodecode_support_url:
42 % if c.visual.rhodecode_support_url:
44 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
43 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
45 % endif
44 % endif
46 </p>
45 </p>
47 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
46 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
48 <p class="server-instance" style="display:${sid}">
47 <p class="server-instance" style="display:${sid}">
49 ## display hidden instance ID if specially defined
48 ## display hidden instance ID if specially defined
50 % if c.rhodecode_instanceid:
49 % if c.rhodecode_instanceid:
51 ${_('RhodeCode instance id: %s') % c.rhodecode_instanceid}
50 ${_('RhodeCode instance id: %s') % c.rhodecode_instanceid}
52 % endif
51 % endif
53 </p>
52 </p>
54 </div>
53 </div>
55 </div>
54 </div>
56 </div>
55 </div>
57
56
58 <!-- END FOOTER -->
57 <!-- END FOOTER -->
59
58
60 ### MAKO DEFS ###
59 ### MAKO DEFS ###
61
60
62 <%def name="menu_bar_subnav()">
61 <%def name="menu_bar_subnav()">
63 </%def>
62 </%def>
64
63
65 <%def name="flash_msg()">
66 <%include file="/base/flash_msg.html"/>
67 </%def>
68
69 <%def name="breadcrumbs(class_='breadcrumbs')">
64 <%def name="breadcrumbs(class_='breadcrumbs')">
70 <div class="${class_}">
65 <div class="${class_}">
71 ${self.breadcrumbs_links()}
66 ${self.breadcrumbs_links()}
72 </div>
67 </div>
73 </%def>
68 </%def>
74
69
75 <%def name="admin_menu()">
70 <%def name="admin_menu()">
76 <ul class="admin_menu submenu">
71 <ul class="admin_menu submenu">
77 <li><a href="${h.url('admin_home')}">${_('Admin journal')}</a></li>
72 <li><a href="${h.url('admin_home')}">${_('Admin journal')}</a></li>
78 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
73 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
79 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
74 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
80 <li><a href="${h.url('users')}">${_('Users')}</a></li>
75 <li><a href="${h.url('users')}">${_('Users')}</a></li>
81 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
76 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
82 <li><a href="${h.url('admin_permissions_application')}">${_('Permissions')}</a></li>
77 <li><a href="${h.url('admin_permissions_application')}">${_('Permissions')}</a></li>
83 <li><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
78 <li><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
84 <li><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
79 <li><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
85 <li><a href="${h.url('admin_defaults_repositories')}">${_('Defaults')}</a></li>
80 <li><a href="${h.url('admin_defaults_repositories')}">${_('Defaults')}</a></li>
86 <li class="last"><a href="${h.url('admin_settings')}">${_('Settings')}</a></li>
81 <li class="last"><a href="${h.url('admin_settings')}">${_('Settings')}</a></li>
87 </ul>
82 </ul>
88 </%def>
83 </%def>
89
84
90
85
91 <%def name="dt_info_panel(elements)">
86 <%def name="dt_info_panel(elements)">
92 <dl class="dl-horizontal">
87 <dl class="dl-horizontal">
93 %for dt, dd, title, show_items in elements:
88 %for dt, dd, title, show_items in elements:
94 <dt>${dt}:</dt>
89 <dt>${dt}:</dt>
95 <dd title="${title}">
90 <dd title="${title}">
96 %if callable(dd):
91 %if callable(dd):
97 ## allow lazy evaluation of elements
92 ## allow lazy evaluation of elements
98 ${dd()}
93 ${dd()}
99 %else:
94 %else:
100 ${dd}
95 ${dd}
101 %endif
96 %endif
102 %if show_items:
97 %if show_items:
103 <span class="btn-collapse" data-toggle="item-${h.md5(dt)[:6]}-details">${_('Show More')} </span>
98 <span class="btn-collapse" data-toggle="item-${h.md5(dt)[:6]}-details">${_('Show More')} </span>
104 %endif
99 %endif
105 </dd>
100 </dd>
106
101
107 %if show_items:
102 %if show_items:
108 <div class="collapsable-content" data-toggle="item-${h.md5(dt)[:6]}-details" style="display: none">
103 <div class="collapsable-content" data-toggle="item-${h.md5(dt)[:6]}-details" style="display: none">
109 %for item in show_items:
104 %for item in show_items:
110 <dt></dt>
105 <dt></dt>
111 <dd>${item}</dd>
106 <dd>${item}</dd>
112 %endfor
107 %endfor
113 </div>
108 </div>
114 %endif
109 %endif
115
110
116 %endfor
111 %endfor
117 </dl>
112 </dl>
118 </%def>
113 </%def>
119
114
120
115
121 <%def name="gravatar(email, size=16)">
116 <%def name="gravatar(email, size=16)">
122 <%
117 <%
123 if (size > 16):
118 if (size > 16):
124 gravatar_class = 'gravatar gravatar-large'
119 gravatar_class = 'gravatar gravatar-large'
125 else:
120 else:
126 gravatar_class = 'gravatar'
121 gravatar_class = 'gravatar'
127 %>
122 %>
128 <%doc>
123 <%doc>
129 TODO: johbo: For now we serve double size images to make it smooth
124 TODO: johbo: For now we serve double size images to make it smooth
130 for retina. This is how it worked until now. Should be replaced
125 for retina. This is how it worked until now. Should be replaced
131 with a better solution at some point.
126 with a better solution at some point.
132 </%doc>
127 </%doc>
133 <img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}">
128 <img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}">
134 </%def>
129 </%def>
135
130
136
131
137 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
132 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
138 <% email = h.email_or_none(contact) %>
133 <% email = h.email_or_none(contact) %>
139 <div class="rc-user tooltip" title="${h.author_string(email)}">
134 <div class="rc-user tooltip" title="${h.author_string(email)}">
140 ${self.gravatar(email, size)}
135 ${self.gravatar(email, size)}
141 <span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
136 <span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
142 </div>
137 </div>
143 </%def>
138 </%def>
144
139
145
140
146 ## admin menu used for people that have some admin resources
141 ## admin menu used for people that have some admin resources
147 <%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">
142 <%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">
148 <ul class="submenu">
143 <ul class="submenu">
149 %if repositories:
144 %if repositories:
150 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
145 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
151 %endif
146 %endif
152 %if repository_groups:
147 %if repository_groups:
153 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
148 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
154 %endif
149 %endif
155 %if user_groups:
150 %if user_groups:
156 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
151 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
157 %endif
152 %endif
158 </ul>
153 </ul>
159 </%def>
154 </%def>
160
155
161 <%def name="repo_page_title(repo_instance)">
156 <%def name="repo_page_title(repo_instance)">
162 <div class="title-content">
157 <div class="title-content">
163 <div class="title-main">
158 <div class="title-main">
164 ## SVN/HG/GIT icons
159 ## SVN/HG/GIT icons
165 %if h.is_hg(repo_instance):
160 %if h.is_hg(repo_instance):
166 <i class="icon-hg"></i>
161 <i class="icon-hg"></i>
167 %endif
162 %endif
168 %if h.is_git(repo_instance):
163 %if h.is_git(repo_instance):
169 <i class="icon-git"></i>
164 <i class="icon-git"></i>
170 %endif
165 %endif
171 %if h.is_svn(repo_instance):
166 %if h.is_svn(repo_instance):
172 <i class="icon-svn"></i>
167 <i class="icon-svn"></i>
173 %endif
168 %endif
174
169
175 ## public/private
170 ## public/private
176 %if repo_instance.private:
171 %if repo_instance.private:
177 <i class="icon-repo-private"></i>
172 <i class="icon-repo-private"></i>
178 %else:
173 %else:
179 <i class="icon-repo-public"></i>
174 <i class="icon-repo-public"></i>
180 %endif
175 %endif
181
176
182 ## repo name with group name
177 ## repo name with group name
183 ${h.breadcrumb_repo_link(c.rhodecode_db_repo)}
178 ${h.breadcrumb_repo_link(c.rhodecode_db_repo)}
184
179
185 </div>
180 </div>
186
181
187 ## FORKED
182 ## FORKED
188 %if repo_instance.fork:
183 %if repo_instance.fork:
189 <p>
184 <p>
190 <i class="icon-code-fork"></i> ${_('Fork of')}
185 <i class="icon-code-fork"></i> ${_('Fork of')}
191 <a href="${h.url('summary_home',repo_name=repo_instance.fork.repo_name)}">${repo_instance.fork.repo_name}</a>
186 <a href="${h.url('summary_home',repo_name=repo_instance.fork.repo_name)}">${repo_instance.fork.repo_name}</a>
192 </p>
187 </p>
193 %endif
188 %endif
194
189
195 ## IMPORTED FROM REMOTE
190 ## IMPORTED FROM REMOTE
196 %if repo_instance.clone_uri:
191 %if repo_instance.clone_uri:
197 <p>
192 <p>
198 <i class="icon-code-fork"></i> ${_('Clone from')}
193 <i class="icon-code-fork"></i> ${_('Clone from')}
199 <a href="${h.url(h.safe_str(h.hide_credentials(repo_instance.clone_uri)))}">${h.hide_credentials(repo_instance.clone_uri)}</a>
194 <a href="${h.url(h.safe_str(h.hide_credentials(repo_instance.clone_uri)))}">${h.hide_credentials(repo_instance.clone_uri)}</a>
200 </p>
195 </p>
201 %endif
196 %endif
202
197
203 ## LOCKING STATUS
198 ## LOCKING STATUS
204 %if repo_instance.locked[0]:
199 %if repo_instance.locked[0]:
205 <p class="locking_locked">
200 <p class="locking_locked">
206 <i class="icon-repo-lock"></i>
201 <i class="icon-repo-lock"></i>
207 ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}
202 ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}
208 </p>
203 </p>
209 %elif repo_instance.enable_locking:
204 %elif repo_instance.enable_locking:
210 <p class="locking_unlocked">
205 <p class="locking_unlocked">
211 <i class="icon-repo-unlock"></i>
206 <i class="icon-repo-unlock"></i>
212 ${_('Repository not locked. Pull repository to lock it.')}
207 ${_('Repository not locked. Pull repository to lock it.')}
213 </p>
208 </p>
214 %endif
209 %endif
215
210
216 </div>
211 </div>
217 </%def>
212 </%def>
218
213
219 <%def name="repo_menu(active=None)">
214 <%def name="repo_menu(active=None)">
220 <%
215 <%
221 def is_active(selected):
216 def is_active(selected):
222 if selected == active:
217 if selected == active:
223 return "active"
218 return "active"
224 %>
219 %>
225
220
226 <!--- CONTEXT BAR -->
221 <!--- CONTEXT BAR -->
227 <div id="context-bar">
222 <div id="context-bar">
228 <div class="wrapper">
223 <div class="wrapper">
229 <ul id="context-pages" class="horizontal-list navigation">
224 <ul id="context-pages" class="horizontal-list navigation">
230 <li class="${is_active('summary')}"><a class="menulink" href="${h.url('summary_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li>
225 <li class="${is_active('summary')}"><a class="menulink" href="${h.url('summary_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li>
231 <li class="${is_active('changelog')}"><a class="menulink" href="${h.url('changelog_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
226 <li class="${is_active('changelog')}"><a class="menulink" href="${h.url('changelog_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
232 <li class="${is_active('files')}"><a class="menulink" href="${h.url('files_home', repo_name=c.repo_name, revision=c.rhodecode_db_repo.landing_rev[1])}"><div class="menulabel">${_('Files')}</div></a></li>
227 <li class="${is_active('files')}"><a class="menulink" href="${h.url('files_home', repo_name=c.repo_name, revision=c.rhodecode_db_repo.landing_rev[1])}"><div class="menulabel">${_('Files')}</div></a></li>
233 <li class="${is_active('compare')}">
228 <li class="${is_active('compare')}">
234 <a class="menulink" href="${h.url('compare_home',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a>
229 <a class="menulink" href="${h.url('compare_home',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a>
235 </li>
230 </li>
236 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
231 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
237 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
232 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
238 <li class="${is_active('showpullrequest')}">
233 <li class="${is_active('showpullrequest')}">
239 <a class="menulink" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}">
234 <a class="menulink" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}">
240 %if c.repository_pull_requests:
235 %if c.repository_pull_requests:
241 <span class="pr_notifications">${c.repository_pull_requests}</span>
236 <span class="pr_notifications">${c.repository_pull_requests}</span>
242 %endif
237 %endif
243 <div class="menulabel">${_('Pull Requests')}</div>
238 <div class="menulabel">${_('Pull Requests')}</div>
244 </a>
239 </a>
245 </li>
240 </li>
246 %endif
241 %endif
247 <li class="${is_active('options')}">
242 <li class="${is_active('options')}">
248 <a class="menulink" href="#" class="dropdown"><div class="menulabel">${_('Options')} <div class="show_more"></div></div></a>
243 <a class="menulink" href="#" class="dropdown"><div class="menulabel">${_('Options')} <div class="show_more"></div></div></a>
249 <ul class="submenu">
244 <ul class="submenu">
250 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
245 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
251 <li><a href="${h.url('edit_repo',repo_name=c.repo_name)}">${_('Settings')}</a></li>
246 <li><a href="${h.url('edit_repo',repo_name=c.repo_name)}">${_('Settings')}</a></li>
252 %endif
247 %endif
253 %if c.rhodecode_db_repo.fork:
248 %if c.rhodecode_db_repo.fork:
254 <li><a href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,source_ref_type=c.rhodecode_db_repo.landing_rev[0],source_ref=c.rhodecode_db_repo.landing_rev[1], target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], merge=1)}">
249 <li><a href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,source_ref_type=c.rhodecode_db_repo.landing_rev[0],source_ref=c.rhodecode_db_repo.landing_rev[1], target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], merge=1)}">
255 ${_('Compare fork')}</a></li>
250 ${_('Compare fork')}</a></li>
256 %endif
251 %endif
257
252
258 <li><a href="${h.url('search_repo_home',repo_name=c.repo_name)}">${_('Search')}</a></li>
253 <li><a href="${h.url('search_repo_home',repo_name=c.repo_name)}">${_('Search')}</a></li>
259
254
260 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
255 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
261 %if c.rhodecode_db_repo.locked[0]:
256 %if c.rhodecode_db_repo.locked[0]:
262 <li><a class="locking_del" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
257 <li><a class="locking_del" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
263 %else:
258 %else:
264 <li><a class="locking_add" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li>
259 <li><a class="locking_add" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li>
265 %endif
260 %endif
266 %endif
261 %endif
267 %if c.rhodecode_user.username != h.DEFAULT_USER:
262 %if c.rhodecode_user.username != h.DEFAULT_USER:
268 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
263 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
269 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}">${_('Fork')}</a></li>
264 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}">${_('Fork')}</a></li>
270 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li>
265 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li>
271 %endif
266 %endif
272 %endif
267 %endif
273 </ul>
268 </ul>
274 </li>
269 </li>
275 </ul>
270 </ul>
276 </div>
271 </div>
277 <div class="clear"></div>
272 <div class="clear"></div>
278 </div>
273 </div>
279 <!--- END CONTEXT BAR -->
274 <!--- END CONTEXT BAR -->
280
275
281 </%def>
276 </%def>
282
277
283 <%def name="usermenu()">
278 <%def name="usermenu()">
284 ## USER MENU
279 ## USER MENU
285 <li id="quick_login_li">
280 <li id="quick_login_li">
286 <a id="quick_login_link" class="menulink childs">
281 <a id="quick_login_link" class="menulink childs">
287 ${gravatar(c.rhodecode_user.email, 20)}
282 ${gravatar(c.rhodecode_user.email, 20)}
288 <span class="user">
283 <span class="user">
289 %if c.rhodecode_user.username != h.DEFAULT_USER:
284 %if c.rhodecode_user.username != h.DEFAULT_USER:
290 <span class="menu_link_user">${c.rhodecode_user.username}</span><div class="show_more"></div>
285 <span class="menu_link_user">${c.rhodecode_user.username}</span><div class="show_more"></div>
291 %else:
286 %else:
292 <span>${_('Sign in')}</span>
287 <span>${_('Sign in')}</span>
293 %endif
288 %endif
294 </span>
289 </span>
295 </a>
290 </a>
296
291
297 <div class="user-menu submenu">
292 <div class="user-menu submenu">
298 <div id="quick_login">
293 <div id="quick_login">
299 %if c.rhodecode_user.username == h.DEFAULT_USER:
294 %if c.rhodecode_user.username == h.DEFAULT_USER:
300 <h4>${_('Sign in to your account')}</h4>
295 <h4>${_('Sign in to your account')}</h4>
301 ${h.form(h.route_path('login', _query={'came_from': h.url.current()}), needs_csrf_token=False)}
296 ${h.form(h.route_path('login', _query={'came_from': h.url.current()}), needs_csrf_token=False)}
302 <div class="form form-vertical">
297 <div class="form form-vertical">
303 <div class="fields">
298 <div class="fields">
304 <div class="field">
299 <div class="field">
305 <div class="label">
300 <div class="label">
306 <label for="username">${_('Username')}:</label>
301 <label for="username">${_('Username')}:</label>
307 </div>
302 </div>
308 <div class="input">
303 <div class="input">
309 ${h.text('username',class_='focus',tabindex=1)}
304 ${h.text('username',class_='focus',tabindex=1)}
310 </div>
305 </div>
311
306
312 </div>
307 </div>
313 <div class="field">
308 <div class="field">
314 <div class="label">
309 <div class="label">
315 <label for="password">${_('Password')}:</label>
310 <label for="password">${_('Password')}:</label>
316 <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'))}</span>
311 <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'))}</span>
317 </div>
312 </div>
318 <div class="input">
313 <div class="input">
319 ${h.password('password',class_='focus',tabindex=2)}
314 ${h.password('password',class_='focus',tabindex=2)}
320 </div>
315 </div>
321 </div>
316 </div>
322 <div class="buttons">
317 <div class="buttons">
323 <div class="register">
318 <div class="register">
324 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
319 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
325 ${h.link_to(_("Don't have an account ?"),h.route_path('register'))}
320 ${h.link_to(_("Don't have an account ?"),h.route_path('register'))}
326 %endif
321 %endif
327 </div>
322 </div>
328 <div class="submit">
323 <div class="submit">
329 ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)}
324 ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)}
330 </div>
325 </div>
331 </div>
326 </div>
332 </div>
327 </div>
333 </div>
328 </div>
334 ${h.end_form()}
329 ${h.end_form()}
335 %else:
330 %else:
336 <div class="">
331 <div class="">
337 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
332 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
338 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
333 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
339 <div class="email">${c.rhodecode_user.email}</div>
334 <div class="email">${c.rhodecode_user.email}</div>
340 </div>
335 </div>
341 <div class="">
336 <div class="">
342 <ol class="links">
337 <ol class="links">
343 <li>${h.link_to(_(u'My account'),h.url('my_account'))}</li>
338 <li>${h.link_to(_(u'My account'),h.url('my_account'))}</li>
344 <li class="logout">
339 <li class="logout">
345 ${h.secure_form(h.route_path('logout'))}
340 ${h.secure_form(h.route_path('logout'))}
346 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
341 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
347 ${h.end_form()}
342 ${h.end_form()}
348 </li>
343 </li>
349 </ol>
344 </ol>
350 </div>
345 </div>
351 %endif
346 %endif
352 </div>
347 </div>
353 </div>
348 </div>
354 %if c.rhodecode_user.username != h.DEFAULT_USER:
349 %if c.rhodecode_user.username != h.DEFAULT_USER:
355 <div class="pill_container">
350 <div class="pill_container">
356 % if c.unread_notifications == 0:
351 % if c.unread_notifications == 0:
357 <a class="menu_link_notifications empty" href="${h.url('notifications')}">${c.unread_notifications}</a>
352 <a class="menu_link_notifications empty" href="${h.url('notifications')}">${c.unread_notifications}</a>
358 % else:
353 % else:
359 <a class="menu_link_notifications" href="${h.url('notifications')}">${c.unread_notifications}</a>
354 <a class="menu_link_notifications" href="${h.url('notifications')}">${c.unread_notifications}</a>
360 % endif
355 % endif
361 </div>
356 </div>
362 % endif
357 % endif
363 </li>
358 </li>
364 </%def>
359 </%def>
365
360
366 <%def name="menu_items(active=None)">
361 <%def name="menu_items(active=None)">
367 <%
362 <%
368 def is_active(selected):
363 def is_active(selected):
369 if selected == active:
364 if selected == active:
370 return "active"
365 return "active"
371 return ""
366 return ""
372 %>
367 %>
373 <ul id="quick" class="main_nav navigation horizontal-list">
368 <ul id="quick" class="main_nav navigation horizontal-list">
374 <!-- repo switcher -->
369 <!-- repo switcher -->
375 <li class="${is_active('repositories')} repo_switcher_li has_select2">
370 <li class="${is_active('repositories')} repo_switcher_li has_select2">
376 <input id="repo_switcher" name="repo_switcher" type="hidden">
371 <input id="repo_switcher" name="repo_switcher" type="hidden">
377 </li>
372 </li>
378
373
379 ## ROOT MENU
374 ## ROOT MENU
380 %if c.rhodecode_user.username != h.DEFAULT_USER:
375 %if c.rhodecode_user.username != h.DEFAULT_USER:
381 <li class="${is_active('journal')}">
376 <li class="${is_active('journal')}">
382 <a class="menulink" title="${_('Show activity journal')}" href="${h.url('journal')}">
377 <a class="menulink" title="${_('Show activity journal')}" href="${h.url('journal')}">
383 <div class="menulabel">${_('Journal')}</div>
378 <div class="menulabel">${_('Journal')}</div>
384 </a>
379 </a>
385 </li>
380 </li>
386 %else:
381 %else:
387 <li class="${is_active('journal')}">
382 <li class="${is_active('journal')}">
388 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.url('public_journal')}">
383 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.url('public_journal')}">
389 <div class="menulabel">${_('Public journal')}</div>
384 <div class="menulabel">${_('Public journal')}</div>
390 </a>
385 </a>
391 </li>
386 </li>
392 %endif
387 %endif
393 <li class="${is_active('gists')}">
388 <li class="${is_active('gists')}">
394 <a class="menulink childs" title="${_('Show Gists')}" href="${h.url('gists')}">
389 <a class="menulink childs" title="${_('Show Gists')}" href="${h.url('gists')}">
395 <div class="menulabel">${_('Gists')}</div>
390 <div class="menulabel">${_('Gists')}</div>
396 </a>
391 </a>
397 </li>
392 </li>
398 <li class="${is_active('search')}">
393 <li class="${is_active('search')}">
399 <a class="menulink" title="${_('Search in repositories you have access to')}" href="${h.url('search')}">
394 <a class="menulink" title="${_('Search in repositories you have access to')}" href="${h.url('search')}">
400 <div class="menulabel">${_('Search')}</div>
395 <div class="menulabel">${_('Search')}</div>
401 </a>
396 </a>
402 </li>
397 </li>
403 % if h.HasPermissionAll('hg.admin')('access admin main page'):
398 % if h.HasPermissionAll('hg.admin')('access admin main page'):
404 <li class="${is_active('admin')}">
399 <li class="${is_active('admin')}">
405 <a class="menulink childs" title="${_('Admin settings')}" href="#" onclick="return false;">
400 <a class="menulink childs" title="${_('Admin settings')}" href="#" onclick="return false;">
406 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
401 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
407 </a>
402 </a>
408 ${admin_menu()}
403 ${admin_menu()}
409 </li>
404 </li>
410 % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
405 % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
411 <li class="${is_active('admin')}">
406 <li class="${is_active('admin')}">
412 <a class="menulink childs" title="${_('Delegated Admin settings')}">
407 <a class="menulink childs" title="${_('Delegated Admin settings')}">
413 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
408 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
414 </a>
409 </a>
415 ${admin_menu_simple(c.rhodecode_user.repositories_admin,
410 ${admin_menu_simple(c.rhodecode_user.repositories_admin,
416 c.rhodecode_user.repository_groups_admin,
411 c.rhodecode_user.repository_groups_admin,
417 c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
412 c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
418 </li>
413 </li>
419 % endif
414 % endif
420 % if c.debug_style:
415 % if c.debug_style:
421 <li class="${is_active('debug_style')}">
416 <li class="${is_active('debug_style')}">
422 <a class="menulink" title="${_('Style')}" href="${h.url('debug_style_home')}">
417 <a class="menulink" title="${_('Style')}" href="${h.url('debug_style_home')}">
423 <div class="menulabel">${_('Style')}</div>
418 <div class="menulabel">${_('Style')}</div>
424 </a>
419 </a>
425 </li>
420 </li>
426 % endif
421 % endif
427 ## render extra user menu
422 ## render extra user menu
428 ${usermenu()}
423 ${usermenu()}
429 </ul>
424 </ul>
430
425
431 <script type="text/javascript">
426 <script type="text/javascript">
432 var visual_show_public_icon = "${c.visual.show_public_icon}" == "True";
427 var visual_show_public_icon = "${c.visual.show_public_icon}" == "True";
433
428
434 /*format the look of items in the list*/
429 /*format the look of items in the list*/
435 var format = function(state, escapeMarkup){
430 var format = function(state, escapeMarkup){
436 if (!state.id){
431 if (!state.id){
437 return state.text; // optgroup
432 return state.text; // optgroup
438 }
433 }
439 var obj_dict = state.obj;
434 var obj_dict = state.obj;
440 var tmpl = '';
435 var tmpl = '';
441
436
442 if(obj_dict && state.type == 'repo'){
437 if(obj_dict && state.type == 'repo'){
443 if(obj_dict['repo_type'] === 'hg'){
438 if(obj_dict['repo_type'] === 'hg'){
444 tmpl += '<i class="icon-hg"></i> ';
439 tmpl += '<i class="icon-hg"></i> ';
445 }
440 }
446 else if(obj_dict['repo_type'] === 'git'){
441 else if(obj_dict['repo_type'] === 'git'){
447 tmpl += '<i class="icon-git"></i> ';
442 tmpl += '<i class="icon-git"></i> ';
448 }
443 }
449 else if(obj_dict['repo_type'] === 'svn'){
444 else if(obj_dict['repo_type'] === 'svn'){
450 tmpl += '<i class="icon-svn"></i> ';
445 tmpl += '<i class="icon-svn"></i> ';
451 }
446 }
452 if(obj_dict['private']){
447 if(obj_dict['private']){
453 tmpl += '<i class="icon-lock" ></i> ';
448 tmpl += '<i class="icon-lock" ></i> ';
454 }
449 }
455 else if(visual_show_public_icon){
450 else if(visual_show_public_icon){
456 tmpl += '<i class="icon-unlock-alt"></i> ';
451 tmpl += '<i class="icon-unlock-alt"></i> ';
457 }
452 }
458 }
453 }
459 if(obj_dict && state.type == 'commit') {
454 if(obj_dict && state.type == 'commit') {
460 tmpl += '<i class="icon-tag"></i>';
455 tmpl += '<i class="icon-tag"></i>';
461 }
456 }
462 if(obj_dict && state.type == 'group'){
457 if(obj_dict && state.type == 'group'){
463 tmpl += '<i class="icon-folder-close"></i> ';
458 tmpl += '<i class="icon-folder-close"></i> ';
464 }
459 }
465 tmpl += escapeMarkup(state.text);
460 tmpl += escapeMarkup(state.text);
466 return tmpl;
461 return tmpl;
467 };
462 };
468
463
469 var formatResult = function(result, container, query, escapeMarkup) {
464 var formatResult = function(result, container, query, escapeMarkup) {
470 return format(result, escapeMarkup);
465 return format(result, escapeMarkup);
471 };
466 };
472
467
473 var formatSelection = function(data, container, escapeMarkup) {
468 var formatSelection = function(data, container, escapeMarkup) {
474 return format(data, escapeMarkup);
469 return format(data, escapeMarkup);
475 };
470 };
476
471
477 $("#repo_switcher").select2({
472 $("#repo_switcher").select2({
478 cachedDataSource: {},
473 cachedDataSource: {},
479 minimumInputLength: 2,
474 minimumInputLength: 2,
480 placeholder: '<div class="menulabel">${_('Go to')} <div class="show_more"></div></div>',
475 placeholder: '<div class="menulabel">${_('Go to')} <div class="show_more"></div></div>',
481 dropdownAutoWidth: true,
476 dropdownAutoWidth: true,
482 formatResult: formatResult,
477 formatResult: formatResult,
483 formatSelection: formatSelection,
478 formatSelection: formatSelection,
484 containerCssClass: "repo-switcher",
479 containerCssClass: "repo-switcher",
485 dropdownCssClass: "repo-switcher-dropdown",
480 dropdownCssClass: "repo-switcher-dropdown",
486 escapeMarkup: function(m){
481 escapeMarkup: function(m){
487 // don't escape our custom placeholder
482 // don't escape our custom placeholder
488 if(m.substr(0,23) == '<div class="menulabel">'){
483 if(m.substr(0,23) == '<div class="menulabel">'){
489 return m;
484 return m;
490 }
485 }
491
486
492 return Select2.util.escapeMarkup(m);
487 return Select2.util.escapeMarkup(m);
493 },
488 },
494 query: $.debounce(250, function(query){
489 query: $.debounce(250, function(query){
495 self = this;
490 self = this;
496 var cacheKey = query.term;
491 var cacheKey = query.term;
497 var cachedData = self.cachedDataSource[cacheKey];
492 var cachedData = self.cachedDataSource[cacheKey];
498
493
499 if (cachedData) {
494 if (cachedData) {
500 query.callback({results: cachedData.results});
495 query.callback({results: cachedData.results});
501 } else {
496 } else {
502 $.ajax({
497 $.ajax({
503 url: "${h.url('goto_switcher_data')}",
498 url: "${h.url('goto_switcher_data')}",
504 data: {'query': query.term},
499 data: {'query': query.term},
505 dataType: 'json',
500 dataType: 'json',
506 type: 'GET',
501 type: 'GET',
507 success: function(data) {
502 success: function(data) {
508 self.cachedDataSource[cacheKey] = data;
503 self.cachedDataSource[cacheKey] = data;
509 query.callback({results: data.results});
504 query.callback({results: data.results});
510 },
505 },
511 error: function(data, textStatus, errorThrown) {
506 error: function(data, textStatus, errorThrown) {
512 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
507 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
513 }
508 }
514 })
509 })
515 }
510 }
516 })
511 })
517 });
512 });
518
513
519 $("#repo_switcher").on('select2-selecting', function(e){
514 $("#repo_switcher").on('select2-selecting', function(e){
520 e.preventDefault();
515 e.preventDefault();
521 window.location = e.choice.url;
516 window.location = e.choice.url;
522 });
517 });
523
518
524 ## Global mouse bindings ##
519 ## Global mouse bindings ##
525
520
526 // general help "?"
521 // general help "?"
527 Mousetrap.bind(['?'], function(e) {
522 Mousetrap.bind(['?'], function(e) {
528 $('#help_kb').modal({})
523 $('#help_kb').modal({})
529 });
524 });
530
525
531 // / open the quick filter
526 // / open the quick filter
532 Mousetrap.bind(['/'], function(e) {
527 Mousetrap.bind(['/'], function(e) {
533 $("#repo_switcher").select2("open");
528 $("#repo_switcher").select2("open");
534
529
535 // return false to prevent default browser behavior
530 // return false to prevent default browser behavior
536 // and stop event from bubbling
531 // and stop event from bubbling
537 return false;
532 return false;
538 });
533 });
539
534
540 // general nav g + action
535 // general nav g + action
541 Mousetrap.bind(['g h'], function(e) {
536 Mousetrap.bind(['g h'], function(e) {
542 window.location = pyroutes.url('home');
537 window.location = pyroutes.url('home');
543 });
538 });
544 Mousetrap.bind(['g g'], function(e) {
539 Mousetrap.bind(['g g'], function(e) {
545 window.location = pyroutes.url('gists', {'private':1});
540 window.location = pyroutes.url('gists', {'private':1});
546 });
541 });
547 Mousetrap.bind(['g G'], function(e) {
542 Mousetrap.bind(['g G'], function(e) {
548 window.location = pyroutes.url('gists', {'public':1});
543 window.location = pyroutes.url('gists', {'public':1});
549 });
544 });
550 Mousetrap.bind(['n g'], function(e) {
545 Mousetrap.bind(['n g'], function(e) {
551 window.location = pyroutes.url('new_gist');
546 window.location = pyroutes.url('new_gist');
552 });
547 });
553 Mousetrap.bind(['n r'], function(e) {
548 Mousetrap.bind(['n r'], function(e) {
554 window.location = pyroutes.url('new_repo');
549 window.location = pyroutes.url('new_repo');
555 });
550 });
556
551
557 % if hasattr(c, 'repo_name') and hasattr(c, 'rhodecode_db_repo'):
552 % if hasattr(c, 'repo_name') and hasattr(c, 'rhodecode_db_repo'):
558 // nav in repo context
553 // nav in repo context
559 Mousetrap.bind(['g s'], function(e) {
554 Mousetrap.bind(['g s'], function(e) {
560 window.location = pyroutes.url('summary_home', {'repo_name': REPO_NAME});
555 window.location = pyroutes.url('summary_home', {'repo_name': REPO_NAME});
561 });
556 });
562 Mousetrap.bind(['g c'], function(e) {
557 Mousetrap.bind(['g c'], function(e) {
563 window.location = pyroutes.url('changelog_home', {'repo_name': REPO_NAME});
558 window.location = pyroutes.url('changelog_home', {'repo_name': REPO_NAME});
564 });
559 });
565 Mousetrap.bind(['g F'], function(e) {
560 Mousetrap.bind(['g F'], function(e) {
566 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': '', 'search': '1'});
561 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': '', 'search': '1'});
567 });
562 });
568 Mousetrap.bind(['g f'], function(e) {
563 Mousetrap.bind(['g f'], function(e) {
569 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': ''});
564 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': ''});
570 });
565 });
571 Mousetrap.bind(['g p'], function(e) {
566 Mousetrap.bind(['g p'], function(e) {
572 window.location = pyroutes.url('pullrequest_show_all', {'repo_name': REPO_NAME});
567 window.location = pyroutes.url('pullrequest_show_all', {'repo_name': REPO_NAME});
573 });
568 });
574 Mousetrap.bind(['g o'], function(e) {
569 Mousetrap.bind(['g o'], function(e) {
575 window.location = pyroutes.url('edit_repo', {'repo_name': REPO_NAME});
570 window.location = pyroutes.url('edit_repo', {'repo_name': REPO_NAME});
576 });
571 });
577 Mousetrap.bind(['g O'], function(e) {
572 Mousetrap.bind(['g O'], function(e) {
578 window.location = pyroutes.url('edit_repo_perms', {'repo_name': REPO_NAME});
573 window.location = pyroutes.url('edit_repo_perms', {'repo_name': REPO_NAME});
579 });
574 });
580 % endif
575 % endif
581
576
582 </script>
577 </script>
583 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
578 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
584 </%def>
579 </%def>
585
580
586 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
581 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
587 <div class="modal-dialog">
582 <div class="modal-dialog">
588 <div class="modal-content">
583 <div class="modal-content">
589 <div class="modal-header">
584 <div class="modal-header">
590 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
585 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
591 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
586 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
592 </div>
587 </div>
593 <div class="modal-body">
588 <div class="modal-body">
594 <div class="block-left">
589 <div class="block-left">
595 <table class="keyboard-mappings">
590 <table class="keyboard-mappings">
596 <tbody>
591 <tbody>
597 <tr>
592 <tr>
598 <th></th>
593 <th></th>
599 <th>${_('Site-wide shortcuts')}</th>
594 <th>${_('Site-wide shortcuts')}</th>
600 </tr>
595 </tr>
601 <%
596 <%
602 elems = [
597 elems = [
603 ('/', 'Open quick search box'),
598 ('/', 'Open quick search box'),
604 ('g h', 'Goto home page'),
599 ('g h', 'Goto home page'),
605 ('g g', 'Goto my private gists page'),
600 ('g g', 'Goto my private gists page'),
606 ('g G', 'Goto my public gists page'),
601 ('g G', 'Goto my public gists page'),
607 ('n r', 'New repository page'),
602 ('n r', 'New repository page'),
608 ('n g', 'New gist page'),
603 ('n g', 'New gist page'),
609 ]
604 ]
610 %>
605 %>
611 %for key, desc in elems:
606 %for key, desc in elems:
612 <tr>
607 <tr>
613 <td class="keys">
608 <td class="keys">
614 <span class="key tag">${key}</span>
609 <span class="key tag">${key}</span>
615 </td>
610 </td>
616 <td>${desc}</td>
611 <td>${desc}</td>
617 </tr>
612 </tr>
618 %endfor
613 %endfor
619 </tbody>
614 </tbody>
620 </table>
615 </table>
621 </div>
616 </div>
622 <div class="block-left">
617 <div class="block-left">
623 <table class="keyboard-mappings">
618 <table class="keyboard-mappings">
624 <tbody>
619 <tbody>
625 <tr>
620 <tr>
626 <th></th>
621 <th></th>
627 <th>${_('Repositories')}</th>
622 <th>${_('Repositories')}</th>
628 </tr>
623 </tr>
629 <%
624 <%
630 elems = [
625 elems = [
631 ('g s', 'Goto summary page'),
626 ('g s', 'Goto summary page'),
632 ('g c', 'Goto changelog page'),
627 ('g c', 'Goto changelog page'),
633 ('g f', 'Goto files page'),
628 ('g f', 'Goto files page'),
634 ('g F', 'Goto files page with file search activated'),
629 ('g F', 'Goto files page with file search activated'),
635 ('g p', 'Goto pull requests page'),
630 ('g p', 'Goto pull requests page'),
636 ('g o', 'Goto repository settings'),
631 ('g o', 'Goto repository settings'),
637 ('g O', 'Goto repository permissions settings'),
632 ('g O', 'Goto repository permissions settings'),
638 ]
633 ]
639 %>
634 %>
640 %for key, desc in elems:
635 %for key, desc in elems:
641 <tr>
636 <tr>
642 <td class="keys">
637 <td class="keys">
643 <span class="key tag">${key}</span>
638 <span class="key tag">${key}</span>
644 </td>
639 </td>
645 <td>${desc}</td>
640 <td>${desc}</td>
646 </tr>
641 </tr>
647 %endfor
642 %endfor
648 </tbody>
643 </tbody>
649 </table>
644 </table>
650 </div>
645 </div>
651 </div>
646 </div>
652 <div class="modal-footer">
647 <div class="modal-footer">
653 </div>
648 </div>
654 </div><!-- /.modal-content -->
649 </div><!-- /.modal-content -->
655 </div><!-- /.modal-dialog -->
650 </div><!-- /.modal-dialog -->
656 </div><!-- /.modal -->
651 </div><!-- /.modal -->
@@ -1,77 +1,76 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="base/root.html"/>
2 <%inherit file="base/root.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Sign In')}
5 ${_('Sign In')}
6 %if c.rhodecode_name:
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}
7 &middot; ${h.branding(c.rhodecode_name)}
8 %endif
8 %endif
9 </%def>
9 </%def>
10
10
11 <style>body{background-color:#eeeeee;}</style>
11 <style>body{background-color:#eeeeee;}</style>
12 <div class="loginbox">
12 <div class="loginbox">
13 <div class="header">
13 <div class="header">
14 <div id="header-inner" class="title">
14 <div id="header-inner" class="title">
15 <div id="logo">
15 <div id="logo">
16 <div class="logo-wrapper">
16 <div class="logo-wrapper">
17 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
17 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
18 </div>
18 </div>
19 %if c.rhodecode_name:
19 %if c.rhodecode_name:
20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
21 %endif
21 %endif
22 </div>
22 </div>
23 </div>
23 </div>
24 </div>
24 </div>
25
25
26 <div class="loginwrapper">
26 <div class="loginwrapper">
27 <div class="left-column">
27 <div class="left-column">
28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
29 </div>
29 </div>
30 <%block name="above_login_button" />
30 <%block name="above_login_button" />
31 <div id="login" class="right-column">
31 <div id="login" class="right-column">
32 <%include file="/base/flash_msg.html"/>
33 <!-- login -->
32 <!-- login -->
34 <div class="sign-in-title">
33 <div class="sign-in-title">
35 <h1>${_('Sign In')}</h1>
34 <h1>${_('Sign In')}</h1>
36 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
35 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
37 <h4>${h.link_to(_("Go to the registration page to create a new account."), request.route_path('register'))}</h4>
36 <h4>${h.link_to(_("Go to the registration page to create a new account."), request.route_path('register'))}</h4>
38 %endif
37 %endif
39 </div>
38 </div>
40 <div class="inner form">
39 <div class="inner form">
41 ${h.form(request.route_path('login', _query={'came_from': came_from}), needs_csrf_token=False)}
40 ${h.form(request.route_path('login', _query={'came_from': came_from}), needs_csrf_token=False)}
42
41
43 <label for="username">${_('Username')}:</label>
42 <label for="username">${_('Username')}:</label>
44 ${h.text('username', class_='focus', value=defaults.get('username'))}
43 ${h.text('username', class_='focus', value=defaults.get('username'))}
45 %if 'username' in errors:
44 %if 'username' in errors:
46 <span class="error-message">${errors.get('username')}</span>
45 <span class="error-message">${errors.get('username')}</span>
47 <br />
46 <br />
48 %endif
47 %endif
49
48
50 <label for="password">${_('Password')}:</label>
49 <label for="password">${_('Password')}:</label>
51 ${h.password('password', class_='focus')}
50 ${h.password('password', class_='focus')}
52 %if 'password' in errors:
51 %if 'password' in errors:
53 <span class="error-message">${errors.get('password')}</span>
52 <span class="error-message">${errors.get('password')}</span>
54 <br />
53 <br />
55 %endif
54 %endif
56
55
57 ${h.checkbox('remember', value=True, checked=defaults.get('remember'))}
56 ${h.checkbox('remember', value=True, checked=defaults.get('remember'))}
58 <label class="checkbox" for="remember">${_('Remember me')}</label>
57 <label class="checkbox" for="remember">${_('Remember me')}</label>
59
58
60 <p class="links">
59 <p class="links">
61 ${h.link_to(_('Forgot your password?'), h.route_path('reset_password'))}
60 ${h.link_to(_('Forgot your password?'), h.route_path('reset_password'))}
62 </p>
61 </p>
63
62
64 ${h.submit('sign_in', _('Sign In'), class_="btn sign-in")}
63 ${h.submit('sign_in', _('Sign In'), class_="btn sign-in")}
65
64
66 ${h.end_form()}
65 ${h.end_form()}
67 <script type="text/javascript">
66 <script type="text/javascript">
68 $(document).ready(function(){
67 $(document).ready(function(){
69 $('#username').focus();
68 $('#username').focus();
70 })
69 })
71 </script>
70 </script>
72 </div>
71 </div>
73 <!-- end login -->
72 <!-- end login -->
74 <%block name="below_login_button" />
73 <%block name="below_login_button" />
75 </div>
74 </div>
76 </div>
75 </div>
77 </div>
76 </div>
@@ -1,78 +1,77 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="base/root.html"/>
2 <%inherit file="base/root.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Create an Account')}
5 ${_('Create an Account')}
6 %if c.rhodecode_name:
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}
7 &middot; ${h.branding(c.rhodecode_name)}
8 %endif
8 %endif
9 </%def>
9 </%def>
10 <style>body{background-color:#eeeeee;}</style>
10 <style>body{background-color:#eeeeee;}</style>
11
11
12 <div class="loginbox">
12 <div class="loginbox">
13 <div class="header">
13 <div class="header">
14 <div id="header-inner" class="title">
14 <div id="header-inner" class="title">
15 <div id="logo">
15 <div id="logo">
16 <div class="logo-wrapper">
16 <div class="logo-wrapper">
17 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
17 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
18 </div>
18 </div>
19 %if c.rhodecode_name:
19 %if c.rhodecode_name:
20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
21 %endif
21 %endif
22 </div>
22 </div>
23 </div>
23 </div>
24 </div>
24 </div>
25
25
26 <div class="loginwrapper">
26 <div class="loginwrapper">
27 <div class="left-column">
27 <div class="left-column">
28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
29 </div>
29 </div>
30
30
31 <div id="register" class="right-column">
31 <div id="register" class="right-column">
32 <%include file="/base/flash_msg.html"/>
33 <!-- login -->
32 <!-- login -->
34 <div class="sign-in-title">
33 <div class="sign-in-title">
35 <h1>${_('Reset your Password')}</h1>
34 <h1>${_('Reset your Password')}</h1>
36 <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4>
35 <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4>
37 </div>
36 </div>
38 <div class="inner form">
37 <div class="inner form">
39 ${h.form(request.route_path('reset_password'), needs_csrf_token=False)}
38 ${h.form(request.route_path('reset_password'), needs_csrf_token=False)}
40 <label for="email">${_('Email Address')}:</label>
39 <label for="email">${_('Email Address')}:</label>
41 ${h.text('email', defaults.get('email'))}
40 ${h.text('email', defaults.get('email'))}
42 %if 'email' in errors:
41 %if 'email' in errors:
43 <span class="error-message">${errors.get('email')}</span>
42 <span class="error-message">${errors.get('email')}</span>
44 <br />
43 <br />
45 %endif
44 %endif
46
45
47 %if captcha_active:
46 %if captcha_active:
48 <div class="login-captcha"
47 <div class="login-captcha"
49 <label for="email">${_('Captcha')}:</label>
48 <label for="email">${_('Captcha')}:</label>
50 ${h.hidden('recaptcha_field')}
49 ${h.hidden('recaptcha_field')}
51 <div id="recaptcha"></div>
50 <div id="recaptcha"></div>
52 %if 'recaptcha_field' in errors:
51 %if 'recaptcha_field' in errors:
53 <span class="error-message">${errors.get('recaptcha_field')}</span>
52 <span class="error-message">${errors.get('recaptcha_field')}</span>
54 <br />
53 <br />
55 %endif
54 %endif
56 </div>
55 </div>
57 %endif
56 %endif
58
57
59 ${h.submit('send', _('Send password reset email'), class_="btn sign-in")}
58 ${h.submit('send', _('Send password reset email'), class_="btn sign-in")}
60 <div class="activation_msg">${_('Password reset link will be sent to matching email address')}</div>
59 <div class="activation_msg">${_('Password reset link will be sent to matching email address')}</div>
61
60
62 ${h.end_form()}
61 ${h.end_form()}
63 </div>
62 </div>
64 </div>
63 </div>
65 </div>
64 </div>
66 </div>
65 </div>
67
66
68 %if captcha_active:
67 %if captcha_active:
69 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
68 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
70 %endif
69 %endif
71 <script type="text/javascript">
70 <script type="text/javascript">
72 $(document).ready(function(){
71 $(document).ready(function(){
73 $('#email').focus();
72 $('#email').focus();
74 %if captcha_active:
73 %if captcha_active:
75 Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"});
74 Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"});
76 %endif
75 %endif
77 });
76 });
78 </script>
77 </script>
@@ -1,123 +1,122 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="base/root.html"/>
2 <%inherit file="base/root.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Create an Account')}
5 ${_('Create an Account')}
6 %if c.rhodecode_name:
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}
7 &middot; ${h.branding(c.rhodecode_name)}
8 %endif
8 %endif
9 </%def>
9 </%def>
10 <style>body{background-color:#eeeeee;}</style>
10 <style>body{background-color:#eeeeee;}</style>
11
11
12 <div class="loginbox">
12 <div class="loginbox">
13 <div class="header">
13 <div class="header">
14 <div id="header-inner" class="title">
14 <div id="header-inner" class="title">
15 <div id="logo">
15 <div id="logo">
16 <div class="logo-wrapper">
16 <div class="logo-wrapper">
17 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
17 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
18 </div>
18 </div>
19 %if c.rhodecode_name:
19 %if c.rhodecode_name:
20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
21 %endif
21 %endif
22 </div>
22 </div>
23 </div>
23 </div>
24 </div>
24 </div>
25
25
26 <div class="loginwrapper">
26 <div class="loginwrapper">
27 <div class="left-column">
27 <div class="left-column">
28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
29 </div>
29 </div>
30 <%block name="above_register_button" />
30 <%block name="above_register_button" />
31 <div id="register" class="right-column">
31 <div id="register" class="right-column">
32 <%include file="/base/flash_msg.html"/>
33 <!-- login -->
32 <!-- login -->
34 <div class="sign-in-title">
33 <div class="sign-in-title">
35 <h1>${_('Create an account')}</h1>
34 <h1>${_('Create an account')}</h1>
36 <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4>
35 <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4>
37 </div>
36 </div>
38 <div class="inner form">
37 <div class="inner form">
39 ${h.form(request.route_path('register'), needs_csrf_token=False)}
38 ${h.form(request.route_path('register'), needs_csrf_token=False)}
40
39
41 <label for="username">${_('Username')}:</label>
40 <label for="username">${_('Username')}:</label>
42 ${h.text('username', defaults.get('username'))}
41 ${h.text('username', defaults.get('username'))}
43 %if 'username' in errors:
42 %if 'username' in errors:
44 <span class="error-message">${errors.get('username')}</span>
43 <span class="error-message">${errors.get('username')}</span>
45 <br />
44 <br />
46 %endif
45 %endif
47
46
48 <label for="password">${_('Password')}:</label>
47 <label for="password">${_('Password')}:</label>
49 ${h.password('password', defaults.get('password'))}
48 ${h.password('password', defaults.get('password'))}
50 %if 'password' in errors:
49 %if 'password' in errors:
51 <span class="error-message">${errors.get('password')}</span>
50 <span class="error-message">${errors.get('password')}</span>
52 <br />
51 <br />
53 %endif
52 %endif
54
53
55 <label for="password_confirmation">${_('Re-enter password')}:</label>
54 <label for="password_confirmation">${_('Re-enter password')}:</label>
56 ${h.password('password_confirmation', defaults.get('password_confirmation'))}
55 ${h.password('password_confirmation', defaults.get('password_confirmation'))}
57 %if 'password_confirmation' in errors:
56 %if 'password_confirmation' in errors:
58 <span class="error-message">${errors.get('password_confirmation')}</span>
57 <span class="error-message">${errors.get('password_confirmation')}</span>
59 <br />
58 <br />
60 %endif
59 %endif
61
60
62 <label for="firstname">${_('First Name')}:</label>
61 <label for="firstname">${_('First Name')}:</label>
63 ${h.text('firstname', defaults.get('firstname'))}
62 ${h.text('firstname', defaults.get('firstname'))}
64 %if 'firstname' in errors:
63 %if 'firstname' in errors:
65 <span class="error-message">${errors.get('firstname')}</span>
64 <span class="error-message">${errors.get('firstname')}</span>
66 <br />
65 <br />
67 %endif
66 %endif
68
67
69 <label for="lastname">${_('Last Name')}:</label>
68 <label for="lastname">${_('Last Name')}:</label>
70 ${h.text('lastname', defaults.get('lastname'))}
69 ${h.text('lastname', defaults.get('lastname'))}
71 %if 'lastname' in errors:
70 %if 'lastname' in errors:
72 <span class="error-message">${errors.get('lastname')}</span>
71 <span class="error-message">${errors.get('lastname')}</span>
73 <br />
72 <br />
74 %endif
73 %endif
75
74
76 <label for="email">${_('Email')}:</label>
75 <label for="email">${_('Email')}:</label>
77 ${h.text('email', defaults.get('email'))}
76 ${h.text('email', defaults.get('email'))}
78 %if 'email' in errors:
77 %if 'email' in errors:
79 <span class="error-message">${errors.get('email')}</span>
78 <span class="error-message">${errors.get('email')}</span>
80 <br />
79 <br />
81 %endif
80 %endif
82
81
83 %if captcha_active:
82 %if captcha_active:
84 <div>
83 <div>
85 <label for="recaptcha">${_('Captcha')}:</label>
84 <label for="recaptcha">${_('Captcha')}:</label>
86 ${h.hidden('recaptcha_field')}
85 ${h.hidden('recaptcha_field')}
87 <div id="recaptcha"></div>
86 <div id="recaptcha"></div>
88 %if 'recaptcha_field' in errors:
87 %if 'recaptcha_field' in errors:
89 <span class="error-message">${errors.get('recaptcha_field')}</span>
88 <span class="error-message">${errors.get('recaptcha_field')}</span>
90 <br />
89 <br />
91 %endif
90 %endif
92 </div>
91 </div>
93 %endif
92 %endif
94
93
95 %if not auto_active:
94 %if not auto_active:
96 <p class="activation_msg">
95 <p class="activation_msg">
97 ${_('Account activation requires admin approval.')}
96 ${_('Account activation requires admin approval.')}
98 </p>
97 </p>
99 %endif
98 %endif
100 <p class="register_message">
99 <p class="register_message">
101 ${register_message|n}
100 ${register_message|n}
102 </p>
101 </p>
103
102
104 ${h.submit('sign_up',_('Create Account'),class_="btn sign-in")}
103 ${h.submit('sign_up',_('Create Account'),class_="btn sign-in")}
105
104
106 ${h.end_form()}
105 ${h.end_form()}
107 </div>
106 </div>
108 <%block name="below_register_button" />
107 <%block name="below_register_button" />
109 </div>
108 </div>
110 </div>
109 </div>
111 </div>
110 </div>
112
111
113 %if captcha_active:
112 %if captcha_active:
114 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
113 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
115 %endif
114 %endif
116 <script type="text/javascript">
115 <script type="text/javascript">
117 $(document).ready(function(){
116 $(document).ready(function(){
118 $('#username').focus();
117 $('#username').focus();
119 %if captcha_active:
118 %if captcha_active:
120 Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"});
119 Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"});
121 %endif
120 %endif
122 });
121 });
123 </script>
122 </script>
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now