rivet-1.0.x-dev/templates/navigation/menu-local-action.html.twig
templates/navigation/menu-local-action.html.twig
{#
/**
* @file
* Theme override for a single local action link.
*
* Available variables:
* - attributes: HTML attributes for the wrapper element.
* - link: A rendered link element.
*
* @see template_preprocess_menu_local_action()
*/
#}
{% set url = link['#url'] %}
{% set title = link['#title'] %}
<a href="{{url}}" class="rvt-button rvt-button--secondary">
{% if title == 'Import' %}
{{ source('@rivet/../images/rivet-icons/arrow-right.svg') }}
{% elseif title == 'Unlock' %}
{{ source('@rivet/../images/rivet-icons/lock-open.svg') }}
{% elseif title starts with 'Add' %}
{{ source('@rivet/../images/rivet-icons/plus.svg') }}
{% elseif title starts with 'Delete' %}
{{ source('@rivet/../images/rivet-icons/trash.svg') }}
{% elseif title starts with 'Edit' %}
{{ source('@rivet/../images/rivet-icons/pencil.svg') }}
{% elseif title starts with 'View' %}
{{ source('@rivet/../images/rivet-icons/eye.svg') }}
{% elseif title starts with 'Cancel' %}
{{ source('@rivet/../images/rivet-icons/close.svg') }}
{% elseif title starts with 'Save' %}
{{ source('@rivet/../images/rivet-icons/check.svg') }}
{% elseif title starts with 'Submit' %}
{{ source('@rivet/../images/rivet-icons/check.svg') }}
{% elseif title starts with 'Publish' %}
{{ source('@rivet/../images/rivet-icons/check.svg') }}
{% elseif title starts with 'Unpublish' %}
{{ source('@rivet/../images/rivet-icons/close.svg') }}
{% endif %}
{{ title }}
</a>
