My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones    
 
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
# -*- coding: utf-8 -*-
<%!
from formalchemy.ext.pylons.controller import model_url
from pylons import url
%>
<%def name="h1(title, href=None)">
<h1 id="header" class="ui-widget-header ui-corner-all">
%if breadcrumb:
<div class="breadcrumb">
/${'/'.join([u and '<a href="%s">%s</a>' % (u,n.lower()) or n.lower() for u,n in breadcrumb])|n}
</div>
%endif
%if href:
<a href="${href}">${title.title()}</a>
%else:
${title.title()}
%endif
</h1>
</%def>
<%def name="buttons()">
<p class="fa_field">
<a class="ui-widget-header ui-widget-link ui-widget-button ui-corner-all" href="#">
<input type="submit" value="${F_('Save')}" />
</a>
<a class="ui-widget-header ui-widget-link ui-corner-all" href="${model_url(collection_name)}">
<span class="ui-icon ui-icon-circle-arrow-w"></span>
${F_('Cancel')}
</a>
</p>
</%def>
<html>
<head>
<title>
${collection_name.title()}
</title>
<link rel="stylesheet" type="text/css" href="${url('fa_static', path_info='/admin.css')}" />
</head>
<body>
<div id="content" class="ui-admin ui-widget">
%if isinstance(models, dict):
<h1 id="header" class="ui-widget-header ui-corner-all">${F_('Models')}</h1>
%for name in sorted(models):
<p>
<a class="ui-state-default ui-corner-all" href="${models[name]}">${name}</a>
</p>
%endfor
%elif is_grid:
${h1(model_name)}
<div class="ui-pager">
${pager|n}
</div>
<table class="layout-grid">
${fs.render()|n}
</table>
<p>
<a class="ui-widget-header ui-widget-link ui-corner-all" href="${model_url('new_%s' % member_name)}">
<span class="ui-icon ui-icon-circle-plus"></span>
${F_('New')} ${model_name}
</a>
</p>
%else:
${h1(model_name, href=model_url(collection_name))}
%if action == 'show':
<table>
${fs.render()|n}
</table>
<p class="fa_field">
<a class="ui-widget-header ui-widget-link ui-corner-all" href="${model_url('edit_%s' % member_name, id=id)}">
<span class="ui-icon ui-icon-pencil"></span>
${F_('Edit')}
</a>
</p>
%elif action == 'edit':
<form action="${model_url(member_name, id=id)}" method="POST" enctype="multipart/form-data">
${fs.render()|n}
<input type="hidden" name="_method" value="PUT" />
${buttons()}
</form>
%else:
<form action="${model_url(collection_name)}" method="POST" enctype="multipart/form-data">
${fs.render()|n}
${buttons()}
</form>
%endif
%endif
</div>
<script type="text/javascript">
var icons = document.getElementsByClassName('ui-icon')
for (var i = 0; i < icons.length-1; i++) {
icons[i].setAttribute('value', ' ');
}
</script>
</body></html>

Change log

74be13d74370 by Gael Pasgrimaud <g...@gawel.org> on Feb 28, 2010   Diff
fix template for pylons 1.0b1
Go to: 
Project members, sign in to write a code review

Older revisions

1790c1c710e6 by Gael Pasgrimaud <g...@gawel.org> on Oct 11, 2009   Diff
i18n stuff
3b11b78aa9a9 by Gael Pasgrimaud <g...@gawel.org> on Oct 2, 2009   Diff
move forms to forms/ in paster
template. add restfieldset.mako_tmpl
move admin resource to resources/
paster template now use the new admin
interface
All revisions of this file

File info

Size: 2872 bytes, 93 lines
Powered by Google Project Hosting