Updates to admin dashboard template
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
{% extends "@admin/pages/dashboard.html.twig" %}
|
{% extends "@blockier-templates/pages/dashboard.html.twig" %}
|
||||||
|
|
||||||
{% block body_matter %}
|
{% block info_boxes_users %}
|
||||||
{% block info_boxes %}
|
|
||||||
<!-- Info boxes -->
|
|
||||||
{% if hasRole('site-admin') or hasRole('organisations-admin') %}
|
{% if hasRole('site-admin') or hasRole('organisations-admin') %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% if checkAccess('uri_users') %}
|
|
||||||
{% block info_box_users %}
|
{% block info_box_users %}
|
||||||
|
{% if checkAccess('uri_users') %}
|
||||||
<div class="col-lg-3 col-md-6 col-xs-12">
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
||||||
<a href="{{site.uri.public}}/users">
|
<a href="{{site.uri.public}}/users">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
@@ -21,11 +19,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
{% endblock %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% if checkAccess('uri_roles') %}
|
|
||||||
{% block info_box_roles %}
|
{% block info_box_roles %}
|
||||||
|
{% if checkAccess('uri_roles') %}
|
||||||
<div class="col-lg-3 col-md-6 col-xs-12">
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
||||||
<a href="{{site.uri.public}}/roles">
|
<a href="{{site.uri.public}}/roles">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
@@ -40,11 +38,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
{% endblock %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% if checkAccess('uri_groups') %}
|
|
||||||
{% block info_box_groups %}
|
{% block info_box_groups %}
|
||||||
|
{% if checkAccess('uri_groups') %}
|
||||||
<div class="col-lg-3 col-md-6 col-xs-12">
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
||||||
<a href="{{site.uri.public}}/groups">
|
<a href="{{site.uri.public}}/groups">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
@@ -59,11 +57,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
{% endblock %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% if checkAccess('uri_organisations') %}
|
|
||||||
{% block info_box_organisations %}
|
{% block info_box_organisations %}
|
||||||
|
{% if checkAccess('uri_organisations') %}
|
||||||
<div class="col-lg-3 col-md-6 col-xs-12">
|
<div class="col-lg-3 col-md-6 col-xs-12">
|
||||||
<a href="{{site.uri.public}}/organisations">
|
<a href="{{site.uri.public}}/organisations">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
@@ -78,87 +76,34 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
{% endblock %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
<!-- /.row -->
|
|
||||||
{% elseif checkAccess('uri_group', {
|
|
||||||
'group': current_user.group
|
|
||||||
}) %}
|
|
||||||
<div class="row">
|
|
||||||
{% block info_box_group %}
|
|
||||||
<div class="col-sm-6 col-xs-12">
|
|
||||||
<div class="info-box">
|
|
||||||
<span class="info-box-icon bg-aqua"><i class="{{current_user.group.icon}}"></i></span>
|
|
||||||
<div class="info-box-content">
|
|
||||||
<h1>{{current_user.group.name}}</h1>
|
|
||||||
</div>
|
|
||||||
<!-- /.info-box-content -->
|
|
||||||
</div>
|
|
||||||
<!-- /.info-box -->
|
|
||||||
</div>
|
|
||||||
<!-- /.col -->
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block info_box_group_users %}
|
|
||||||
<div class="col-sm-6 col-xs-12">
|
|
||||||
<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">{{current_user.group.users.count}}</span>
|
|
||||||
</div>
|
|
||||||
<!-- /.info-box-content -->
|
|
||||||
</div>
|
|
||||||
<!-- /.info-box -->
|
|
||||||
</div>
|
|
||||||
<!-- /.col -->
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<!-- Main panels -->
|
|
||||||
|
{% block main_panels %}
|
||||||
<div class="row">
|
<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')) %}
|
{% 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">
|
<div class="col-md-6 col-sm-12 col-xs-12">
|
||||||
{% if checkAccess('uri_users') %}
|
{% block latest_users %}{{ parent() }}{% endblock %}
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<!-- USERS LIST -->
|
|
||||||
<div class="box box-info">
|
|
||||||
<div class="box-header with-border">
|
|
||||||
<h3 class="box-title">{{translate("USER.LATEST")}}</h3>
|
|
||||||
</div>
|
|
||||||
<!-- /.box-header -->
|
|
||||||
<div class="box-body no-padding">
|
|
||||||
<ul class="users-list clearfix">
|
|
||||||
{% for user in users %}
|
|
||||||
<li>
|
|
||||||
<img src="{{ user.avatar }}" alt="User Image">
|
|
||||||
<a class="users-list-name" href="{{site.uri.public}}/users/u/{{user.user_name}}">{{user.first_name}} {{user.last_name}}</a>
|
|
||||||
<span class="users-list-date">{{ user.registered }}</span>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
<!-- /.users-list -->
|
|
||||||
</div>
|
|
||||||
<!-- /.box-body -->
|
|
||||||
<div class="box-footer text-center">
|
|
||||||
<a href="{{site.uri.public}}/users" class="uppercase">{{translate("USER.VIEW_ALL")}}</a>
|
|
||||||
</div>
|
|
||||||
<!-- /.box-footer -->
|
|
||||||
</div>
|
|
||||||
<!--/.box -->
|
|
||||||
</div>
|
|
||||||
<!-- /.col -->
|
|
||||||
</div>
|
|
||||||
<!-- /.row -->
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if (hasRole('site-admin') or hasRole('organisations-admin')) and checkAccess('uri_activities') %}
|
|
||||||
{% block latest_organisations %}
|
{% block latest_organisations %}
|
||||||
|
{% if (hasRole('site-admin') or hasRole('organisations-admin')) and checkAccess('uri_activities') %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<!-- ORGANISTIONS LIST -->
|
<!-- ORGANISTIONS LIST -->
|
||||||
@@ -201,144 +146,65 @@
|
|||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
{% endblock %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% if checkAccess('view_system_info') %}
|
{% block system_info %}{{ parent() }}{% endblock %}
|
||||||
<div class="row">
|
</div>
|
||||||
<div class="col-sm-12">
|
<!-- /.col -->
|
||||||
<div class="box box-primary">
|
{% 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">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title">{{translate("SYSTEM_INFO")}}</h3>
|
<h3 class="box-title">{{translate("ORGANISATION.LATEST")}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
<!-- /.box-header -->
|
||||||
<div class="box-body">
|
<div class="box-body no-padding clearfix">
|
||||||
<dl class="dl-horizontal">
|
{% for organisation in organisations %}
|
||||||
<dt>{{translate("SYSTEM_INFO.UF_VERSION")}}</dt>
|
|
||||||
<dd>{{info.version.UF}}</dd>
|
|
||||||
|
|
||||||
<dt>{{translate("SYSTEM_INFO.PHP_VERSION")}}</dt>
|
<div class="col-sm-6 col-xs-12">
|
||||||
<dd>{{info.version.php}}</dd>
|
<div class="box box-widget widget-user-2 widget-organisations">
|
||||||
|
<div class="widget-user-header bg-green">
|
||||||
<dt>{{translate("SYSTEM_INFO.SERVER")}}</dt>
|
<h3 class="widget-user-username">{{organisation.name}}</h3>
|
||||||
<dd>{{info.environment.SERVER_SOFTWARE}}</dd>
|
<h5 class="widget-user-desc">{{organisation.description}}</h5>
|
||||||
|
</div>
|
||||||
<dt>{{translate("SYSTEM_INFO.DB_VERSION")}}</dt>
|
<div class="box-footer no-padding">
|
||||||
<dd>{{info.version.database.type}} {{info.version.database.version}}</dd>
|
<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>
|
||||||
<dt>{{translate("SYSTEM_INFO.DB_NAME")}}</dt>
|
<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>
|
||||||
<dd>{{info.database.name}}</dd>
|
<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>
|
||||||
<dt>{{translate("SYSTEM_INFO.DIRECTORY")}}</dt>
|
|
||||||
<dd>{{info.path.project}}</dd>
|
|
||||||
|
|
||||||
<dt>{{translate("SYSTEM_INFO.URL")}}</dt>
|
|
||||||
<dd>{{site.uri.public}}</dd>
|
|
||||||
|
|
||||||
<dt>{{translate("SYSTEM_INFO.SPRINKLES")}}</dt>
|
|
||||||
<dd>
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
{% for sprinkle in sprinkles %}
|
|
||||||
<li>
|
|
||||||
{{sprinkle}}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</div>
|
||||||
</dl>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
<!-- /.organistions-list -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
<div class="box-footer text-center">
|
<div class="box-footer text-center">
|
||||||
<a href="javascript:void(0)" class="js-clear-cache uppercase">{{ translate("CACHE.CLEAR") }}</a>
|
<a href="{{site.uri.public}}/organisations" class="uppercase">{{translate("ORGANISATION.VIEW_ALL")}}</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-footer -->
|
<!-- /.box-footer -->
|
||||||
</div>
|
</div>
|
||||||
<!--/.box -->
|
<!--/.box -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
|
||||||
</div>
|
|
||||||
<!-- /.row -->
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<!-- /.col -->
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% if checkAccess('uri_activities') %}
|
{% block group_users_summary %}{{ parent() }}{% endblock %}
|
||||||
<div class="col-md-6 col-sm-12 col-xs-12">
|
{% endblock %}
|
||||||
<div id="widget-activities" class="box box-primary">
|
|
||||||
<div class="box-header">
|
|
||||||
<h3 class="box-title"><i class="fas fa-tasks fa-fw"></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-activities",
|
|
||||||
"columns" : ["user"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% elseif (hasRole('site-admin') or hasRole('organisations-admin')) %}
|
|
||||||
<div class="col-md-6 col-sm-12 col-xs-12">
|
|
||||||
{{block('latest_organisations')}}
|
|
||||||
</div>
|
|
||||||
<!-- /.col -->
|
|
||||||
{% elseif checkAccess('view_group_field', {
|
|
||||||
'group': current_user.group,
|
|
||||||
'property': 'users'
|
|
||||||
}) %}
|
|
||||||
<div class="col-md-6 col-sm-12 col-xs-12">
|
|
||||||
<div id="widget-group-users" class="box box-primary">
|
|
||||||
<div class="box-header">
|
|
||||||
<h3 class="box-title"><i class="fas fa-fw fa-user"></i> {{translate('USER', 2)}}</h3>
|
|
||||||
{% include "tables/table-tool-menu.html.twig" %}
|
|
||||||
</div>
|
|
||||||
<div class="box-body">
|
|
||||||
{% include "tables/users.html.twig" with {
|
|
||||||
"table" : {
|
|
||||||
"id" : "table-group-users"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%}
|
|
||||||
</div>
|
|
||||||
<div class="box-footer">
|
|
||||||
<button type="button" class="btn btn-success js-user-create">
|
|
||||||
<i class="fas fa-plus-square"></i> {{translate("USER.CREATE")}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="col-sm-4 col-sm-offset-4 col-xs-12">
|
{% block user_welcome %}{{ parent() }}{% endblock %}
|
||||||
<div class="box box-widget widget-user">
|
|
||||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
|
||||||
<div class="widget-user-header bg-black-active">
|
|
||||||
<h3 class="widget-user-username">
|
|
||||||
{{translate("WELCOME", {
|
|
||||||
'first_name': current_user.first_name
|
|
||||||
})}}
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="widget-user-image">
|
|
||||||
<img class="img-circle" src="{{assets.url('assets://userfrosting/images/cupcake.png')}}" alt="User Avatar">
|
|
||||||
</div>
|
|
||||||
<div class="box-footer">
|
|
||||||
<h4>
|
|
||||||
{{translate("WELCOME_TO", {
|
|
||||||
'title': site.title
|
|
||||||
})}}
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
{{translate("NO_FEATURES_YET")}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- /.widget-user -->
|
|
||||||
</div>
|
|
||||||
<!-- /.row -->
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
|
|||||||
Reference in New Issue
Block a user