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