Re-arranged the dashboard page
This commit is contained in:
@@ -84,26 +84,9 @@
|
|||||||
{% endblock %}
|
{% 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 %}
|
{% block latest_organisations %}
|
||||||
{% if (hasRole('site-admin') or hasRole('organisations-admin')) and checkAccess('uri_activities') %}
|
{% if (hasRole('site-admin') or hasRole('organisations-admin')) %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<!-- ORGANISTIONS LIST -->
|
<!-- ORGANISTIONS LIST -->
|
||||||
@@ -149,63 +132,80 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block system_info %}{{ parent() }}{% endblock %}
|
|
||||||
|
|
||||||
|
{% set empty_dashboard = true %}
|
||||||
|
{% block main_panels %}
|
||||||
|
{% if
|
||||||
|
checkAccess('uri_users') or
|
||||||
|
checkAccess('view_group_field', {
|
||||||
|
'group': current_user.group,
|
||||||
|
'property': 'users'
|
||||||
|
}) or
|
||||||
|
hasRole('site-admin') or
|
||||||
|
hasRole('organisations-admin')
|
||||||
|
%}
|
||||||
|
{% set empty_dashboard = false %}
|
||||||
|
<div class="row">
|
||||||
|
{% block left_panels %}
|
||||||
|
<div class="col-md-6 col-sm-12 col-xs-12">
|
||||||
|
{{ block("latest_users") }}
|
||||||
|
|
||||||
|
{{ block("group_users_summary") }}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block right_panels %}
|
{% 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">
|
<div class="col-md-6 col-sm-12 col-xs-12">
|
||||||
<!-- ORGANISTIONS LIST -->
|
{{ block("latest_organisations") }}
|
||||||
<div class="box box-info">
|
|
||||||
<div class="box-header with-border">
|
|
||||||
<h3 class="box-title">{{translate("ORGANISATION.LATEST")}}</h3>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
{% endblock %}
|
||||||
<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>
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block group_users_summary %}{{ parent() }}{% endblock %}
|
{% if checkAccess('uri_activities') %}
|
||||||
{% endblock %}
|
{% set empty_dashboard = false %}
|
||||||
{% else %}
|
<div class="row">
|
||||||
{% block user_welcome %}{{ parent() }}{% endblock %}
|
{% if checkAccess('uri_activities') %}
|
||||||
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<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>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if
|
||||||
|
checkAccess('view_system_info') or
|
||||||
|
hasRole('site-admin')
|
||||||
|
%}
|
||||||
|
{% set empty_dashboard = false %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 col-sm-12 col-xs-12">
|
||||||
|
{{ block("system_info") }}
|
||||||
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if empty_dashboard == true %}
|
||||||
|
{{ block("user_welcome") }}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user