Refactor template content_title()
and prev/next buttons feature
those were intertwined but now are a bit more separate, much better
This commit is contained in:
parent
9f743daf07
commit
eafe3737dc
8 changed files with 72 additions and 45 deletions
|
@ -18,7 +18,7 @@
|
|||
</%def>
|
||||
|
||||
<%def name="content_title()">
|
||||
<h1>History for ${instance_title}</h1>
|
||||
History for ${instance_title}
|
||||
</%def>
|
||||
|
||||
${grid.render_complete()|n}
|
||||
|
|
|
@ -26,21 +26,7 @@
|
|||
</%def>
|
||||
|
||||
<%def name="content_title()">
|
||||
% if master.supports_prev_next:
|
||||
<div style="float: right;">
|
||||
% if prev_instance:
|
||||
${h.link_to(u"« Older", url('{}.view'.format(route_prefix), uuid=prev_instance.uuid), class_='button autodisable')}
|
||||
% else:
|
||||
${h.link_to(u"« Older", '#', class_='button', disabled='disabled')}
|
||||
% endif
|
||||
% if next_instance:
|
||||
${h.link_to(u"Newer »", url('{}.view'.format(route_prefix), uuid=next_instance.uuid), class_='button autodisable')}
|
||||
% else:
|
||||
${h.link_to(u"Newer »", '#', class_='button', disabled='disabled')}
|
||||
% endif
|
||||
</div>
|
||||
% endif
|
||||
<h1>${instance_title}</h1>
|
||||
${instance_title}
|
||||
</%def>
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%def name="title()">${model_title}</%def>
|
||||
|
||||
<%def name="content_title()">
|
||||
<h1>${row_title}</h1>
|
||||
${row_title}
|
||||
</%def>
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
|
|
|
@ -5,22 +5,6 @@
|
|||
|
||||
## TODO: this was basically copied from Revel diff template..need to abstract
|
||||
|
||||
<%def name="content_title()">
|
||||
<div style="float: right;">
|
||||
% if previous_transaction:
|
||||
${h.link_to(u"« Older", url('{}.version'.format(route_prefix), uuid=instance.uuid, txnid=previous_transaction.id), class_='button')}
|
||||
% else:
|
||||
${h.link_to(u"« Older", '#', class_='button', disabled='disabled')}
|
||||
% endif
|
||||
% if next_transaction:
|
||||
${h.link_to(u"Newer »", url('{}.version'.format(route_prefix), uuid=instance.uuid, txnid=next_transaction.id), class_='button')}
|
||||
% else:
|
||||
${h.link_to(u"Newer »", '#', class_='button', disabled='disabled')}
|
||||
% endif
|
||||
</div>
|
||||
<h1>${self.title()}</h1>
|
||||
</%def>
|
||||
|
||||
<div class="form-wrapper">
|
||||
|
||||
<div class="form">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue