You are here

lingotek-target-status.html.twig in Lingotek Translation 3.3.x

Default theme implementation of the Lingotek target status.

Available variables:

  • entity: The entity which status we want to display.
  • language: The language code.
  • status: The status for that translation.
  • url: An optional \Drupal\Core\Url object.
  • new_window: A flag indicating if the link should be opened in a new window.
  • status_text: The status text, mainly though for link title.

File

templates/lingotek-target-status.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of the Lingotek target status.
  5. *
  6. * Available variables:
  7. * - entity: The entity which status we want to display.
  8. * - language: The language code.
  9. * - status: The status for that translation.
  10. * - url: An optional \Drupal\Core\Url object.
  11. * - new_window: A flag indicating if the link should be opened in a new window.
  12. * - status_text: The status text, mainly though for link title.
  13. *
  14. * @see template_preprocess()
  15. * @see template_preprocess_lingotek_target_status()
  16. *
  17. * @ingroup themeable
  18. */
  19. #}
  20. {% if url %}<a href="{{ url }}"{%if new_window%} target="_blank"{%endif%}{%else%}<span{%endif%} class="language-icon target-{{status|lower}}" title="{{status_text}}">{{language|upper}}{%if url%}</a>{%else%}</span>{%endif%}