Removed dependency on blockier-templates
This commit is contained in:
@@ -1,6 +1,23 @@
|
|||||||
{% extends "@blockier-templates/pages/user.html.twig" %}
|
{% extends "@admin/pages/user.html.twig" %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block body_matter %}
|
||||||
|
{% block group_box %}
|
||||||
|
{% endblock %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div id="view-user">
|
||||||
|
{% block user_box %}
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title">{{translate('USER.SUMMARY')}}</h3>
|
||||||
|
{% if 'tools' not in tools.hidden %}
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<i class="fas fa-cog"></i> <span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu box-tool-menu">
|
||||||
{% block tools %}
|
{% block tools %}
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="js-user-edit" data-user_name="{{user.user_name}}">
|
<a href="#" class="js-user-edit" data-user_name="{{user.user_name}}">
|
||||||
@@ -58,10 +75,57 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="box-body box-profile">
|
||||||
|
<img class="profile-user-img img-responsive img-circle" src="{{user.avatar}}" alt="{{user.user_name}}">
|
||||||
|
|
||||||
|
<h3 class="profile-username text-center">{{user.full_name}}</h3>
|
||||||
|
<div class="text-center">
|
||||||
|
{% if user.flag_enabled == 0 %}
|
||||||
|
<i class="fas fa-fw fa-minus-circle fa-lg text-red" title="{{translate('DISABLED')}}"></i>
|
||||||
|
{% endif %}
|
||||||
|
{% if user.flag_verified == 0 %}
|
||||||
|
<i class="fas fa-fw fa-bolt fa-lg text-yellow" title="{{translate('UNACTIVATED')}}"></i>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<h4 class="text-muted text-center">{{user.user_name}}{% if 'group' not in fields.hidden and user.group.name is not null %} • {{user.group.name}}{% endif %}</h4>
|
||||||
|
|
||||||
{% block user_box %}
|
{% if 'email' not in fields.hidden %}
|
||||||
{{ parent() }}
|
<hr>
|
||||||
|
<strong><i class="fas fa-envelope margin-r-5"></i> {{translate("EMAIL")}}</strong>
|
||||||
|
<p class="text-muted box-profile-property js-copy-container">
|
||||||
|
<i class="fas fa-copy uf-copy-trigger js-copy-trigger"></i>
|
||||||
|
<span class="js-copy-target">{{user.email}}</span>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if 'locale' not in fields.hidden %}
|
||||||
|
<hr>
|
||||||
|
<strong><i class="fas fa-language margin-r-5"></i> {{translate("LOCALE")}}</strong>
|
||||||
|
<p class="text-muted box-profile-property">
|
||||||
|
{{locales[user.locale]}}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block user_profile %}{% endblock %}
|
||||||
|
|
||||||
|
{% if 'roles' not in fields.hidden %}
|
||||||
|
<hr>
|
||||||
|
<strong><i class="fas fa-id-card margin-r-5"></i> {{translate("ROLE", 2)}}</strong>
|
||||||
|
<p class="box-profile-property">
|
||||||
|
{% for role in user.roles %}
|
||||||
|
<span class="label label-primary" title="{{role.description}}">{{role.name}}</span>
|
||||||
|
{% endfor %}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
{% block organisations_box %}
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fas fa-sitemap"></i> {{translate('USER.ORGANISATIONS')}}</h3>
|
<h3 class="box-title"><i class="fas fa-sitemap"></i> {{translate('USER.ORGANISATIONS')}}</h3>
|
||||||
@@ -75,7 +139,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<small class="user-organisation-description">{{organisation.description}}</small>
|
<small class="user-organisation-description">{{organisation.description}}</small>
|
||||||
</div>
|
</div>
|
||||||
{% if hasRole('site-admin') or hasRole('organisations-admin') -%}
|
{% if checkAccess('update_user_field', { 'user' : user, 'fields' : ['organisations'] }) or hasRole('organisations-admin') -%}
|
||||||
<div class="col-xs-3" style="margin-top: -5px;">
|
<div class="col-xs-3" style="margin-top: -5px;">
|
||||||
<button type="button" data-slug="{{organisation.slug}}" data-user_name="{{user.user_name}}" class="btn btn-danger js-member-remove margin-r-5" style="min-width: 70px">{{translate("REMOVE")}}</button>
|
<button type="button" data-slug="{{organisation.slug}}" data-user_name="{{user.user_name}}" class="btn btn-danger js-member-remove margin-r-5" style="min-width: 70px">{{translate("REMOVE")}}</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,7 +154,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<small class="user-organisation-description">{{organisation.description}}</small>
|
<small class="user-organisation-description">{{organisation.description}}</small>
|
||||||
</div>
|
</div>
|
||||||
{% if hasRole('site-admin') or hasRole('organisations-admin') -%}
|
{% if checkAccess('update_user_field', { 'user' : user, 'fields' : ['organisations'] }) or hasRole('organisations-admin') -%}
|
||||||
<div class="col-xs-3" style="margin-top: -5px;">
|
<div class="col-xs-3" style="margin-top: -5px;">
|
||||||
<button type="button" data-slug="{{organisation.slug}}" data-user_name="{{user.user_name}}" class="btn btn-danger js-member-remove margin-r-5" style="min-width: 70px">{{translate("REMOVE")}}</button>
|
<button type="button" data-slug="{{organisation.slug}}" data-user_name="{{user.user_name}}" class="btn btn-danger js-member-remove margin-r-5" style="min-width: 70px">{{translate("REMOVE")}}</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,3 +166,48 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if 'activities' not in widgets.hidden %}
|
||||||
|
<div class="col-lg-8">
|
||||||
|
{% block activity_box %}
|
||||||
|
<div id="widget-user-activities" class="box box-primary">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><i class="fas fa-fw fa-tasks"></i> {{translate('ACTIVITY', 2)}}</h3>
|
||||||
|
{% include "tables/table-tool-menu.html.twig" %}
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
{% include "tables/activities.html.twig" with {
|
||||||
|
"table" : {
|
||||||
|
"id" : "table-user-activities"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% if 'permissions' not in widgets.hidden %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div id="widget-permissions" class="box box-primary">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title pull-left"><i class="fas fa-key fa-fw"></i> {{translate('PERMISSION', 2)}}</h3>
|
||||||
|
{% include "tables/table-tool-menu.html.twig" %}
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
{% include "tables/permissions.html.twig" with {
|
||||||
|
"table" : {
|
||||||
|
"id" : "table-permissions",
|
||||||
|
"columns" : ["via_roles"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user