annotate pylons_app/templates/base/base.html @ 216:c8162373f214

Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 24 May 2010 22:20:21 +0200
parents c674d994b07c
children 64e1125fc479
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>
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
8 ##For future use yui reset for cross browser compatability.
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
9 ##<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
10 ${self.css()}
79
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
11 ${self.js()}
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
12 </head>
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
13
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents: 109
diff changeset
14 <body class="mainbody">
44
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
15 <div id="container">
d924b931b488 Added managment pages.
marcink
parents: 0
diff changeset
16 <div class="page-header">
155
42d916306766 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 154
diff changeset
17 <h1>${next.breadcrumbs()}</h1>
42d916306766 updated erros found in base.html
Marcin Kuzminski <marcin@python-works.com>
parents: 154
diff changeset
18 ${self.page_nav()}
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">
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
23 Hg App ${c.hg_app_version} &copy; 2010 by Marcin Kuzminski
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
182
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
42 ### MAKO DEFS ###
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
43
91
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
44 <%def name="page_nav()">
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
45 ${self.menu()}
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
46 ${self.submenu()}
91
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
47 </%def>
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
48
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
49 <%def name="menu(current)">
182
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
50 <%
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
51 def is_current(selected):
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
52 if selected == current:
208
c674d994b07c html fix
Marcin Kuzminski <marcin@python-works.com>
parents: 185
diff changeset
53 return "class='current'"
182
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
54 %>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
55 %if current not in ['home','admin']:
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
56 ##regular menu
182
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
57 <script type="text/javascript">
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
58 YAHOO.util.Event.onDOMReady(function(){
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
59 YAHOO.util.Event.addListener('repo_switcher','click',function(){
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
60 if(YAHOO.util.Dom.hasClass('repo_switcher','selected')){
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
61 YAHOO.util.Dom.setStyle('switch_repos','display','none');
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
62 YAHOO.util.Dom.setStyle('repo_switcher','background','');
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
63 YAHOO.util.Dom.removeClass('repo_switcher','selected');
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
64 }
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
65 else{
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
66 YAHOO.util.Dom.setStyle('switch_repos','display','');
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
67 YAHOO.util.Dom.setStyle('repo_switcher','background','#FFFFFF');
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
68 YAHOO.util.Dom.addClass('repo_switcher','selected');
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
69 }
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
70 });
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
71 YAHOO.util.Event.addListener('repos_list','change',function(e){
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
72 var wa = YAHOO.util.Dom.get('repos_list').value;
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
73
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
74 var url = "${h.url('summary_home',repo_name='__REPLACE__')}".replace('__REPLACE__',wa);
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
75 window.location = url;
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
76 })
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
77 });
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
78 </script>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
79 <ul class="page-nav">
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
80 <li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
81 <a id="repo_switcher" title="${_('Switch repository')}" href="#">&darr;</a>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
82 <div id="switch_repos" style="display:none;position: absolute;width: 150px;height: 25px">
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
83 <select id="repos_list" size="=10">
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
84 %for repo in c.cached_repo_list:
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
85 <option value="${repo['name']}">${repo['name']}</option>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
86 %endfor
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
87 </select>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
88 </div>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
89 </li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
90 <li ${is_current('summary')}>${h.link_to(_('summary'),h.url('summary_home',repo_name=c.repo_name))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
91 <li ${is_current('shortlog')}>${h.link_to(_('shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
92 <li ${is_current('changelog')}>${h.link_to(_('changelog'),h.url('changelog_home',repo_name=c.repo_name))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
93 <li ${is_current('branches')}>${h.link_to(_('branches'),h.url('branches_home',repo_name=c.repo_name))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
94 <li ${is_current('tags')}>${h.link_to(_('tags'),h.url('tags_home',repo_name=c.repo_name))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
95 <li ${is_current('files')}>${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
96 </ul>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
97 %else:
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
98 ##Root menu
182
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
99 <ul class="page-nav">
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
100 <li ${is_current('home')}>${h.link_to(_('Home'),h.url('/'))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
101 <li ${is_current('admin')}>${h.link_to(_('Admin'),h.url('admin_home'))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
102 <li class="logout">${h.link_to(u'Logout',h.url('logout_home'))}</li>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
103 </ul>
11e8eb5a92e3 new way of menu generation for base, and all admin pages
Marcin Kuzminski <marcin@python-works.com>
parents: 176
diff changeset
104 %endif
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
105 </div>
91
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
106 </%def>
216
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
107 <%def name="submenu(current=None)">
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
108 <%
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
109 def is_current(selected):
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
110 if selected == current:
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
111 return "class='current_submenu'"
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
112 %>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
113 %if current != None:
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
114 <div>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
115 <ul class="submenu">
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
116 <li ${is_current('repos')}>${h.link_to(u'repos',h.url('repos'))}</li>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
117 <li ${is_current('users')}>${h.link_to(u'users',h.url('users'))}</li>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
118 </ul>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
119 <br/>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
120 </div>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
121 %endif
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
122 </%def>
c8162373f214 Cleaned the way based was used to generate submenu for admin, now it's much more clear to use submenu. Cleaned admin and added comment to middleware
Marcin Kuzminski <marcin@python-works.com>
parents: 208
diff changeset
123
91
25e01cb65282 Added menu generation as function
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
124
98
01d0f363f36d added pygments webhelper
Marcin Kuzminski <marcin@python-works.com>
parents: 91
diff changeset
125 <%def name="css()">
102
2dc0c8e4f384 Updated tempaltes, added file browser breadcrumbs, and feed icons
Marcin Kuzminski <marcin@python-works.com>
parents: 101
diff changeset
126 <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
127 </%def>
79
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
128
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
129 <%def name="js()">
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
130 <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
131 </%def>
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
132
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
133 <!-- DEFINITION OF FORM ERROR FETCHER -->
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
134 <%def name="get_form_error(element)">
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
135 %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
136 %if c.form_errors.get(element,False):
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
137 <span class="error-message">
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
138 ${c.form_errors.get(element,'')}
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
139 </span>
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
140 %endif
8dd7305fbc2d moved get_form_error to base
Marcin Kuzminski <marcin@python-works.com>
parents: 166
diff changeset
141 %endif
79
9fe23fdab9e9 Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents: 74
diff changeset
142 </%def>