You are here

insert-button-widget.html.twig in Insert 8.2

Same filename and directory in other branches
  1. 8 templates/insert-button-widget.html.twig

Template file for the insert button.

File

templates/insert-button-widget.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template file for the insert button.
  5. */
  6. #}
  7. {% if insert.settings.rotate %}
  8. <div class="insert-rotate">
  9. <label>{{ 'Rotate'|trans }}</label>
  10. <span class="insert-rotate-controls">
  11. <span class="insert-rotate-controls-left"><a href="{{ url('insert.rotate', {'fid': insert.settings.fid, 'degree': 270, 'nid': nid}) }}">↺</a></span>
  12. <span class="insert-rotate-controls-right"><a href="{{ url('insert.rotate', {'fid': insert.settings.fid, 'degree': 90, 'nid': nid}) }}">↻</a></span>
  13. </span>
  14. </div>
  15. {% endif %}
  16. {% if insert.settings.align %}
  17. <div class="insert-align form-type-radios">
  18. <label>{{ 'Align'|trans }}</label>
  19. <span class="insert-align-controls container-inline">
  20. <span class="insert-align-controls-none form-type-radio">
  21. <input type="radio" id="insert-{{ id }}-align-none" name="insert-{{ id }}[align]" value="none" checked />
  22. <label for="insert-{{ id }}-align-none">{{ 'None'|trans }}</label>
  23. </span>
  24. <span class="insert-align-controls-left form-type-radio">
  25. <input type="radio" id="insert-{{ id }}-align-left" name="insert-{{ id }}[align]" value="left" />
  26. <label for="insert-{{ id }}-align-left">{{ 'Left'|trans }}</label>
  27. </span>
  28. <span class="insert-align-controls-center form-type-radio">
  29. <input type="radio" id="insert-{{ id }}-align-center" name="insert-{{ id }}[align]" value="center" />
  30. <label for="insert-{{ id }}-align-center">{{ 'Center'|trans }}</label>
  31. </span>
  32. <span class="insert-align-controls-right form-type-radio">
  33. <input type="radio" id="insert-{{ id }}-align-right" name="insert-{{ id }}[align]" value="right" />
  34. <label for="insert-{{ id }}-align-right">{{ 'Right'|trans }}</label>
  35. </span>
  36. </span>
  37. </div>
  38. {% endif %}
  39. {% if insert.styles|length > 1 %}
  40. <div class="insert-style-select">
  41. <label for="insert-{{ id }}">{{ 'Style'|trans }}</label>
  42. <select id="insert-{{ id }}" class="insert-style">
  43. {% for value, style in insert.styles %}
  44. <option value="{{ value }}"{% if value == insert.default_style %}{{ 'selected="selected"' }}{% endif %}>{{ style }}</option>
  45. {% endfor %}
  46. </select>
  47. </div>
  48. {% else %}
  49. <input type="hidden" class="insert-style" value="{{ insert.default_style }}" />
  50. {% endif %}
  51. <span class="insert-button-wrapper"><span class="insert-button-overlay"></span><input type="submit" class="button js-form-submit form-submit insert-button" onclick="return false;" value="{{ 'Insert'|trans }}" data-insert-id="{{ insert.id }}" /></span>