##// END OF EJS Templates
templates: removed some unused JS variables....
marcink -
r1285:ef422228 default
parent child Browse files
Show More
@@ -1,101 +1,101 b''
1 // Global keyboard bindings
1 // Global keyboard bindings
2
2
3 function setRCMouseBindings(repoName, repoLandingRev) {
3 function setRCMouseBindings(repoName, repoLandingRev) {
4
4
5 /** custom callback for supressing mousetrap from firing */
5 /** custom callback for supressing mousetrap from firing */
6 Mousetrap.stopCallback = function(e, element) {
6 Mousetrap.stopCallback = function(e, element) {
7 // if the element has the class "mousetrap" then no need to stop
7 // if the element has the class "mousetrap" then no need to stop
8 if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {
8 if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {
9 return false;
9 return false;
10 }
10 }
11
11
12 // stop for input, select, and textarea
12 // stop for input, select, and textarea
13 return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;
13 return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;
14 };
14 };
15
15
16 // general help "?"
16 // general help "?"
17 Mousetrap.bind(['?'], function(e) {
17 Mousetrap.bind(['?'], function(e) {
18 $('#help_kb').modal({});
18 $('#help_kb').modal({});
19 });
19 });
20
20
21 // / open the quick filter
21 // / open the quick filter
22 Mousetrap.bind(['/'], function(e) {
22 Mousetrap.bind(['/'], function(e) {
23 $('#repo_switcher').select2('open');
23 $('#repo_switcher').select2('open');
24
24
25 // return false to prevent default browser behavior
25 // return false to prevent default browser behavior
26 // and stop event from bubbling
26 // and stop event from bubbling
27 return false;
27 return false;
28 });
28 });
29
29
30 // ctrl/command+b, show the the main bar
30 // ctrl/command+b, show the the main bar
31 Mousetrap.bind(['command+b', 'ctrl+b'], function(e) {
31 Mousetrap.bind(['command+b', 'ctrl+b'], function(e) {
32 var $headerInner = $('#header-inner'),
32 var $headerInner = $('#header-inner'),
33 $content = $('#content');
33 $content = $('#content');
34 if ($headerInner.hasClass('hover') && $content.hasClass('hover')) {
34 if ($headerInner.hasClass('hover') && $content.hasClass('hover')) {
35 $headerInner.removeClass('hover');
35 $headerInner.removeClass('hover');
36 $content.removeClass('hover');
36 $content.removeClass('hover');
37 } else {
37 } else {
38 $headerInner.addClass('hover');
38 $headerInner.addClass('hover');
39 $content.addClass('hover');
39 $content.addClass('hover');
40 }
40 }
41 return false;
41 return false;
42 });
42 });
43
43
44 // general nav g + action
44 // general nav g + action
45 Mousetrap.bind(['g h'], function(e) {
45 Mousetrap.bind(['g h'], function(e) {
46 window.location = pyroutes.url('home');
46 window.location = pyroutes.url('home');
47 });
47 });
48 Mousetrap.bind(['g g'], function(e) {
48 Mousetrap.bind(['g g'], function(e) {
49 window.location = pyroutes.url('gists', {'private': 1});
49 window.location = pyroutes.url('gists', {'private': 1});
50 });
50 });
51 Mousetrap.bind(['g G'], function(e) {
51 Mousetrap.bind(['g G'], function(e) {
52 window.location = pyroutes.url('gists', {'public': 1});
52 window.location = pyroutes.url('gists', {'public': 1});
53 });
53 });
54 Mousetrap.bind(['n g'], function(e) {
54 Mousetrap.bind(['n g'], function(e) {
55 window.location = pyroutes.url('new_gist');
55 window.location = pyroutes.url('new_gist');
56 });
56 });
57 Mousetrap.bind(['n r'], function(e) {
57 Mousetrap.bind(['n r'], function(e) {
58 window.location = pyroutes.url('new_repo');
58 window.location = pyroutes.url('new_repo');
59 });
59 });
60
60
61 if (repoName !== '' && repoLandingRev !== '') {
61 if (repoName && repoName != '') {
62 // nav in repo context
62 // nav in repo context
63 Mousetrap.bind(['g s'], function(e) {
63 Mousetrap.bind(['g s'], function(e) {
64 window.location = pyroutes.url(
64 window.location = pyroutes.url(
65 'summary_home', {'repo_name': repoName});
65 'summary_home', {'repo_name': repoName});
66 });
66 });
67 Mousetrap.bind(['g c'], function(e) {
67 Mousetrap.bind(['g c'], function(e) {
68 window.location = pyroutes.url(
68 window.location = pyroutes.url(
69 'changelog_home', {'repo_name': repoName});
69 'changelog_home', {'repo_name': repoName});
70 });
70 });
71 Mousetrap.bind(['g F'], function(e) {
71 Mousetrap.bind(['g F'], function(e) {
72 window.location = pyroutes.url(
72 window.location = pyroutes.url(
73 'files_home',
73 'files_home',
74 {
74 {
75 'repo_name': repoName,
75 'repo_name': repoName,
76 'revision': repoLandingRev,
76 'revision': repoLandingRev,
77 'f_path': '',
77 'f_path': '',
78 'search': '1'
78 'search': '1'
79 });
79 });
80 });
80 });
81 Mousetrap.bind(['g f'], function(e) {
81 Mousetrap.bind(['g f'], function(e) {
82 window.location = pyroutes.url(
82 window.location = pyroutes.url(
83 'files_home',
83 'files_home',
84 {
84 {
85 'repo_name': repoName,
85 'repo_name': repoName,
86 'revision': repoLandingRev,
86 'revision': repoLandingRev,
87 'f_path': ''
87 'f_path': ''
88 });
88 });
89 });
89 });
90 Mousetrap.bind(['g o'], function(e) {
90 Mousetrap.bind(['g o'], function(e) {
91 window.location = pyroutes.url(
91 window.location = pyroutes.url(
92 'edit_repo', {'repo_name': repoName});
92 'edit_repo', {'repo_name': repoName});
93 });
93 });
94 Mousetrap.bind(['g O'], function(e) {
94 Mousetrap.bind(['g O'], function(e) {
95 window.location = pyroutes.url(
95 window.location = pyroutes.url(
96 'edit_repo_perms', {'repo_name': repoName});
96 'edit_repo_perms', {'repo_name': repoName});
97 });
97 });
98 }
98 }
99 }
99 }
100
100
101 setRCMouseBindings(templateContext.repo_name, templateContext.repo_landing_commit);
101 setRCMouseBindings(templateContext.repo_name, templateContext.repo_landing_commit);
@@ -1,656 +1,598 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="root.mako"/>
2 <%inherit file="root.mako"/>
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 <div class="main">
26 <div class="main">
27 ${next.main()}
27 ${next.main()}
28 </div>
28 </div>
29 </div>
29 </div>
30 <!-- END CONTENT -->
30 <!-- END CONTENT -->
31
31
32 </div>
32 </div>
33 <!-- FOOTER -->
33 <!-- FOOTER -->
34 <div id="footer">
34 <div id="footer">
35 <div id="footer-inner" class="title wrapper">
35 <div id="footer-inner" class="title wrapper">
36 <div>
36 <div>
37 <p class="footer-link-right">
37 <p class="footer-link-right">
38 % if c.visual.show_version:
38 % if c.visual.show_version:
39 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
39 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
40 % endif
40 % endif
41 &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.
42 % if c.visual.rhodecode_support_url:
42 % if c.visual.rhodecode_support_url:
43 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
43 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
44 % endif
44 % endif
45 </p>
45 </p>
46 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
46 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
47 <p class="server-instance" style="display:${sid}">
47 <p class="server-instance" style="display:${sid}">
48 ## display hidden instance ID if specially defined
48 ## display hidden instance ID if specially defined
49 % if c.rhodecode_instanceid:
49 % if c.rhodecode_instanceid:
50 ${_('RhodeCode instance id: %s') % c.rhodecode_instanceid}
50 ${_('RhodeCode instance id: %s') % c.rhodecode_instanceid}
51 % endif
51 % endif
52 </p>
52 </p>
53 </div>
53 </div>
54 </div>
54 </div>
55 </div>
55 </div>
56
56
57 <!-- END FOOTER -->
57 <!-- END FOOTER -->
58
58
59 ### MAKO DEFS ###
59 ### MAKO DEFS ###
60
60
61 <%def name="menu_bar_subnav()">
61 <%def name="menu_bar_subnav()">
62 </%def>
62 </%def>
63
63
64 <%def name="breadcrumbs(class_='breadcrumbs')">
64 <%def name="breadcrumbs(class_='breadcrumbs')">
65 <div class="${class_}">
65 <div class="${class_}">
66 ${self.breadcrumbs_links()}
66 ${self.breadcrumbs_links()}
67 </div>
67 </div>
68 </%def>
68 </%def>
69
69
70 <%def name="admin_menu()">
70 <%def name="admin_menu()">
71 <ul class="admin_menu submenu">
71 <ul class="admin_menu submenu">
72 <li><a href="${h.url('admin_home')}">${_('Admin journal')}</a></li>
72 <li><a href="${h.url('admin_home')}">${_('Admin journal')}</a></li>
73 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
73 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
74 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
74 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
75 <li><a href="${h.url('users')}">${_('Users')}</a></li>
75 <li><a href="${h.url('users')}">${_('Users')}</a></li>
76 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
76 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
77 <li><a href="${h.url('admin_permissions_application')}">${_('Permissions')}</a></li>
77 <li><a href="${h.url('admin_permissions_application')}">${_('Permissions')}</a></li>
78 <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>
79 <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>
80 <li><a href="${h.url('admin_defaults_repositories')}">${_('Defaults')}</a></li>
80 <li><a href="${h.url('admin_defaults_repositories')}">${_('Defaults')}</a></li>
81 <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>
82 </ul>
82 </ul>
83 </%def>
83 </%def>
84
84
85
85
86 <%def name="dt_info_panel(elements)">
86 <%def name="dt_info_panel(elements)">
87 <dl class="dl-horizontal">
87 <dl class="dl-horizontal">
88 %for dt, dd, title, show_items in elements:
88 %for dt, dd, title, show_items in elements:
89 <dt>${dt}:</dt>
89 <dt>${dt}:</dt>
90 <dd title="${title}">
90 <dd title="${title}">
91 %if callable(dd):
91 %if callable(dd):
92 ## allow lazy evaluation of elements
92 ## allow lazy evaluation of elements
93 ${dd()}
93 ${dd()}
94 %else:
94 %else:
95 ${dd}
95 ${dd}
96 %endif
96 %endif
97 %if show_items:
97 %if show_items:
98 <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span>
98 <span class="btn-collapse" data-toggle="item-${h.md5_safe(dt)[:6]}-details">${_('Show More')} </span>
99 %endif
99 %endif
100 </dd>
100 </dd>
101
101
102 %if show_items:
102 %if show_items:
103 <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none">
103 <div class="collapsable-content" data-toggle="item-${h.md5_safe(dt)[:6]}-details" style="display: none">
104 %for item in show_items:
104 %for item in show_items:
105 <dt></dt>
105 <dt></dt>
106 <dd>${item}</dd>
106 <dd>${item}</dd>
107 %endfor
107 %endfor
108 </div>
108 </div>
109 %endif
109 %endif
110
110
111 %endfor
111 %endfor
112 </dl>
112 </dl>
113 </%def>
113 </%def>
114
114
115
115
116 <%def name="gravatar(email, size=16)">
116 <%def name="gravatar(email, size=16)">
117 <%
117 <%
118 if (size > 16):
118 if (size > 16):
119 gravatar_class = 'gravatar gravatar-large'
119 gravatar_class = 'gravatar gravatar-large'
120 else:
120 else:
121 gravatar_class = 'gravatar'
121 gravatar_class = 'gravatar'
122 %>
122 %>
123 <%doc>
123 <%doc>
124 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
125 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
126 with a better solution at some point.
126 with a better solution at some point.
127 </%doc>
127 </%doc>
128 <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}">
129 </%def>
129 </%def>
130
130
131
131
132 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
132 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
133 <% email = h.email_or_none(contact) %>
133 <% email = h.email_or_none(contact) %>
134 <div class="rc-user tooltip" title="${h.author_string(email)}">
134 <div class="rc-user tooltip" title="${h.author_string(email)}">
135 ${self.gravatar(email, size)}
135 ${self.gravatar(email, size)}
136 <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>
137 </div>
137 </div>
138 </%def>
138 </%def>
139
139
140
140
141 ## admin menu used for people that have some admin resources
141 ## admin menu used for people that have some admin resources
142 <%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)">
143 <ul class="submenu">
143 <ul class="submenu">
144 %if repositories:
144 %if repositories:
145 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
145 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
146 %endif
146 %endif
147 %if repository_groups:
147 %if repository_groups:
148 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
148 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
149 %endif
149 %endif
150 %if user_groups:
150 %if user_groups:
151 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
151 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
152 %endif
152 %endif
153 </ul>
153 </ul>
154 </%def>
154 </%def>
155
155
156 <%def name="repo_page_title(repo_instance)">
156 <%def name="repo_page_title(repo_instance)">
157 <div class="title-content">
157 <div class="title-content">
158 <div class="title-main">
158 <div class="title-main">
159 ## SVN/HG/GIT icons
159 ## SVN/HG/GIT icons
160 %if h.is_hg(repo_instance):
160 %if h.is_hg(repo_instance):
161 <i class="icon-hg"></i>
161 <i class="icon-hg"></i>
162 %endif
162 %endif
163 %if h.is_git(repo_instance):
163 %if h.is_git(repo_instance):
164 <i class="icon-git"></i>
164 <i class="icon-git"></i>
165 %endif
165 %endif
166 %if h.is_svn(repo_instance):
166 %if h.is_svn(repo_instance):
167 <i class="icon-svn"></i>
167 <i class="icon-svn"></i>
168 %endif
168 %endif
169
169
170 ## public/private
170 ## public/private
171 %if repo_instance.private:
171 %if repo_instance.private:
172 <i class="icon-repo-private"></i>
172 <i class="icon-repo-private"></i>
173 %else:
173 %else:
174 <i class="icon-repo-public"></i>
174 <i class="icon-repo-public"></i>
175 %endif
175 %endif
176
176
177 ## repo name with group name
177 ## repo name with group name
178 ${h.breadcrumb_repo_link(c.rhodecode_db_repo)}
178 ${h.breadcrumb_repo_link(c.rhodecode_db_repo)}
179
179
180 </div>
180 </div>
181
181
182 ## FORKED
182 ## FORKED
183 %if repo_instance.fork:
183 %if repo_instance.fork:
184 <p>
184 <p>
185 <i class="icon-code-fork"></i> ${_('Fork of')}
185 <i class="icon-code-fork"></i> ${_('Fork of')}
186 <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>
187 </p>
187 </p>
188 %endif
188 %endif
189
189
190 ## IMPORTED FROM REMOTE
190 ## IMPORTED FROM REMOTE
191 %if repo_instance.clone_uri:
191 %if repo_instance.clone_uri:
192 <p>
192 <p>
193 <i class="icon-code-fork"></i> ${_('Clone from')}
193 <i class="icon-code-fork"></i> ${_('Clone from')}
194 <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>
195 </p>
195 </p>
196 %endif
196 %endif
197
197
198 ## LOCKING STATUS
198 ## LOCKING STATUS
199 %if repo_instance.locked[0]:
199 %if repo_instance.locked[0]:
200 <p class="locking_locked">
200 <p class="locking_locked">
201 <i class="icon-repo-lock"></i>
201 <i class="icon-repo-lock"></i>
202 ${_('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])}}
203 </p>
203 </p>
204 %elif repo_instance.enable_locking:
204 %elif repo_instance.enable_locking:
205 <p class="locking_unlocked">
205 <p class="locking_unlocked">
206 <i class="icon-repo-unlock"></i>
206 <i class="icon-repo-unlock"></i>
207 ${_('Repository not locked. Pull repository to lock it.')}
207 ${_('Repository not locked. Pull repository to lock it.')}
208 </p>
208 </p>
209 %endif
209 %endif
210
210
211 </div>
211 </div>
212 </%def>
212 </%def>
213
213
214 <%def name="repo_menu(active=None)">
214 <%def name="repo_menu(active=None)">
215 <%
215 <%
216 def is_active(selected):
216 def is_active(selected):
217 if selected == active:
217 if selected == active:
218 return "active"
218 return "active"
219 %>
219 %>
220
220
221 <!--- CONTEXT BAR -->
221 <!--- CONTEXT BAR -->
222 <div id="context-bar">
222 <div id="context-bar">
223 <div class="wrapper">
223 <div class="wrapper">
224 <ul id="context-pages" class="horizontal-list navigation">
224 <ul id="context-pages" class="horizontal-list navigation">
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>
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>
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>
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>
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>
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>
228 <li class="${is_active('compare')}">
228 <li class="${is_active('compare')}">
229 <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>
230 </li>
230 </li>
231 ## 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()"
232 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
232 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
233 <li class="${is_active('showpullrequest')}">
233 <li class="${is_active('showpullrequest')}">
234 <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}">
235 %if c.repository_pull_requests:
235 %if c.repository_pull_requests:
236 <span class="pr_notifications">${c.repository_pull_requests}</span>
236 <span class="pr_notifications">${c.repository_pull_requests}</span>
237 %endif
237 %endif
238 <div class="menulabel">${_('Pull Requests')}</div>
238 <div class="menulabel">${_('Pull Requests')}</div>
239 </a>
239 </a>
240 </li>
240 </li>
241 %endif
241 %endif
242 <li class="${is_active('options')}">
242 <li class="${is_active('options')}">
243 <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>
244 <ul class="submenu">
244 <ul class="submenu">
245 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
245 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
246 <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>
247 %endif
247 %endif
248 %if c.rhodecode_db_repo.fork:
248 %if c.rhodecode_db_repo.fork:
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)}">
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)}">
250 ${_('Compare fork')}</a></li>
250 ${_('Compare fork')}</a></li>
251 %endif
251 %endif
252
252
253 <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>
254
254
255 %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:
256 %if c.rhodecode_db_repo.locked[0]:
256 %if c.rhodecode_db_repo.locked[0]:
257 <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>
258 %else:
258 %else:
259 <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>
260 %endif
260 %endif
261 %endif
261 %endif
262 %if c.rhodecode_user.username != h.DEFAULT_USER:
262 %if c.rhodecode_user.username != h.DEFAULT_USER:
263 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
263 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
264 <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>
265 <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>
266 %endif
266 %endif
267 %endif
267 %endif
268 </ul>
268 </ul>
269 </li>
269 </li>
270 </ul>
270 </ul>
271 </div>
271 </div>
272 <div class="clear"></div>
272 <div class="clear"></div>
273 </div>
273 </div>
274 <!--- END CONTEXT BAR -->
274 <!--- END CONTEXT BAR -->
275
275
276 </%def>
276 </%def>
277
277
278 <%def name="usermenu()">
278 <%def name="usermenu()">
279 ## USER MENU
279 ## USER MENU
280 <li id="quick_login_li">
280 <li id="quick_login_li">
281 <a id="quick_login_link" class="menulink childs">
281 <a id="quick_login_link" class="menulink childs">
282 ${gravatar(c.rhodecode_user.email, 20)}
282 ${gravatar(c.rhodecode_user.email, 20)}
283 <span class="user">
283 <span class="user">
284 %if c.rhodecode_user.username != h.DEFAULT_USER:
284 %if c.rhodecode_user.username != h.DEFAULT_USER:
285 <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>
286 %else:
286 %else:
287 <span>${_('Sign in')}</span>
287 <span>${_('Sign in')}</span>
288 %endif
288 %endif
289 </span>
289 </span>
290 </a>
290 </a>
291
291
292 <div class="user-menu submenu">
292 <div class="user-menu submenu">
293 <div id="quick_login">
293 <div id="quick_login">
294 %if c.rhodecode_user.username == h.DEFAULT_USER:
294 %if c.rhodecode_user.username == h.DEFAULT_USER:
295 <h4>${_('Sign in to your account')}</h4>
295 <h4>${_('Sign in to your account')}</h4>
296 ${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)}
297 <div class="form form-vertical">
297 <div class="form form-vertical">
298 <div class="fields">
298 <div class="fields">
299 <div class="field">
299 <div class="field">
300 <div class="label">
300 <div class="label">
301 <label for="username">${_('Username')}:</label>
301 <label for="username">${_('Username')}:</label>
302 </div>
302 </div>
303 <div class="input">
303 <div class="input">
304 ${h.text('username',class_='focus',tabindex=1)}
304 ${h.text('username',class_='focus',tabindex=1)}
305 </div>
305 </div>
306
306
307 </div>
307 </div>
308 <div class="field">
308 <div class="field">
309 <div class="label">
309 <div class="label">
310 <label for="password">${_('Password')}:</label>
310 <label for="password">${_('Password')}:</label>
311 %if h.HasPermissionAny('hg.password_reset.enabled')():
311 %if h.HasPermissionAny('hg.password_reset.enabled')():
312 <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'), class_='pwd_reset')}</span>
312 <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'), class_='pwd_reset')}</span>
313 %endif
313 %endif
314 </div>
314 </div>
315 <div class="input">
315 <div class="input">
316 ${h.password('password',class_='focus',tabindex=2)}
316 ${h.password('password',class_='focus',tabindex=2)}
317 </div>
317 </div>
318 </div>
318 </div>
319 <div class="buttons">
319 <div class="buttons">
320 <div class="register">
320 <div class="register">
321 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
321 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
322 ${h.link_to(_("Don't have an account ?"),h.route_path('register'))}
322 ${h.link_to(_("Don't have an account ?"),h.route_path('register'))}
323 %endif
323 %endif
324 </div>
324 </div>
325 <div class="submit">
325 <div class="submit">
326 ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)}
326 ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)}
327 </div>
327 </div>
328 </div>
328 </div>
329 </div>
329 </div>
330 </div>
330 </div>
331 ${h.end_form()}
331 ${h.end_form()}
332 %else:
332 %else:
333 <div class="">
333 <div class="">
334 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
334 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
335 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
335 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
336 <div class="email">${c.rhodecode_user.email}</div>
336 <div class="email">${c.rhodecode_user.email}</div>
337 </div>
337 </div>
338 <div class="">
338 <div class="">
339 <ol class="links">
339 <ol class="links">
340 <li>${h.link_to(_(u'My account'),h.url('my_account'))}</li>
340 <li>${h.link_to(_(u'My account'),h.url('my_account'))}</li>
341 % if c.rhodecode_user.personal_repo_group:
341 % if c.rhodecode_user.personal_repo_group:
342 <li>${h.link_to(_(u'My personal group'), h.url('repo_group_home', group_name=c.rhodecode_user.personal_repo_group.group_name))}</li>
342 <li>${h.link_to(_(u'My personal group'), h.url('repo_group_home', group_name=c.rhodecode_user.personal_repo_group.group_name))}</li>
343 % endif
343 % endif
344 <li class="logout">
344 <li class="logout">
345 ${h.secure_form(h.route_path('logout'))}
345 ${h.secure_form(h.route_path('logout'))}
346 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
346 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
347 ${h.end_form()}
347 ${h.end_form()}
348 </li>
348 </li>
349 </ol>
349 </ol>
350 </div>
350 </div>
351 %endif
351 %endif
352 </div>
352 </div>
353 </div>
353 </div>
354 %if c.rhodecode_user.username != h.DEFAULT_USER:
354 %if c.rhodecode_user.username != h.DEFAULT_USER:
355 <div class="pill_container">
355 <div class="pill_container">
356 % if c.unread_notifications == 0:
356 % if c.unread_notifications == 0:
357 <a class="menu_link_notifications empty" href="${h.url('notifications')}">${c.unread_notifications}</a>
357 <a class="menu_link_notifications empty" href="${h.url('notifications')}">${c.unread_notifications}</a>
358 % else:
358 % else:
359 <a class="menu_link_notifications" href="${h.url('notifications')}">${c.unread_notifications}</a>
359 <a class="menu_link_notifications" href="${h.url('notifications')}">${c.unread_notifications}</a>
360 % endif
360 % endif
361 </div>
361 </div>
362 % endif
362 % endif
363 </li>
363 </li>
364 </%def>
364 </%def>
365
365
366 <%def name="menu_items(active=None)">
366 <%def name="menu_items(active=None)">
367 <%
367 <%
368 def is_active(selected):
368 def is_active(selected):
369 if selected == active:
369 if selected == active:
370 return "active"
370 return "active"
371 return ""
371 return ""
372 %>
372 %>
373 <ul id="quick" class="main_nav navigation horizontal-list">
373 <ul id="quick" class="main_nav navigation horizontal-list">
374 <!-- repo switcher -->
374 <!-- repo switcher -->
375 <li class="${is_active('repositories')} repo_switcher_li has_select2">
375 <li class="${is_active('repositories')} repo_switcher_li has_select2">
376 <input id="repo_switcher" name="repo_switcher" type="hidden">
376 <input id="repo_switcher" name="repo_switcher" type="hidden">
377 </li>
377 </li>
378
378
379 ## ROOT MENU
379 ## ROOT MENU
380 %if c.rhodecode_user.username != h.DEFAULT_USER:
380 %if c.rhodecode_user.username != h.DEFAULT_USER:
381 <li class="${is_active('journal')}">
381 <li class="${is_active('journal')}">
382 <a class="menulink" title="${_('Show activity journal')}" href="${h.url('journal')}">
382 <a class="menulink" title="${_('Show activity journal')}" href="${h.url('journal')}">
383 <div class="menulabel">${_('Journal')}</div>
383 <div class="menulabel">${_('Journal')}</div>
384 </a>
384 </a>
385 </li>
385 </li>
386 %else:
386 %else:
387 <li class="${is_active('journal')}">
387 <li class="${is_active('journal')}">
388 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.url('public_journal')}">
388 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.url('public_journal')}">
389 <div class="menulabel">${_('Public journal')}</div>
389 <div class="menulabel">${_('Public journal')}</div>
390 </a>
390 </a>
391 </li>
391 </li>
392 %endif
392 %endif
393 <li class="${is_active('gists')}">
393 <li class="${is_active('gists')}">
394 <a class="menulink childs" title="${_('Show Gists')}" href="${h.url('gists')}">
394 <a class="menulink childs" title="${_('Show Gists')}" href="${h.url('gists')}">
395 <div class="menulabel">${_('Gists')}</div>
395 <div class="menulabel">${_('Gists')}</div>
396 </a>
396 </a>
397 </li>
397 </li>
398 <li class="${is_active('search')}">
398 <li class="${is_active('search')}">
399 <a class="menulink" title="${_('Search in repositories you have access to')}" href="${h.url('search')}">
399 <a class="menulink" title="${_('Search in repositories you have access to')}" href="${h.url('search')}">
400 <div class="menulabel">${_('Search')}</div>
400 <div class="menulabel">${_('Search')}</div>
401 </a>
401 </a>
402 </li>
402 </li>
403 % if h.HasPermissionAll('hg.admin')('access admin main page'):
403 % if h.HasPermissionAll('hg.admin')('access admin main page'):
404 <li class="${is_active('admin')}">
404 <li class="${is_active('admin')}">
405 <a class="menulink childs" title="${_('Admin settings')}" href="#" onclick="return false;">
405 <a class="menulink childs" title="${_('Admin settings')}" href="#" onclick="return false;">
406 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
406 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
407 </a>
407 </a>
408 ${admin_menu()}
408 ${admin_menu()}
409 </li>
409 </li>
410 % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
410 % 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')}">
411 <li class="${is_active('admin')}">
412 <a class="menulink childs" title="${_('Delegated Admin settings')}">
412 <a class="menulink childs" title="${_('Delegated Admin settings')}">
413 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
413 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
414 </a>
414 </a>
415 ${admin_menu_simple(c.rhodecode_user.repositories_admin,
415 ${admin_menu_simple(c.rhodecode_user.repositories_admin,
416 c.rhodecode_user.repository_groups_admin,
416 c.rhodecode_user.repository_groups_admin,
417 c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
417 c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
418 </li>
418 </li>
419 % endif
419 % endif
420 % if c.debug_style:
420 % if c.debug_style:
421 <li class="${is_active('debug_style')}">
421 <li class="${is_active('debug_style')}">
422 <a class="menulink" title="${_('Style')}" href="${h.url('debug_style_home')}">
422 <a class="menulink" title="${_('Style')}" href="${h.url('debug_style_home')}">
423 <div class="menulabel">${_('Style')}</div>
423 <div class="menulabel">${_('Style')}</div>
424 </a>
424 </a>
425 </li>
425 </li>
426 % endif
426 % endif
427 ## render extra user menu
427 ## render extra user menu
428 ${usermenu()}
428 ${usermenu()}
429 </ul>
429 </ul>
430
430
431 <script type="text/javascript">
431 <script type="text/javascript">
432 var visual_show_public_icon = "${c.visual.show_public_icon}" == "True";
432 var visual_show_public_icon = "${c.visual.show_public_icon}" == "True";
433
433
434 /*format the look of items in the list*/
434 /*format the look of items in the list*/
435 var format = function(state, escapeMarkup){
435 var format = function(state, escapeMarkup){
436 if (!state.id){
436 if (!state.id){
437 return state.text; // optgroup
437 return state.text; // optgroup
438 }
438 }
439 var obj_dict = state.obj;
439 var obj_dict = state.obj;
440 var tmpl = '';
440 var tmpl = '';
441
441
442 if(obj_dict && state.type == 'repo'){
442 if(obj_dict && state.type == 'repo'){
443 if(obj_dict['repo_type'] === 'hg'){
443 if(obj_dict['repo_type'] === 'hg'){
444 tmpl += '<i class="icon-hg"></i> ';
444 tmpl += '<i class="icon-hg"></i> ';
445 }
445 }
446 else if(obj_dict['repo_type'] === 'git'){
446 else if(obj_dict['repo_type'] === 'git'){
447 tmpl += '<i class="icon-git"></i> ';
447 tmpl += '<i class="icon-git"></i> ';
448 }
448 }
449 else if(obj_dict['repo_type'] === 'svn'){
449 else if(obj_dict['repo_type'] === 'svn'){
450 tmpl += '<i class="icon-svn"></i> ';
450 tmpl += '<i class="icon-svn"></i> ';
451 }
451 }
452 if(obj_dict['private']){
452 if(obj_dict['private']){
453 tmpl += '<i class="icon-lock" ></i> ';
453 tmpl += '<i class="icon-lock" ></i> ';
454 }
454 }
455 else if(visual_show_public_icon){
455 else if(visual_show_public_icon){
456 tmpl += '<i class="icon-unlock-alt"></i> ';
456 tmpl += '<i class="icon-unlock-alt"></i> ';
457 }
457 }
458 }
458 }
459 if(obj_dict && state.type == 'commit') {
459 if(obj_dict && state.type == 'commit') {
460 tmpl += '<i class="icon-tag"></i>';
460 tmpl += '<i class="icon-tag"></i>';
461 }
461 }
462 if(obj_dict && state.type == 'group'){
462 if(obj_dict && state.type == 'group'){
463 tmpl += '<i class="icon-folder-close"></i> ';
463 tmpl += '<i class="icon-folder-close"></i> ';
464 }
464 }
465 tmpl += escapeMarkup(state.text);
465 tmpl += escapeMarkup(state.text);
466 return tmpl;
466 return tmpl;
467 };
467 };
468
468
469 var formatResult = function(result, container, query, escapeMarkup) {
469 var formatResult = function(result, container, query, escapeMarkup) {
470 return format(result, escapeMarkup);
470 return format(result, escapeMarkup);
471 };
471 };
472
472
473 var formatSelection = function(data, container, escapeMarkup) {
473 var formatSelection = function(data, container, escapeMarkup) {
474 return format(data, escapeMarkup);
474 return format(data, escapeMarkup);
475 };
475 };
476
476
477 $("#repo_switcher").select2({
477 $("#repo_switcher").select2({
478 cachedDataSource: {},
478 cachedDataSource: {},
479 minimumInputLength: 2,
479 minimumInputLength: 2,
480 placeholder: '<div class="menulabel">${_('Go to')} <div class="show_more"></div></div>',
480 placeholder: '<div class="menulabel">${_('Go to')} <div class="show_more"></div></div>',
481 dropdownAutoWidth: true,
481 dropdownAutoWidth: true,
482 formatResult: formatResult,
482 formatResult: formatResult,
483 formatSelection: formatSelection,
483 formatSelection: formatSelection,
484 containerCssClass: "repo-switcher",
484 containerCssClass: "repo-switcher",
485 dropdownCssClass: "repo-switcher-dropdown",
485 dropdownCssClass: "repo-switcher-dropdown",
486 escapeMarkup: function(m){
486 escapeMarkup: function(m){
487 // don't escape our custom placeholder
487 // don't escape our custom placeholder
488 if(m.substr(0,23) == '<div class="menulabel">'){
488 if(m.substr(0,23) == '<div class="menulabel">'){
489 return m;
489 return m;
490 }
490 }
491
491
492 return Select2.util.escapeMarkup(m);
492 return Select2.util.escapeMarkup(m);
493 },
493 },
494 query: $.debounce(250, function(query){
494 query: $.debounce(250, function(query){
495 self = this;
495 self = this;
496 var cacheKey = query.term;
496 var cacheKey = query.term;
497 var cachedData = self.cachedDataSource[cacheKey];
497 var cachedData = self.cachedDataSource[cacheKey];
498
498
499 if (cachedData) {
499 if (cachedData) {
500 query.callback({results: cachedData.results});
500 query.callback({results: cachedData.results});
501 } else {
501 } else {
502 $.ajax({
502 $.ajax({
503 url: "${h.url('goto_switcher_data')}",
503 url: "${h.url('goto_switcher_data')}",
504 data: {'query': query.term},
504 data: {'query': query.term},
505 dataType: 'json',
505 dataType: 'json',
506 type: 'GET',
506 type: 'GET',
507 success: function(data) {
507 success: function(data) {
508 self.cachedDataSource[cacheKey] = data;
508 self.cachedDataSource[cacheKey] = data;
509 query.callback({results: data.results});
509 query.callback({results: data.results});
510 },
510 },
511 error: function(data, textStatus, errorThrown) {
511 error: function(data, textStatus, errorThrown) {
512 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
512 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
513 }
513 }
514 })
514 })
515 }
515 }
516 })
516 })
517 });
517 });
518
518
519 $("#repo_switcher").on('select2-selecting', function(e){
519 $("#repo_switcher").on('select2-selecting', function(e){
520 e.preventDefault();
520 e.preventDefault();
521 window.location = e.choice.url;
521 window.location = e.choice.url;
522 });
522 });
523
523
524 ## Global mouse bindings ##
525
526 // general help "?"
527 Mousetrap.bind(['?'], function(e) {
528 $('#help_kb').modal({})
529 });
530
531 // / open the quick filter
532 Mousetrap.bind(['/'], function(e) {
533 $("#repo_switcher").select2("open");
534
535 // return false to prevent default browser behavior
536 // and stop event from bubbling
537 return false;
538 });
539
540 // general nav g + action
541 Mousetrap.bind(['g h'], function(e) {
542 window.location = pyroutes.url('home');
543 });
544 Mousetrap.bind(['g g'], function(e) {
545 window.location = pyroutes.url('gists', {'private':1});
546 });
547 Mousetrap.bind(['g G'], function(e) {
548 window.location = pyroutes.url('gists', {'public':1});
549 });
550 Mousetrap.bind(['n g'], function(e) {
551 window.location = pyroutes.url('new_gist');
552 });
553 Mousetrap.bind(['n r'], function(e) {
554 window.location = pyroutes.url('new_repo');
555 });
556
557 % if hasattr(c, 'repo_name') and hasattr(c, 'rhodecode_db_repo'):
558 // nav in repo context
559 Mousetrap.bind(['g s'], function(e) {
560 window.location = pyroutes.url('summary_home', {'repo_name': REPO_NAME});
561 });
562 Mousetrap.bind(['g c'], function(e) {
563 window.location = pyroutes.url('changelog_home', {'repo_name': REPO_NAME});
564 });
565 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'});
567 });
568 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': ''});
570 });
571 Mousetrap.bind(['g p'], function(e) {
572 window.location = pyroutes.url('pullrequest_show_all', {'repo_name': REPO_NAME});
573 });
574 Mousetrap.bind(['g o'], function(e) {
575 window.location = pyroutes.url('edit_repo', {'repo_name': REPO_NAME});
576 });
577 Mousetrap.bind(['g O'], function(e) {
578 window.location = pyroutes.url('edit_repo_perms', {'repo_name': REPO_NAME});
579 });
580 % endif
581
582 </script>
524 </script>
583 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
525 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
584 </%def>
526 </%def>
585
527
586 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
528 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
587 <div class="modal-dialog">
529 <div class="modal-dialog">
588 <div class="modal-content">
530 <div class="modal-content">
589 <div class="modal-header">
531 <div class="modal-header">
590 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
532 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
591 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
533 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
592 </div>
534 </div>
593 <div class="modal-body">
535 <div class="modal-body">
594 <div class="block-left">
536 <div class="block-left">
595 <table class="keyboard-mappings">
537 <table class="keyboard-mappings">
596 <tbody>
538 <tbody>
597 <tr>
539 <tr>
598 <th></th>
540 <th></th>
599 <th>${_('Site-wide shortcuts')}</th>
541 <th>${_('Site-wide shortcuts')}</th>
600 </tr>
542 </tr>
601 <%
543 <%
602 elems = [
544 elems = [
603 ('/', 'Open quick search box'),
545 ('/', 'Open quick search box'),
604 ('g h', 'Goto home page'),
546 ('g h', 'Goto home page'),
605 ('g g', 'Goto my private gists page'),
547 ('g g', 'Goto my private gists page'),
606 ('g G', 'Goto my public gists page'),
548 ('g G', 'Goto my public gists page'),
607 ('n r', 'New repository page'),
549 ('n r', 'New repository page'),
608 ('n g', 'New gist page'),
550 ('n g', 'New gist page'),
609 ]
551 ]
610 %>
552 %>
611 %for key, desc in elems:
553 %for key, desc in elems:
612 <tr>
554 <tr>
613 <td class="keys">
555 <td class="keys">
614 <span class="key tag">${key}</span>
556 <span class="key tag">${key}</span>
615 </td>
557 </td>
616 <td>${desc}</td>
558 <td>${desc}</td>
617 </tr>
559 </tr>
618 %endfor
560 %endfor
619 </tbody>
561 </tbody>
620 </table>
562 </table>
621 </div>
563 </div>
622 <div class="block-left">
564 <div class="block-left">
623 <table class="keyboard-mappings">
565 <table class="keyboard-mappings">
624 <tbody>
566 <tbody>
625 <tr>
567 <tr>
626 <th></th>
568 <th></th>
627 <th>${_('Repositories')}</th>
569 <th>${_('Repositories')}</th>
628 </tr>
570 </tr>
629 <%
571 <%
630 elems = [
572 elems = [
631 ('g s', 'Goto summary page'),
573 ('g s', 'Goto summary page'),
632 ('g c', 'Goto changelog page'),
574 ('g c', 'Goto changelog page'),
633 ('g f', 'Goto files page'),
575 ('g f', 'Goto files page'),
634 ('g F', 'Goto files page with file search activated'),
576 ('g F', 'Goto files page with file search activated'),
635 ('g p', 'Goto pull requests page'),
577 ('g p', 'Goto pull requests page'),
636 ('g o', 'Goto repository settings'),
578 ('g o', 'Goto repository settings'),
637 ('g O', 'Goto repository permissions settings'),
579 ('g O', 'Goto repository permissions settings'),
638 ]
580 ]
639 %>
581 %>
640 %for key, desc in elems:
582 %for key, desc in elems:
641 <tr>
583 <tr>
642 <td class="keys">
584 <td class="keys">
643 <span class="key tag">${key}</span>
585 <span class="key tag">${key}</span>
644 </td>
586 </td>
645 <td>${desc}</td>
587 <td>${desc}</td>
646 </tr>
588 </tr>
647 %endfor
589 %endfor
648 </tbody>
590 </tbody>
649 </table>
591 </table>
650 </div>
592 </div>
651 </div>
593 </div>
652 <div class="modal-footer">
594 <div class="modal-footer">
653 </div>
595 </div>
654 </div><!-- /.modal-content -->
596 </div><!-- /.modal-content -->
655 </div><!-- /.modal-dialog -->
597 </div><!-- /.modal-dialog -->
656 </div><!-- /.modal -->
598 </div><!-- /.modal -->
@@ -1,183 +1,170 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html>
2 <!DOCTYPE html>
3
3
4 <%
4 <%
5 c.template_context['repo_name'] = getattr(c, 'repo_name', '')
5 c.template_context['repo_name'] = getattr(c, 'repo_name', '')
6
6
7 if hasattr(c, 'rhodecode_db_repo'):
7 if hasattr(c, 'rhodecode_db_repo'):
8 c.template_context['repo_type'] = c.rhodecode_db_repo.repo_type
8 c.template_context['repo_type'] = c.rhodecode_db_repo.repo_type
9 c.template_context['repo_landing_commit'] = c.rhodecode_db_repo.landing_rev[1]
9 c.template_context['repo_landing_commit'] = c.rhodecode_db_repo.landing_rev[1]
10
10
11 if getattr(c, 'rhodecode_user', None) and c.rhodecode_user.user_id:
11 if getattr(c, 'rhodecode_user', None) and c.rhodecode_user.user_id:
12 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
12 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
13 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
13 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
14 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
14 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
15 c.template_context['rhodecode_user']['first_name'] = c.rhodecode_user.name
15 c.template_context['rhodecode_user']['first_name'] = c.rhodecode_user.name
16 c.template_context['rhodecode_user']['last_name'] = c.rhodecode_user.lastname
16 c.template_context['rhodecode_user']['last_name'] = c.rhodecode_user.lastname
17
17
18 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
18 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
19 %>
19 %>
20 <html xmlns="http://www.w3.org/1999/xhtml">
20 <html xmlns="http://www.w3.org/1999/xhtml">
21 <head>
21 <head>
22 <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.min.js', ver=c.rhodecode_version_hash)}"></script>
22 <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.min.js', ver=c.rhodecode_version_hash)}"></script>
23 <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}">
23 <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}">
24 <title>${self.title()}</title>
24 <title>${self.title()}</title>
25 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
25 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
26 <%def name="robots()">
26 <%def name="robots()">
27 <meta name="robots" content="index, nofollow"/>
27 <meta name="robots" content="index, nofollow"/>
28 </%def>
28 </%def>
29 ${self.robots()}
29 ${self.robots()}
30 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
30 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
31
31
32 ## CSS definitions
32 ## CSS definitions
33 <%def name="css()">
33 <%def name="css()">
34 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
34 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
35 <!--[if lt IE 9]>
35 <!--[if lt IE 9]>
36 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/>
36 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/>
37 <![endif]-->
37 <![endif]-->
38 ## EXTRA FOR CSS
38 ## EXTRA FOR CSS
39 ${self.css_extra()}
39 ${self.css_extra()}
40 </%def>
40 </%def>
41 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
41 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
42 <%def name="css_extra()">
42 <%def name="css_extra()">
43 </%def>
43 </%def>
44
44
45 ${self.css()}
45 ${self.css()}
46
46
47 ## JAVASCRIPT
47 ## JAVASCRIPT
48 <%def name="js()">
48 <%def name="js()">
49 <script>
49 <script>
50 // setup Polymer options
50 // setup Polymer options
51 window.Polymer = {lazyRegister: true, dom: 'shadow'};
51 window.Polymer = {lazyRegister: true, dom: 'shadow'};
52
52
53 // Load webcomponentsjs polyfill if browser does not support native Web Components
53 // Load webcomponentsjs polyfill if browser does not support native Web Components
54 (function() {
54 (function() {
55 'use strict';
55 'use strict';
56 var onload = function() {
56 var onload = function() {
57 // For native Imports, manually fire WebComponentsReady so user code
57 // For native Imports, manually fire WebComponentsReady so user code
58 // can use the same code path for native and polyfill'd imports.
58 // can use the same code path for native and polyfill'd imports.
59 if (!window.HTMLImports) {
59 if (!window.HTMLImports) {
60 document.dispatchEvent(
60 document.dispatchEvent(
61 new CustomEvent('WebComponentsReady', {bubbles: true})
61 new CustomEvent('WebComponentsReady', {bubbles: true})
62 );
62 );
63 }
63 }
64 };
64 };
65 var webComponentsSupported = (
65 var webComponentsSupported = (
66 'registerElement' in document
66 'registerElement' in document
67 && 'import' in document.createElement('link')
67 && 'import' in document.createElement('link')
68 && 'content' in document.createElement('template')
68 && 'content' in document.createElement('template')
69 );
69 );
70 if (!webComponentsSupported) {
70 if (!webComponentsSupported) {
71 } else {
71 } else {
72 onload();
72 onload();
73 }
73 }
74 })();
74 })();
75 </script>
75 </script>
76
76
77 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
77 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
78 <script type="text/javascript">
78 <script type="text/javascript">
79 // register templateContext to pass template variables to JS
79 // register templateContext to pass template variables to JS
80 var templateContext = ${h.json.dumps(c.template_context)|n};
80 var templateContext = ${h.json.dumps(c.template_context)|n};
81
81
82 var REPO_NAME = "${getattr(c, 'repo_name', '')}";
83 %if hasattr(c, 'rhodecode_db_repo'):
84 var REPO_LANDING_REV = '${c.rhodecode_db_repo.landing_rev[1]}';
85 var REPO_TYPE = '${c.rhodecode_db_repo.repo_type}';
86 %else:
87 var REPO_LANDING_REV = '';
88 var REPO_TYPE = '';
89 %endif
90 var APPLICATION_URL = "${h.url('home').rstrip('/')}";
82 var APPLICATION_URL = "${h.url('home').rstrip('/')}";
91 var ASSET_URL = "${h.asset('')}";
83 var ASSET_URL = "${h.asset('')}";
92 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
84 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
93 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
85 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
94 % if getattr(c, 'rhodecode_user', None):
95 var USER = {name:'${c.rhodecode_user.username}'};
96 % else:
97 var USER = {name:null};
98 % endif
99
86
100 var APPENLIGHT = {
87 var APPENLIGHT = {
101 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
88 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
102 key: '${getattr(c, "appenlight_api_public_key", "")}',
89 key: '${getattr(c, "appenlight_api_public_key", "")}',
103 % if getattr(c, 'appenlight_server_url', None):
90 % if getattr(c, 'appenlight_server_url', None):
104 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
91 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
105 % endif
92 % endif
106 requestInfo: {
93 requestInfo: {
107 % if getattr(c, 'rhodecode_user', None):
94 % if getattr(c, 'rhodecode_user', None):
108 ip: '${c.rhodecode_user.ip_addr}',
95 ip: '${c.rhodecode_user.ip_addr}',
109 username: '${c.rhodecode_user.username}'
96 username: '${c.rhodecode_user.username}'
110 % endif
97 % endif
111 },
98 },
112 tags: {
99 tags: {
113 rhodecode_version: '${c.rhodecode_version}',
100 rhodecode_version: '${c.rhodecode_version}',
114 rhodecode_edition: '${c.rhodecode_edition}'
101 rhodecode_edition: '${c.rhodecode_edition}'
115 }
102 }
116 };
103 };
117
104
118 </script>
105 </script>
119 <%include file="/base/plugins_base.mako"/>
106 <%include file="/base/plugins_base.mako"/>
120 <!--[if lt IE 9]>
107 <!--[if lt IE 9]>
121 <script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script>
108 <script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script>
122 <![endif]-->
109 <![endif]-->
123 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
110 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
124 <script> var alertMessagePayloads = ${h.flash.json_alerts()|n}; </script>
111 <script> var alertMessagePayloads = ${h.flash.json_alerts()|n}; </script>
125 ## avoide escaping the %N
112 ## avoide escaping the %N
126 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode-components.js', ver=c.rhodecode_version_hash)}"></script>
113 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode-components.js', ver=c.rhodecode_version_hash)}"></script>
127 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
114 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
128
115
129
116
130 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
117 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
131 ${self.js_extra()}
118 ${self.js_extra()}
132
119
133 <script type="text/javascript">
120 <script type="text/javascript">
134 Rhodecode = (function() {
121 Rhodecode = (function() {
135 function _Rhodecode() {
122 function _Rhodecode() {
136 this.comments = new CommentsController();
123 this.comments = new CommentsController();
137 }
124 }
138 return new _Rhodecode();
125 return new _Rhodecode();
139 })();
126 })();
140
127
141 $(document).ready(function(){
128 $(document).ready(function(){
142 show_more_event();
129 show_more_event();
143 timeagoActivate();
130 timeagoActivate();
144 })
131 })
145 </script>
132 </script>
146
133
147 </%def>
134 </%def>
148
135
149 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
136 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
150 <%def name="js_extra()"></%def>
137 <%def name="js_extra()"></%def>
151 ${self.js()}
138 ${self.js()}
152
139
153 <%def name="head_extra()"></%def>
140 <%def name="head_extra()"></%def>
154 ${self.head_extra()}
141 ${self.head_extra()}
155 ## extra stuff
142 ## extra stuff
156 %if c.pre_code:
143 %if c.pre_code:
157 ${c.pre_code|n}
144 ${c.pre_code|n}
158 %endif
145 %endif
159 </head>
146 </head>
160 <body id="body">
147 <body id="body">
161 <noscript>
148 <noscript>
162 <div class="noscript-error">
149 <div class="noscript-error">
163 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
150 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
164 </div>
151 </div>
165 </noscript>
152 </noscript>
166 ## IE hacks
153 ## IE hacks
167 <!--[if IE 7]>
154 <!--[if IE 7]>
168 <script>$(document.body).addClass('ie7')</script>
155 <script>$(document.body).addClass('ie7')</script>
169 <![endif]-->
156 <![endif]-->
170 <!--[if IE 8]>
157 <!--[if IE 8]>
171 <script>$(document.body).addClass('ie8')</script>
158 <script>$(document.body).addClass('ie8')</script>
172 <![endif]-->
159 <![endif]-->
173 <!--[if IE 9]>
160 <!--[if IE 9]>
174 <script>$(document.body).addClass('ie9')</script>
161 <script>$(document.body).addClass('ie9')</script>
175 <![endif]-->
162 <![endif]-->
176
163
177 ${next.body()}
164 ${next.body()}
178 %if c.post_code:
165 %if c.post_code:
179 ${c.post_code|n}
166 ${c.post_code|n}
180 %endif
167 %endif
181 <rhodecode-app></rhodecode-app>
168 <rhodecode-app></rhodecode-app>
182 </body>
169 </body>
183 </html>
170 </html>
@@ -1,75 +1,77 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html>
2 <!DOCTYPE html>
3 <html xmlns="http://www.w3.org/1999/xhtml">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
4 <head>
5 <title>Error - ${c.error_message}</title>
5 <title>Error - ${c.error_message}</title>
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <meta name="robots" content="index, nofollow"/>
7 <meta name="robots" content="index, nofollow"/>
8 <link rel="icon" href="${h.asset('images/favicon.ico')}" sizes="16x16 32x32" type="image/png" />
8 <link rel="icon" href="${h.asset('images/favicon.ico')}" sizes="16x16 32x32" type="image/png" />
9
9
10
11 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
10 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
12 %if c.redirect_time:
11 %if c.redirect_time:
13 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
12 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
14 %endif
13 %endif
15
14
16 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
15 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
17 <!--[if IE]>
16 <!--[if IE]>
18 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css')}" media="screen"/>
17 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css')}" media="screen"/>
19 <![endif]-->
18 <![endif]-->
20 <style>body { background:#eeeeee; }</style>
19 <style>body { background:#eeeeee; }</style>
21
20 <script type="text/javascript">
21 // register templateContext to pass template variables to JS
22 var templateContext = {timeago: {}};
23 </script>
22 <script type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
24 <script type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
23 </head>
25 </head>
24 <body>
26 <body>
25 <% messages = h.flash.pop_messages() %>
27 <% messages = h.flash.pop_messages() %>
26
28
27 <div class="wrapper error_page">
29 <div class="wrapper error_page">
28 <div class="sidebar">
30 <div class="sidebar">
29 <a href="${h.url('home')}"><img class="error-page-logo" src="${h.asset('images/RhodeCode_Logo_Black.png')}" alt="RhodeCode"/></a>
31 <a href="${h.url('home')}"><img class="error-page-logo" src="${h.asset('images/RhodeCode_Logo_Black.png')}" alt="RhodeCode"/></a>
30 </div>
32 </div>
31 <div class="main-content">
33 <div class="main-content">
32 <h1>
34 <h1>
33 <span class="error-branding">
35 <span class="error-branding">
34 ${h.branding(c.rhodecode_name)}
36 ${h.branding(c.rhodecode_name)}
35 </span><br/>
37 </span><br/>
36 ${c.error_message} | <span class="error_message">${c.error_explanation}</span>
38 ${c.error_message} | <span class="error_message">${c.error_explanation}</span>
37 </h1>
39 </h1>
38 % if messages:
40 % if messages:
39 % for message in messages:
41 % for message in messages:
40 <div class="alert alert-${message.category}">${message}</div>
42 <div class="alert alert-${message.category}">${message}</div>
41 % endfor
43 % endfor
42 % endif
44 % endif
43 %if c.redirect_time:
45 %if c.redirect_time:
44 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
46 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
45 %endif
47 %endif
46 <div class="inner-column">
48 <div class="inner-column">
47 <h4>Possible Causes</h4>
49 <h4>Possible Causes</h4>
48 <ul>
50 <ul>
49 % if c.causes:
51 % if c.causes:
50 %for cause in c.causes:
52 %for cause in c.causes:
51 <li>${cause}</li>
53 <li>${cause}</li>
52 %endfor
54 %endfor
53 %else:
55 %else:
54 <li>The resource may have been deleted.</li>
56 <li>The resource may have been deleted.</li>
55 <li>You may not have access to this repository.</li>
57 <li>You may not have access to this repository.</li>
56 <li>The link may be incorrect.</li>
58 <li>The link may be incorrect.</li>
57 %endif
59 %endif
58 </ul>
60 </ul>
59 </div>
61 </div>
60 <div class="inner-column">
62 <div class="inner-column">
61 <h4>Support</h4>
63 <h4>Support</h4>
62 <p>For support, go to <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>.
64 <p>For support, go to <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>.
63 It may be useful to include your log file; see the log file locations <a href="${h.url('enterprise_log_file_locations')}">here</a>.
65 It may be useful to include your log file; see the log file locations <a href="${h.url('enterprise_log_file_locations')}">here</a>.
64 </p>
66 </p>
65 </div>
67 </div>
66 <div class="inner-column">
68 <div class="inner-column">
67 <h4>Documentation</h4>
69 <h4>Documentation</h4>
68 <p>For more information, see <a href="${h.url('enterprise_docs')}">docs.rhodecode.com</a>.</p>
70 <p>For more information, see <a href="${h.url('enterprise_docs')}">docs.rhodecode.com</a>.</p>
69 </div>
71 </div>
70 </div>
72 </div>
71 </div>
73 </div>
72
74
73 </body>
75 </body>
74
76
75 </html>
77 </html>
General Comments 0
You need to be logged in to leave comments. Login now