Files
notifications-admin/app/templates/components/page-footer.html
Chris Hill-Scott ac948ceb19 Make delete link flush left when there’s no button
The delete link was designed to be used with a button, where it needs
some padding to separate it from the button.

We now have a case where it’s being used without an accompanying button,
so we need a variation without that padding.
2017-04-18 13:49:01 +01:00

29 lines
1.0 KiB
HTML

{% macro page_footer(
button_text=None,
destructive=False,
back_link=False,
back_link_text="Back",
secondary_link=False,
secondary_link_text=None,
delete_link=False,
delete_link_text="delete"
) %}
<div class="page-footer">
{% if button_text %}
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="button{% if destructive %}-destructive{% endif %}" value="{{ button_text }}" />
{% endif %}
{% if back_link %}
<a class="page-footer-back-link" href="{{ back_link }}">{{ back_link_text }}</a>
{% endif %}
{% if delete_link %}
<span class="page-footer-delete-link {% if not button_text %}page-footer-delete-link-without-button{% endif %}">
<a href="{{ delete_link }}">{{ delete_link_text }}</a>
</span>
{% endif %}
{% if secondary_link and secondary_link_text %}
<a class="page-footer-secondary-link" href="{{ secondary_link }}">{{ secondary_link_text }}</a>
{% endif %}
</div>
{% endmacro %}