You are here

block--opigno-module-learning-path-progress-block.html.twig in Opigno module 3.x

Default theme implementation to display a block.

Available variables:

  • plugin_id: The ID of the block implementation.
  • label: The configured label of the block if visible.
  • configuration: A list of the block's configuration values.
    • label: The configured label for the block.
    • label_display: The display settings for the label.
    • provider: The module or other provider that provided this block plugin.
    • Block plugin specific settings will also be stored here.
  • content: The content of this block.
  • attributes: array of HTML attributes populated by modules, intended to be added to the main container tag of this template.

    • id: A valid HTML ID and guaranteed unique.
  • title_attributes: Same as attributes, except applied to the main title tag that appears in the template.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.

File

templates/block--opigno-module-learning-path-progress-block.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a block.
  5. *
  6. * Available variables:
  7. * - plugin_id: The ID of the block implementation.
  8. * - label: The configured label of the block if visible.
  9. * - configuration: A list of the block's configuration values.
  10. * - label: The configured label for the block.
  11. * - label_display: The display settings for the label.
  12. * - provider: The module or other provider that provided this block plugin.
  13. * - Block plugin specific settings will also be stored here.
  14. * - content: The content of this block.
  15. * - attributes: array of HTML attributes populated by modules, intended to
  16. * be added to the main container tag of this template.
  17. * - id: A valid HTML ID and guaranteed unique.
  18. * - title_attributes: Same as attributes, except applied to the main title
  19. * tag that appears in the template.
  20. * - title_prefix: Additional output populated by modules, intended to be
  21. * displayed in front of the main title tag that appears in the template.
  22. * - title_suffix: Additional output populated by modules, intended to be
  23. * displayed after the main title tag that appears in the template.
  24. *
  25. * @see template_preprocess_block()
  26. *
  27. * @ingroup themeable
  28. */
  29. #}
  30. {% if content.ajax_conteiner %}
  31. {{ content.progress }}
  32. {% else %}
  33. <div {{ attributes.addClass('content-box', 'lp_progress_wrapper') }}>
  34. {{ title_prefix }}
  35. {% if label %}
  36. <h2{{ title_attributes }}>{{ label }}</h2>
  37. {% endif %}
  38. {{ title_suffix }}
  39. <div class="lp_progress">
  40. <div class="lp_progress_label">{{ 'Global Training Progress'|t }}</div>
  41. <div class="lp_progress_bar">
  42. <div class="lp_progress_bar_completed" style="width: {{ content.progress }}%"></div>
  43. </div>
  44. <div class="lp_progress_value">{{ content.progress }}%</div>
  45. </div>
  46. {% if content.home_link %}
  47. <div class="home-link bg-faded d-flex ml-md-3">
  48. {{ content.home_link|render|raw }}
  49. </div>
  50. {% endif %}
  51. {% if content.fullpage %}
  52. <div class="fullscreen-link bg-faded d-flex ml-md-3">
  53. <a href="#"><i class="fi fi-rr-expand"></i><i class="fi fi-rr-compress"></i></a>
  54. </div>
  55. {% endif %}
  56. </div>
  57. {% endif %}