Files
@ 51362853ac3b
Branch filter:
Location: kallithea/pylons_app/templates/base/base.html - annotation
51362853ac3b
6.1 KiB
text/html
added settings rest controllers for admin, updated routes with easier submodule handling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | 564e40829f80 564e40829f80 787689980bcd 564e40829f80 8b06c420491d d924b931b488 01d0f363f36d c8162373f214 787689980bcd 01d0f363f36d 9fe23fdab9e9 564e40829f80 564e40829f80 787689980bcd d924b931b488 d924b931b488 c60eeeb8ac4d 42d916306766 f188b156603d f188b156603d f188b156603d f188b156603d f188b156603d f188b156603d f188b156603d f188b156603d f188b156603d f188b156603d f188b156603d 3ac4350b7848 1dbe02063123 3ac4350b7848 d924b931b488 c8162373f214 d924b931b488 564e40829f80 d924b931b488 d924b931b488 d924b931b488 8b06c420491d d924b931b488 d924b931b488 564e40829f80 d924b931b488 d924b931b488 d924b931b488 d924b931b488 564e40829f80 d924b931b488 d924b931b488 9fe23fdab9e9 9fe23fdab9e9 11e8eb5a92e3 11e8eb5a92e3 25e01cb65282 25e01cb65282 c8162373f214 25e01cb65282 25e01cb65282 25e01cb65282 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 c674d994b07c 11e8eb5a92e3 11e8eb5a92e3 c8162373f214 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 8d0c7276db3d 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 710e7a75bb6b 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 710e7a75bb6b 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 408c66ecdad4 408c66ecdad4 c49010829e4d c49010829e4d 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 fdf9f6ee5217 05b212954275 fdf9f6ee5217 11e8eb5a92e3 11e8eb5a92e3 c8162373f214 11e8eb5a92e3 11e8eb5a92e3 fdf9f6ee5217 fdf9f6ee5217 fdf9f6ee5217 11e8eb5a92e3 11e8eb5a92e3 11e8eb5a92e3 c8162373f214 25e01cb65282 c8162373f214 c8162373f214 c8162373f214 c8162373f214 c8162373f214 c8162373f214 c8162373f214 c8162373f214 c8162373f214 9c390ca19deb 9c390ca19deb 9c390ca19deb 51362853ac3b c8162373f214 c8162373f214 c8162373f214 c8162373f214 c8162373f214 25e01cb65282 01d0f363f36d 2dc0c8e4f384 01d0f363f36d 9fe23fdab9e9 9fe23fdab9e9 9fe23fdab9e9 cd2ee462fc2c 15e96b5a2685 15e96b5a2685 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 8dd7305fbc2d 9fe23fdab9e9 | ## -*- coding: utf-8 -*-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
<head>
<link rel="icon" href="/images/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow"/>
<title>${next.title()}</title>
##For future use yui reset for cross browser compatability.
##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" />
${self.css()}
${self.js()}
</head>
<body class="mainbody">
<div id="container">
<div class="page-header">
<h1 class="breadcrumbs">${next.breadcrumbs()}</h1>
${self.page_nav()}
<div class="flash_msg">
<% messages = h.flash.pop_messages() %>
% if messages:
<ul id="flash-messages">
% for message in messages:
<li class="${message.category}_msg">${message}</li>
% endfor
</ul>
% endif
</div>
<div id="main">
${next.main()}
<script type="text/javascript">${h.tooltip.activate()}</script>
</div>
<div class="page-footer">
Hg App ${c.hg_app_version} © 2010 by Marcin Kuzminski
</div>
<div id="powered-by">
<p>
<a href="http://mercurial.selenic.com/" title="Mercurial">
<img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
</p>
</div>
<div id="corner-top-left"></div>
<div id="corner-top-right"></div>
<div id="corner-bottom-left"></div>
<div id="corner-bottom-right"></div>
</div>
</body>
</html>
### MAKO DEFS ###
<%def name="page_nav()">
${self.menu()}
${self.submenu()}
</%def>
<%def name="menu(current)">
<%
def is_current(selected):
if selected == current:
return "class='current'"
%>
%if current not in ['home','admin']:
##regular menu
<script type="text/javascript">
YAHOO.util.Event.onDOMReady(function(){
YAHOO.util.Event.addListener('repo_switcher','click',function(){
if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
YAHOO.util.Dom.setStyle('switch_repos','display','none');
YAHOO.util.Dom.setStyle('repo_switcher','background','');
YAHOO.util.Dom.removeClass('repo_switcher','selected');
YAHOO.util.Dom.get('repo_switcher').removeAttribute('style');
}
else{
YAHOO.util.Dom.setStyle('switch_repos','display','');
YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
YAHOO.util.Dom.setStyle('repo_switcher','color','#556CB5');
YAHOO.util.Dom.addClass('repo_switcher','selected');
}
});
YAHOO.util.Event.addListener('repos_list','change',function(e){
var wa = YAHOO.util.Dom.get('repos_list').value;
var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
window.location = url;
})
});
</script>
<ul class="page-nav">
<li>
<a id="repo_switcher" title="${_('Switch repository')}" href="#">↓</a>
<div id="switch_repos" style="display:none;position: absolute;height: 25px">
<select id="repos_list" size="=10" style="min-width: 150px">
%for repo in sorted(x.name.lower() for x in c.cached_repo_list.values()):
<option value="${repo}">${repo}</option>
%endfor
</select>
</div>
</li>
<li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
<li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
<li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
<li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
<li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
<li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
%if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
<li ${is_current('settings')}>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name))}</li>
%endif
</ul>
%else:
##Root menu
<ul class="page-nav">
<li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li>
%if h.HasPermissionAll('hg.admin')('access admin main page'):
<li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li>
%endif
<li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li>
</ul>
%endif
</div>
</%def>
<%def name="submenu(current=None)">
<%
def is_current(selected):
if selected == current:
return "class='current_submenu'"
%>
%if current != None:
<div>
<ul class="submenu">
<li ${is_current('repos')}>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
<li ${is_current('users')}>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
##commented<li ${is_current('permissions')}>${h.link_to(_('permissions'),h.url('permissions'),class_='permissions')}</li>
<li ${is_current('settings')}>${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
</ul>
</div>
%endif
</%def>
<%def name="css()">
<link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
</%def>
<%def name="js()">
<script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="/js/yui/container/container-min.js"></script>
<script type="text/javascript" src="/js/yui/datasource/datasource-min.js"></script>
<script type="text/javascript" src="/js/yui/autocomplete/autocomplete-min.js"></script>
</%def>
<!-- DEFINITION OF FORM ERROR FETCHER -->
<%def name="get_form_error(element)">
%if hasattr(c,'form_errors') and type(c.form_errors) == dict:
%if c.form_errors.get(element,False):
<span class="error-message">
${c.form_errors.get(element,'')}
</span>
%endif
%endif
</%def>
|