You are here

opigno-user-statistics-page.html.twig in Opigno statistics 3.x

Theme implementation to display user statistics page.

Available variables:

  • user_info: the main user info;
  • stats: the user statistics block (trends and charts);
  • trainings: the trainings list table.

File

templates/opigno-user-statistics-page.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme implementation to display user statistics page.
  5. *
  6. * Available variables:
  7. * - user_info: the main user info;
  8. * - stats: the user statistics block (trends and charts);
  9. * - trainings: the trainings list table.
  10. */
  11. #}
  12. <div class="row">
  13. <div class="col-12">
  14. {# The user info section. #}
  15. <div class="content-box">
  16. <div class="user-info">
  17. {% if user_info.data.edit_link is not empty %}
  18. <div class="edit-link">
  19. <a href="{{ user_info.data.edit_link }}" title="{{ 'Edit'|t }}">
  20. <i class="fi fi-rr-edit"></i>
  21. </a>
  22. </div>
  23. {% endif %}
  24. </div>
  25. <div class="user-info__section-top">
  26. {# General user info. #}
  27. <div class="user-info-photo-wrapper">
  28. <div class="profile-info__pic">{{ user_info.picture }}</div>
  29. </div>
  30. <div class="user-info-text-wrapper">
  31. <div class="user-info-contacts">
  32. <h2 class="user-info-name">{{ user_info.name }}</h2>
  33. {% if user_info.data.role is not empty %}
  34. <p class="user-info-type">{{ user_info.data.role }}</p>
  35. {% endif %}
  36. {% if user_info.email is not empty %}
  37. <p class="user-info-email">
  38. <a href="{{ 'mailto:' ~ user_info.email }}" target="_blank">{{ user_info.email }}</a>
  39. </p>
  40. {% endif %}
  41. </div>
  42. {% if user_info.data %}
  43. {# Dates section. #}
  44. <div class="user-info-dates">
  45. <p class="user-info-date-joined">
  46. <span class="label">{{ 'Date joined'|t }}</span>
  47. <span>{{ user_info.data.join }}</span>
  48. </p>
  49. <p class="user-info-last-access">
  50. <span class="label">{{ 'Last access'|t }}</span>
  51. <span>{{ user_info.data.access }}</span>
  52. </p>
  53. <p class="user-info-date-joined">
  54. <span class="label">{{ 'Member for'|t }}</span>
  55. <span>{{ user_info.data.member_for }}</span>
  56. </p>
  57. </div>
  58. {% endif %}
  59. </div>
  60. {% if user_info.data %}
  61. <div class="user-info-connections d-none d-lg-block">
  62. {{ user_info.data.connections }}
  63. </div>
  64. {% endif %}
  65. </div>
  66. {% if user_info.data %}
  67. {# Connections block for mobile. #}
  68. <div class="content-box p-0 d-lg-none">
  69. {{ user_info.data.connections }}
  70. </div>
  71. {# The user achievements section. #}
  72. <div class="user-info__section-bottom">
  73. {% for achievement in user_info.data.achievements %}
  74. {{ achievement }}
  75. {% endfor %}
  76. </div>
  77. {% endif %}
  78. </div>
  79. {# Trends and charts. #}
  80. {% if stats is not empty %}
  81. <div class="content-box profile-trends">
  82. <h2>{{ 'Trends'|t }}</h2>
  83. <div class="profile-info">
  84. <div class="profile-info__statistics">
  85. <div class="filter">
  86. <select name="filterRange" id="filterRange" class="form-select selectpicker">
  87. <option value="7">{{ 'Last 7 days'|t }}</option>
  88. <option value="30">{{ 'Last 30 days'|t }}</option>
  89. </select>
  90. </div>
  91. {{ stats.trends }}
  92. </div>
  93. {{ stats.charts }}
  94. </div>
  95. </div>
  96. {% endif %}
  97. {# Trainings list. #}
  98. {% if trainings is not empty %}
  99. <div class="content-box trainings-list">
  100. <h2>{{ 'Trainings'|t }}</h2>
  101. <div class="trainings-list-wrapper">
  102. {{ trainings }}
  103. </div>
  104. </div>
  105. {% endif %}
  106. </div>
  107. </div>