Compare commits
2 Commits
v0.1.1
...
a61231e977
| Author | SHA1 | Date | |
|---|---|---|---|
| a61231e977 | |||
| 417955d07e |
@@ -54,7 +54,10 @@ return [
|
||||
'MEMBER_COUNT' => '# Members <sub>(excl admins)</sub>',
|
||||
'ADMIN_COUNT' => '# Admins',
|
||||
|
||||
'SELF' => 'My Organisations',
|
||||
'SELF' => [
|
||||
1 => 'My Organisation',
|
||||
2 => 'My Organisations',
|
||||
],
|
||||
'MANAGE' => 'Manage Organisations',
|
||||
'ASSIGN_NEW' => 'Assign to organisation',
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
{% extends "@admin/navigation/sidebar-menu.html.twig" %}
|
||||
|
||||
{% block navigation %}
|
||||
{{ parent() }}
|
||||
|
||||
{% block organisations_nav %}
|
||||
{% if checkAccess('uri_organisations') %}
|
||||
<li>
|
||||
<a href="{{site.uri.public}}/organisations"><i class="fas fa-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION", 2) }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if current_user.organisations.count() > 0 %}
|
||||
{% if organisationConfig.membership.single_membership == false %}
|
||||
<li>
|
||||
<a href="#" data-toggle="collapse" data-target="#submenu-organisations" aria-expanded="false"><i class="fa fa-fw fa-sitemap"></i> <span>{{ translate("ORGANISATION.SELF") }}</span> <i class="fa fa-fw pull-right fa-angle-down"></i></a>
|
||||
<ul id="submenu-organisations" class="collapsable collapse" aria-expanded="false" style="height: 1px;">
|
||||
@@ -21,5 +20,18 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
{% set organisation = current_user.organisations.0 %}
|
||||
{% if organisation.flag_approved or isOrganisationRegistrant(organisation) %}
|
||||
<li>
|
||||
<a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}"><i class="fas fa-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION.SELF") }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block navigation %}
|
||||
{{ parent() }}
|
||||
{{ block('organisations_nav') }}
|
||||
{% endblock %}
|
||||
|
||||
@@ -84,26 +84,9 @@
|
||||
{% 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') %}
|
||||
{% block latest_organisations %}
|
||||
{% if (hasRole('site-admin') or hasRole('organisations-admin')) %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!-- ORGANISTIONS LIST -->
|
||||
@@ -147,65 +130,82 @@
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
{% 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>
|
||||
<!-- /.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>
|
||||
{{ block("latest_organisations") }}
|
||||
</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 -->
|
||||
{% endblock %}
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block group_users_summary %}{{ parent() }}{% endblock %}
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
{% block user_welcome %}{{ parent() }}{% endblock %}
|
||||
{% if checkAccess('uri_activities') %}
|
||||
{% set empty_dashboard = false %}
|
||||
<div class="row">
|
||||
{% 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 %}
|
||||
</div>
|
||||
<!-- /.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 %}
|
||||
|
||||
Reference in New Issue
Block a user