Give older/newer buttons the autodisable treatment

This commit is contained in:
Lance Edgar 2017-08-13 20:07:37 -05:00
parent 0e42efd32b
commit 4639d4a7db

View file

@ -30,12 +30,12 @@
% if master.supports_prev_next: % if master.supports_prev_next:
<div style="float: right;"> <div style="float: right;">
% if prev_instance: % if prev_instance:
${h.link_to(u"« Older", url('{}.view'.format(route_prefix), uuid=prev_instance.uuid), class_='button')} ${h.link_to(u"« Older", url('{}.view'.format(route_prefix), uuid=prev_instance.uuid), class_='button autodisable')}
% else: % else:
${h.link_to(u"« Older", '#', class_='button', disabled='disabled')} ${h.link_to(u"« Older", '#', class_='button', disabled='disabled')}
% endif % endif
% if next_instance: % if next_instance:
${h.link_to(u"Newer »", url('{}.view'.format(route_prefix), uuid=next_instance.uuid), class_='button')} ${h.link_to(u"Newer »", url('{}.view'.format(route_prefix), uuid=next_instance.uuid), class_='button autodisable')}
% else: % else:
${h.link_to(u"Newer »", '#', class_='button', disabled='disabled')} ${h.link_to(u"Newer »", '#', class_='button', disabled='disabled')}
% endif % endif