Révision e8e6dedb
Ajouté par Frédéric Péters il y a plus de 11 ans
extra/modules/strongbox_ui.ptl | ||
---|---|---|
22 | 22 |
self.strongboxtype = strongboxtype |
23 | 23 |
|
24 | 24 |
def _q_index [html] (self): |
25 |
form = Form(enctype='multipart/form-data') |
|
26 |
form.add_submit('edit', _('Edit')) |
|
27 |
form.add_submit('delete', _('Delete')) |
|
28 |
form.add_submit('back', _('Back')) |
|
29 |
|
|
30 |
if form.get_submit() == 'edit': |
|
31 |
return redirect('edit') |
|
32 |
if form.get_submit() == 'delete': |
|
33 |
return redirect('delete') |
|
34 |
if form.get_submit() == 'back': |
|
35 |
return redirect('..') |
|
36 |
|
|
37 | 25 |
html_top('strongbox', title = _('Item Type: %s') % self.strongboxtype.label) |
38 | 26 |
'<h2>%s</h2>' % _('Item Type: %s') % self.strongboxtype.label |
39 |
|
|
27 |
get_response().filter['sidebar'] = self.get_sidebar() |
|
40 | 28 |
get_session().display_message() |
41 | 29 |
|
42 |
form.render() |
|
30 |
if self.strongboxtype.validation_months: |
|
31 |
'<div class="bo-block">' |
|
32 |
'<ul>' |
|
33 |
'<li>' |
|
34 |
_('Number of months of validity:') |
|
35 |
' ' |
|
36 |
self.strongboxtype.validation_months |
|
37 |
'</li>' |
|
38 |
'</ul>' |
|
39 |
'</div>' |
|
40 |
|
|
41 |
def get_sidebar [html] (self): |
|
42 |
'<ul>' |
|
43 |
'<li><a href="edit">%s</a></li>' % _('Edit') |
|
44 |
'<li><a href="delete">%s</a></li>' % _('Delete') |
|
45 |
'</ul>' |
|
43 | 46 |
|
44 | 47 |
def edit [html] (self): |
45 | 48 |
form = self.form() |
... | ... | |
192 | 195 |
type_id = l.id |
193 | 196 |
'<li class="biglistitem" id="itemId_%s">' % type_id |
194 | 197 |
'<strong class="label"><a href="types/%s/">%s</a></strong>' % (type_id, l.label) |
195 |
'<p class="commands">' |
|
196 |
command_icon('types/%s/edit' % type_id, 'edit') |
|
197 |
command_icon('types/%s/delete' % type_id, 'remove') |
|
198 |
'</p></li>' |
|
198 |
'</li>' |
|
199 | 199 |
'</ul>' |
200 | 200 |
'</div>' |
201 | 201 |
'</div>' |
Formats disponibles : Unified diff
backoffice: renew backoffice UI with the same patterns as in w.c.s.