opigno-dashboard-user-statistics-block.html.twig in Opigno dashboard 3.x
Default theme implementation to display the User statistics block.
Available variables:
- user_name: the user name;
- uid: the user ID;
- user_picture: the rendered user profile picture;
- role: the user role;
- stats: user trainings stats.
1 theme call to opigno-dashboard-user-statistics-block.html.twig
- UserStatisticsBlock::build in src/
Plugin/ Block/ UserStatisticsBlock.php - Builds and returns the renderable array for this block plugin.
File
templates/opigno-dashboard-user-statistics-block.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display the User statistics block.
- *
- * Available variables:
- * - user_name: the user name;
- * - uid: the user ID;
- * - user_picture: the rendered user profile picture;
- * - role: the user role;
- * - stats: user trainings stats.
- */
- #}
-
- <div class="content-box profile-info">
- <div class="edit-link">
- <a href="{{ path('entity.user.edit_form', { 'user': uid }) }}">
- <i class="fi fi-rr-edit"></i>
- </a>
- </div>
-
- <div class="profile-info__body">
- <div class="profile-info__pic">{{ user_picture }}</div>
- <a href="{{ path('entity.user.canonical', { 'user': uid }) }}">
- <h2 class="profile-info__name">{{ user_name }}</h2>
- </a>
- <div class="profile-info__type">{{ role }}</div>
- </div>
-
- <div class="profile-info__statistics">
- <div class="filter">
- <div class="filter__label">{{ 'Trends'|t }}</div>
- <select name="filterRange" id="filterRange" class="form-select selectpicker">
- <option value="7">{{ 'Last 7 days'|t }}</option>
- <option value="30">{{ 'Last 30 days'|t }}</option>
- </select>
- </div>
- {{ stats }}
- </div>
- </div>