##// END OF EJS Templates
moved get_form_error to base
marcink -
r176:8dd7305f default
parent child Browse files
Show More
@@ -1,102 +1,113 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
4 4 <head>
5 5 <link rel="icon" href="/images/hgicon.png" type="image/png" />
6 6 <meta name="robots" content="index, nofollow"/>
7 7 <title>${next.title()}</title>
8 8 ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" />
9 9 ${self.css()}
10 10 ${self.js()}
11 11 </head>
12 12
13 13 <body class="mainbody">
14 14 <div id="container">
15 15 <div class="page-header">
16 16 <h1>${next.breadcrumbs()}</h1>
17 17 ${self.page_nav()}
18 18 </div>
19 19 <div id="main">
20 20 ${next.main()}
21 21 </div>
22 22 <div class="page-footer">
23 23 Mercurial App &copy; 2010
24 24 </div>
25 25
26 26 <div id="powered-by">
27 27 <p>
28 28 <a href="http://mercurial.selenic.com/" title="Mercurial">
29 29 <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
30 30 </p>
31 31 </div>
32 32
33 33 <div id="corner-top-left"></div>
34 34 <div id="corner-top-right"></div>
35 35 <div id="corner-bottom-left"></div>
36 36 <div id="corner-bottom-right"></div>
37 37
38 38 </div>
39 39 </body>
40 40 </html>
41 41
42 42 <%def name="page_nav()">
43 43 ${self.menu()}
44 44 </%def>
45 45
46 46
47 47 <%def name="menu(current)">
48 48 <script type="text/javascript">
49 49 YAHOO.util.Event.onDOMReady(function(){
50 50 YAHOO.util.Event.addListener('repo_switcher','click',function(){
51 51 if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
52 52 YAHOO.util.Dom.setStyle('switch_repos','display','none');
53 53 YAHOO.util.Dom.setStyle('repo_switcher','background','');
54 54 YAHOO.util.Dom.removeClass('repo_switcher','selected');
55 55 }
56 56 else{
57 57 YAHOO.util.Dom.setStyle('switch_repos','display','');
58 58 YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
59 59 YAHOO.util.Dom.addClass('repo_switcher','selected');
60 60 }
61 61 });
62 62 YAHOO.util.Event.addListener('repos_list','change',function(e){
63 63 var wa = YAHOO.util.Dom.get('repos_list').value;
64 64
65 65 var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
66 66 window.location = url;
67 67 })
68 68 });
69 69 </script>
70 70 <ul class="page-nav">
71 71 <li>
72 72 <a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
73 73 <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px">
74 74 <select id="repos_list" size="=10">
75 75 %for repo in c.cached_repo_list:
76 76 <option value="${repo['name']}">${repo['name']}</option>
77 77 %endfor
78 78 </select>
79 79 </div>
80 80 </li>
81 81 <%def name="is_current(selected)">
82 82 <%
83 83 if selected == current:
84 84 return 'class="current"'
85 85 %>
86 86 </%def>
87 87 <li ${is_current('summary')|n}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
88 88 <li ${is_current('shortlog')|n}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
89 89 <li ${is_current('changelog')|n}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
90 90 <li ${is_current('branches')|n}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
91 91 <li ${is_current('tags')|n}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
92 92 <li ${is_current('files')|n}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
93 93 </ul>
94 94 </%def>
95 95
96 96 <%def name="css()">
97 97 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
98 98 </%def>
99 99
100 100 <%def name="js()">
101 101 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
102 </%def>
103
104 <!-- DEFINITION OF FORM ERROR FETCHER -->
105 <%def name="get_form_error(element)">
106 %if hasattr(c,'form_errors') and type(c.form_errors) == dict:
107 %if c.form_errors.get(element,False):
108 <span class="error-message">
109 ${c.form_errors.get(element,'')}
110 </span>
111 %endif
112 %endif
102 113 </%def> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now