annotate pylons_app/templates/base/base.html @ 176:8dd7305fbc2d

moved get_form_error to base
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 21 May 2010 20:37:34 +0200
parents 664cc7341278
children 11e8eb5a92e3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
1 ## -*- coding: utf-8 -*-
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
3 <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
4 <head>
101
8b06c420491d statics moved to pylons.
Marcin Kuzminski <marcin@python-works.com>
parents: 98
diff changeset
5 <link rel="icon" href="/images/hgicon.png" type="image/png" />
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
6 <meta name="robots" content="index, nofollow"/>
98
01d0f363f36d added pygments webhelper
Marcin Kuzminski <marcin@python-works.com>
parents: 91
diff changeset
7 <title>${next.title()}</title>
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
8 ##<link rel="stylesheet" href="/js/yui/reset-fonts-grids/reset-fonts-grids.css" type="text/css" />
98
01d0f363f36d added pygments webhelper
Marcin Kuzminski <marcin@python-works.com>
parents: 91
diff changeset
9 ${self.css()}
79
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
10 ${self.js()}
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
11 </head>
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
12
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
13 <body class="mainbody">
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
14 <div id="container">
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
15 <div class="page-header">
155
42d916306766 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 154
diff changeset
16 <h1>${next.breadcrumbs()}</h1>
42d916306766 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 154
diff changeset
17 ${self.page_nav()}
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
18 </div>
105
3ac4350b7848 Html updates and fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 102
diff changeset
19 <div id="main">
3ac4350b7848 Html updates and fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 102
diff changeset
20 ${next.main()}
3ac4350b7848 Html updates and fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 102
diff changeset
21 </div>
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
22 <div class="page-footer">
63
3cf0603cd4f5 Templating small fixes
Marcin Kuzminski <marcin@python-blog.com>
parents: 50
diff changeset
23 Mercurial App &copy; 2010
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
24 </div>
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
25
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
26 <div id="powered-by">
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
27 <p>
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
28 <a href="http://mercurial.selenic.com/" title="Mercurial">
101
8b06c420491d statics moved to pylons.
Marcin Kuzminski <marcin@python-works.com>
parents: 98
diff changeset
29 <img src="/images/hglogo.png" width="75" height="90" alt="mercurial"/></a>
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
30 </p>
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
31 </div>
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
32
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
33 <div id="corner-top-left"></div>
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
34 <div id="corner-top-right"></div>
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
35 <div id="corner-bottom-left"></div>
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
36 <div id="corner-bottom-right"></div>
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
37
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
38 </div>
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
39 </body>
79
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
40 </html>
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
41
91
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
42 <%def name="page_nav()">
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
43 ${self.menu()}
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
44 </%def>
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
45
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
46
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
47 <%def name="menu(current)">
154
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
48 <script type="text/javascript">
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
49 YAHOO.util.Event.onDOMReady(function(){
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
50 YAHOO.util.Event.addListener('repo_switcher','click',function(){
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
51 if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
52 YAHOO.util.Dom.setStyle('switch_repos','display','none');
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
53 YAHOO.util.Dom.setStyle('repo_switcher','background','');
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
54 YAHOO.util.Dom.removeClass('repo_switcher','selected');
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
55 }
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
56 else{
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
57 YAHOO.util.Dom.setStyle('switch_repos','display','');
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
58 YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
59 YAHOO.util.Dom.addClass('repo_switcher','selected');
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
60 }
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
61 });
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
62 YAHOO.util.Event.addListener('repos_list','change',function(e){
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
63 var wa = YAHOO.util.Dom.get('repos_list').value;
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
64
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
65 var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
66 window.location = url;
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
67 })
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
68 });
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
69 </script>
91
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
70 <ul class="page-nav">
107
5e2470ebdbc6 Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents: 105
diff changeset
71 <li>
5e2470ebdbc6 Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents: 105
diff changeset
72 <a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
109
7b778f90a871 html updates
Marcin Kuzminski <marcin@python-works.com>
parents: 107
diff changeset
73 <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px">
166
664cc7341278 fixed repo switcher for easier switches. And took repo list from general cache
Marcin Kuzminski <marcin@python-works.com>
parents: 155
diff changeset
74 <select id="repos_list" size="=10">
664cc7341278 fixed repo switcher for easier switches. And took repo list from general cache
Marcin Kuzminski <marcin@python-works.com>
parents: 155
diff changeset
75 %for repo in c.cached_repo_list:
664cc7341278 fixed repo switcher for easier switches. And took repo list from general cache
Marcin Kuzminski <marcin@python-works.com>
parents: 155
diff changeset
76 <option value="${repo['name']}">${repo['name']}</option>
107
5e2470ebdbc6 Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents: 105
diff changeset
77 %endfor
5e2470ebdbc6 Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents: 105
diff changeset
78 </select>
5e2470ebdbc6 Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents: 105
diff changeset
79 </div>
5e2470ebdbc6 Added repo switcher, in base and long term caching for this.
Marcin Kuzminski <marcin@python-works.com>
parents: 105
diff changeset
80 </li>
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
81 <%def name="is_current(selected)">
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
82 <%
154
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
83 if selected == current:
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
84 return 'class="current"'
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
85 %>
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
86 </%def>
154
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
87 <li ${is_current('summary')|n}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
88 <li ${is_current('shortlog')|n}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
89 <li ${is_current('changelog')|n}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
90 <li ${is_current('branches')|n}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
91 <li ${is_current('tags')|n}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
085a937368d9 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 143
diff changeset
92 <li ${is_current('files')|n}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
91
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
93 </ul>
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
94 </%def>
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
95
98
01d0f363f36d added pygments webhelper
Marcin Kuzminski <marcin@python-works.com>
parents: 91
diff changeset
96 <%def name="css()">
102
2dc0c8e4f384 Updated tempaltes, added file browser breadcrumbs, and feed icons
Marcin Kuzminski <marcin@python-works.com>
parents: 101
diff changeset
97 <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
98
01d0f363f36d added pygments webhelper
Marcin Kuzminski <marcin@python-works.com>
parents: 91
diff changeset
98 </%def>
79
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
99
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
100 <%def name="js()">
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
101 <script type="text/javascript" src="/js/yui/utilities/utilities.js"></script>
176
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
102 </%def>
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
103
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
104 <!-- DEFINITION OF FORM ERROR FETCHER -->
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
105 <%def name="get_form_error(element)">
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
106 %if hasattr(c,'form_errors') and type(c.form_errors) == dict:
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
107 %if c.form_errors.get(element,False):
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
108 <span class="error-message">
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
109 ${c.form_errors.get(element,'')}
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
110 </span>
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
111 %endif
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
112 %endif
79
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
113 </%def>