You are here

opigno-learning-path-step-block.html.twig in Opigno Learning path 8

Same filename and directory in other branches
  1. 3.x templates/opigno-learning-path-step-block.html.twig
<div>
  <div class="lp_steps_block_summary">
    <span class="{{ state_summary.class }}"></span>
    <h3 class="lp_steps_block_summary_title">{{ state_summary.title }}</h3>
    <p class="lp_steps_block_summary_score">{{ state_summary.score }}</p>
    <p class="lp_steps_block_summary_progress">{{ state_summary.progress }}</p>
  </div>

  <h3 class="lp_steps_block_title">{{ title }}</h3>

  <div class="tableresponsive-toggle-columns">
    <button type="button" class="link tableresponsive-toggle"
      title="Show table cells that were hidden to make the table fit within a small screen."
      style="display: none;">
      {{ 'Hide lower priority columns'|t }}
    </button>
  </div>

  {{ table_summary }}

  <table class="lp_steps_block_table responsive-enabled table table-hover" data-striping="1">

    <thead>
      <tr>
        {% for header in table_summary.headers %}
        <th>{{ header }}</th>
        {% endfor %}
      </tr>
    </thead>

    <tbody>
      {% for row in table_summary.data %}
      <tr>
        <td>{{ row.name }}</td>
        <td>
          {% if row.score %}
            <span class="lp_steps_block_score">{{ row.score }}</span>
          {% else %}
            -
          {% endif %}
        </td>
        <td>
          {% if row.state %}
          <span class="{{ row.state }}"></span>
          {% else %}
          -
          {% endif %}
        </td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>

File

templates/opigno-learning-path-step-block.html.twig
View source
  1. <div>
  2. <div class="lp_steps_block_summary">
  3. <span class="{{ state_summary.class }}"></span>
  4. <h3 class="lp_steps_block_summary_title">{{ state_summary.title }}</h3>
  5. <p class="lp_steps_block_summary_score">{{ state_summary.score }}</p>
  6. <p class="lp_steps_block_summary_progress">{{ state_summary.progress }}</p>
  7. </div>
  8. <h3 class="lp_steps_block_title">{{ title }}</h3>
  9. <div class="tableresponsive-toggle-columns">
  10. <button type="button" class="link tableresponsive-toggle"
  11. title="Show table cells that were hidden to make the table fit within a small screen."
  12. style="display: none;">
  13. {{ 'Hide lower priority columns'|t }}
  14. </button>
  15. </div>
  16. {{ table_summary }}
  17. <table class="lp_steps_block_table responsive-enabled table table-hover" data-striping="1">
  18. <thead>
  19. <tr>
  20. {% for header in table_summary.headers %}
  21. <th>{{ header }}</th>
  22. {% endfor %}
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {% for row in table_summary.data %}
  27. <tr>
  28. <td>{{ row.name }}</td>
  29. <td>
  30. {% if row.score %}
  31. <span class="lp_steps_block_score">{{ row.score }}</span>
  32. {% else %}
  33. -
  34. {% endif %}
  35. </td>
  36. <td>
  37. {% if row.state %}
  38. <span class="{{ row.state }}"></span>
  39. {% else %}
  40. -
  41. {% endif %}
  42. </td>
  43. </tr>
  44. {% endfor %}
  45. </tbody>
  46. </table>
  47. </div>