212 lines
10 KiB
Twig
212 lines
10 KiB
Twig
{% extends "@blockier-templates/pages/dashboard.html.twig" %}
|
|
|
|
{% block info_boxes_users %}
|
|
{% if hasRole('site-admin') or hasRole('organisations-admin') %}
|
|
<div class="row">
|
|
{% block info_box_users %}
|
|
{% if checkAccess('uri_users') %}
|
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
|
<a href="{{site.uri.public}}/users">
|
|
<div class="info-box">
|
|
<span class="info-box-icon bg-aqua"><i class="fas fa-user fa-fw"></i></span>
|
|
<div class="info-box-content">
|
|
<span class="info-box-text">{{ translate("USER", 2) }}</span>
|
|
<span class="info-box-number">{{counter.users}}</span>
|
|
</div>
|
|
<!-- /.info-box-content -->
|
|
</div>
|
|
<!-- /.info-box -->
|
|
</a>
|
|
</div>
|
|
<!-- /.col -->
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block info_box_roles %}
|
|
{% if checkAccess('uri_roles') %}
|
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
|
<a href="{{site.uri.public}}/roles">
|
|
<div class="info-box">
|
|
<span class="info-box-icon bg-red"><i class="fas fa-id-card"></i></span>
|
|
<div class="info-box-content">
|
|
<span class="info-box-text">{{ translate("ROLE", 2) }}</span>
|
|
<span class="info-box-number">{{counter.roles}}</span>
|
|
</div>
|
|
<!-- /.info-box-content -->
|
|
</div>
|
|
<!-- /.info-box -->
|
|
</a>
|
|
</div>
|
|
<!-- /.col -->
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block info_box_groups %}
|
|
{% if checkAccess('uri_groups') %}
|
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
|
<a href="{{site.uri.public}}/groups">
|
|
<div class="info-box">
|
|
<span class="info-box-icon bg-yellow"><i class="fas fa-users"></i></span>
|
|
<div class="info-box-content">
|
|
<span class="info-box-text">{{ translate("GROUP", 2) }}</span>
|
|
<span class="info-box-number">{{counter.groups}}</span>
|
|
</div>
|
|
<!-- /.info-box-content -->
|
|
</div>
|
|
<!-- /.info-box -->
|
|
</a>
|
|
</div>
|
|
<!-- /.col -->
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block info_box_organisations %}
|
|
{% if checkAccess('uri_organisations') %}
|
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
|
<a href="{{site.uri.public}}/organisations">
|
|
<div class="info-box">
|
|
<span class="info-box-icon bg-green"><i class="fas fa-users"></i></span>
|
|
<div class="info-box-content">
|
|
<span class="info-box-text">{{ translate("ORGANISATION", 2) }}</span>
|
|
<span class="info-box-number">{{counter.organisations}}</span>
|
|
</div>
|
|
<!-- /.info-box-content -->
|
|
</div>
|
|
<!-- /.info-box -->
|
|
</a>
|
|
</div>
|
|
<!-- /.col -->
|
|
{% endif %}
|
|
{% endblock %}
|
|
</div>
|
|
<!-- /.row -->
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block main_panels %}
|
|
<div class="row">
|
|
{% if
|
|
checkAccess('uri_users') or
|
|
checkAccess('view_system_info') or
|
|
checkAccess('uri_activities') or
|
|
checkAccess('view_group_field', {
|
|
'group': current_user.group,
|
|
'property': 'users'
|
|
}) or
|
|
hasRole('site-admin') or
|
|
hasRole('organisations-admin')
|
|
%}
|
|
{% block left_panels %}
|
|
{% if checkAccess('uri_users') or checkAccess('view_system_info') or (hasRole('site-admin') or hasRole('organisations-admin')) %}
|
|
<div class="col-md-6 col-sm-12 col-xs-12">
|
|
{% block latest_users %}{{ parent() }}{% endblock %}
|
|
|
|
{% block latest_organisations %}
|
|
{% if (hasRole('site-admin') or hasRole('organisations-admin')) and checkAccess('uri_activities') %}
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<!-- ORGANISTIONS LIST -->
|
|
<div class="box box-info">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">{{translate("ORGANISATION.LATEST")}}</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body no-padding clearfix">
|
|
{% for organisation in organisations %}
|
|
|
|
<div class="col-sm-6 col-xs-12">
|
|
<div class="box box-widget widget-user-2 widget-organisations">
|
|
<div class="widget-user-header bg-green">
|
|
<h3 class="widget-user-username">{{organisation.name}}</h3>
|
|
<h5 class="widget-user-desc">{{organisation.description}}</h5>
|
|
</div>
|
|
<div class="box-footer no-padding">
|
|
<ul class="nav nav-stacked">
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("CREATED_ON")}} <span class="pull-right badge {% if organisation.flag_approved %}bg-green{% else %}bg-yellow{% endif %}">{{organisation.created_at}}</span></a></li>
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("MEMBER", 2)}} <span class="pull-right badge bg-aqua">{{organisation.members.count}}</span></a></li>
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("ADMIN", 2)}} <span class="pull-right badge bg-aqua">{{organisation.administrators.count}}</span></a></li>
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("PENDING", 2)}} <span class="pull-right badge {% if organisation.pendingMembers.count == 0 %}bg-green{% else %}bg-yellow{% endif %}">{{organisation.pendingMembers.count}}</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endfor %}
|
|
<!-- /.organistions-list -->
|
|
</div>
|
|
<!-- /.box-body -->
|
|
<div class="box-footer text-center">
|
|
<a href="{{site.uri.public}}/organisations" class="uppercase">{{translate("ORGANISATION.VIEW_ALL")}}</a>
|
|
</div>
|
|
<!-- /.box-footer -->
|
|
</div>
|
|
<!--/.box -->
|
|
</div>
|
|
<!-- /.col -->
|
|
</div>
|
|
<!-- /.row -->
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block system_info %}{{ parent() }}{% endblock %}
|
|
</div>
|
|
<!-- /.col -->
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block right_panels %}
|
|
{% block activities_summary %}{{ parent() }}{% endblock %}
|
|
|
|
{% block organisations_summary %}
|
|
{% if ((hasRole('site-admin') or hasRole('organisations-admin'))) and not checkAccess('uri_activities') %}
|
|
<div class="col-md-6 col-sm-12 col-xs-12">
|
|
<!-- ORGANISTIONS LIST -->
|
|
<div class="box box-info">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">{{translate("ORGANISATION.LATEST")}}</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body no-padding clearfix">
|
|
{% for organisation in organisations %}
|
|
|
|
<div class="col-sm-6 col-xs-12">
|
|
<div class="box box-widget widget-user-2 widget-organisations">
|
|
<div class="widget-user-header bg-green">
|
|
<h3 class="widget-user-username">{{organisation.name}}</h3>
|
|
<h5 class="widget-user-desc">{{organisation.description}}</h5>
|
|
</div>
|
|
<div class="box-footer no-padding">
|
|
<ul class="nav nav-stacked">
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("CREATED_ON")}} <span class="pull-right badge {% if organisation.flag_approved %}bg-green{% else %}bg-yellow{% endif %}">{{organisation.created_at}}</span></a></li>
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("MEMBER", 2)}} <span class="pull-right badge bg-aqua">{{organisation.members.count}}</span></a></li>
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("ADMIN", 2)}} <span class="pull-right badge bg-aqua">{{organisation.administrators.count}}</span></a></li>
|
|
<li><a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}">{{translate("PENDING", 2)}} <span class="pull-right badge {% if organisation.pendingMembers.count == 0 %}bg-green{% else %}bg-yellow{% endif %}">{{organisation.pendingMembers.count}}</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endfor %}
|
|
<!-- /.organistions-list -->
|
|
</div>
|
|
<!-- /.box-body -->
|
|
<div class="box-footer text-center">
|
|
<a href="{{site.uri.public}}/organisations" class="uppercase">{{translate("ORGANISATION.VIEW_ALL")}}</a>
|
|
</div>
|
|
<!-- /.box-footer -->
|
|
</div>
|
|
<!--/.box -->
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block group_users_summary %}{{ parent() }}{% endblock %}
|
|
{% endblock %}
|
|
{% else %}
|
|
{% block user_welcome %}{{ parent() }}{% endblock %}
|
|
{% endif %}
|
|
</div>
|
|
<!-- /.row -->
|
|
{% endblock %}
|