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.
1 theme call to opigno-user-statistics-page.html.twig
- UserController::index in src/
Controller/ UserController.php - Builds render array for a user statistics index page.
File
templates/opigno-user-statistics-page.html.twigView source
- {#
- /**
- * @file
- * 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.
- */
- #}
-
- <div class="row">
- <div class="col-12">
- {# The user info section. #}
- <div class="content-box">
- <div class="user-info">
- {% if user_info.data.edit_link is not empty %}
- <div class="edit-link">
- <a href="{{ user_info.data.edit_link }}" title="{{ 'Edit'|t }}">
- <i class="fi fi-rr-edit"></i>
- </a>
- </div>
- {% endif %}
- </div>
-
- <div class="user-info__section-top">
- {# General user info. #}
- <div class="user-info-photo-wrapper">
- <div class="profile-info__pic">{{ user_info.picture }}</div>
- </div>
- <div class="user-info-text-wrapper">
- <div class="user-info-contacts">
- <h2 class="user-info-name">{{ user_info.name }}</h2>
- {% if user_info.data.role is not empty %}
- <p class="user-info-type">{{ user_info.data.role }}</p>
- {% endif %}
- {% if user_info.email is not empty %}
- <p class="user-info-email">
- <a href="{{ 'mailto:' ~ user_info.email }}" target="_blank">{{ user_info.email }}</a>
- </p>
- {% endif %}
- </div>
-
- {% if user_info.data %}
- {# Dates section. #}
- <div class="user-info-dates">
- <p class="user-info-date-joined">
- <span class="label">{{ 'Date joined'|t }}</span>
- <span>{{ user_info.data.join }}</span>
- </p>
- <p class="user-info-last-access">
- <span class="label">{{ 'Last access'|t }}</span>
- <span>{{ user_info.data.access }}</span>
- </p>
- <p class="user-info-date-joined">
- <span class="label">{{ 'Member for'|t }}</span>
- <span>{{ user_info.data.member_for }}</span>
- </p>
- </div>
- {% endif %}
- </div>
-
- {% if user_info.data %}
- <div class="user-info-connections d-none d-lg-block">
- {{ user_info.data.connections }}
- </div>
- {% endif %}
- </div>
-
- {% if user_info.data %}
- {# Connections block for mobile. #}
- <div class="content-box p-0 d-lg-none">
- {{ user_info.data.connections }}
- </div>
-
- {# The user achievements section. #}
- <div class="user-info__section-bottom">
- {% for achievement in user_info.data.achievements %}
- {{ achievement }}
- {% endfor %}
- </div>
- {% endif %}
- </div>
-
- {# Trends and charts. #}
- {% if stats is not empty %}
- <div class="content-box profile-trends">
- <h2>{{ 'Trends'|t }}</h2>
- <div class="profile-info">
- <div class="profile-info__statistics">
- <div class="filter">
- <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.trends }}
- </div>
- {{ stats.charts }}
- </div>
- </div>
- {% endif %}
-
- {# Trainings list. #}
- {% if trainings is not empty %}
- <div class="content-box trainings-list">
- <h2>{{ 'Trainings'|t }}</h2>
- <div class="trainings-list-wrapper">
- {{ trainings }}
- </div>
- </div>
- {% endif %}
- </div>
- </div>