Compare commits
2 Commits
cf5247aa66
...
a61231e977
| Author | SHA1 | Date | |
|---|---|---|---|
| a61231e977 | |||
| 417955d07e |
@@ -54,7 +54,10 @@ return [
|
|||||||
'MEMBER_COUNT' => '# Members <sub>(excl admins)</sub>',
|
'MEMBER_COUNT' => '# Members <sub>(excl admins)</sub>',
|
||||||
'ADMIN_COUNT' => '# Admins',
|
'ADMIN_COUNT' => '# Admins',
|
||||||
|
|
||||||
'SELF' => 'My Organisations',
|
'SELF' => [
|
||||||
|
1 => 'My Organisation',
|
||||||
|
2 => 'My Organisations',
|
||||||
|
],
|
||||||
'MANAGE' => 'Manage Organisations',
|
'MANAGE' => 'Manage Organisations',
|
||||||
'ASSIGN_NEW' => 'Assign to organisation',
|
'ASSIGN_NEW' => 'Assign to organisation',
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,37 @@
|
|||||||
{% extends "@admin/navigation/sidebar-menu.html.twig" %}
|
{% extends "@admin/navigation/sidebar-menu.html.twig" %}
|
||||||
|
|
||||||
{% block navigation %}
|
{% block organisations_nav %}
|
||||||
{{ parent() }}
|
|
||||||
|
|
||||||
{% if checkAccess('uri_organisations') %}
|
{% if checkAccess('uri_organisations') %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{site.uri.public}}/organisations"><i class="fas fa-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION", 2) }}</span></a>
|
<a href="{{site.uri.public}}/organisations"><i class="fas fa-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION", 2) }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.organisations.count() > 0 %}
|
{% if current_user.organisations.count() > 0 %}
|
||||||
<li>
|
{% if organisationConfig.membership.single_membership == false %}
|
||||||
<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>
|
<li>
|
||||||
<ul id="submenu-organisations" class="collapsable collapse" aria-expanded="false" style="height: 1px;">
|
<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>
|
||||||
{% for organisation in current_user.organisations %}
|
<ul id="submenu-organisations" class="collapsable collapse" aria-expanded="false" style="height: 1px;">
|
||||||
|
{% for organisation in current_user.organisations %}
|
||||||
|
{% if organisation.flag_approved or isOrganisationRegistrant(organisation) %}
|
||||||
|
<li>
|
||||||
|
<a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}"><i class="fas fa-angle-double-right"></i> <span>{{organisation.name}}</span></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
|
{% set organisation = current_user.organisations.0 %}
|
||||||
{% if organisation.flag_approved or isOrganisationRegistrant(organisation) %}
|
{% if organisation.flag_approved or isOrganisationRegistrant(organisation) %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}"><i class="fas fa-angle-double-right"></i> <span>{{organisation.name}}</span></a>
|
<a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}"><i class="fas fa-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION.SELF") }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block navigation %}
|
||||||
|
{{ parent() }}
|
||||||
|
{{ block('organisations_nav') }}
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@@ -84,12 +84,60 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% block latest_organisations %}
|
||||||
|
{% if (hasRole('site-admin') or hasRole('organisations-admin')) %}
|
||||||
|
<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 %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% set empty_dashboard = true %}
|
||||||
{% block main_panels %}
|
{% block main_panels %}
|
||||||
<div class="row">
|
|
||||||
{% if
|
{% if
|
||||||
checkAccess('uri_users') or
|
checkAccess('uri_users') or
|
||||||
checkAccess('view_system_info') or
|
|
||||||
checkAccess('uri_activities') or
|
|
||||||
checkAccess('view_group_field', {
|
checkAccess('view_group_field', {
|
||||||
'group': current_user.group,
|
'group': current_user.group,
|
||||||
'property': 'users'
|
'property': 'users'
|
||||||
@@ -97,115 +145,67 @@
|
|||||||
hasRole('site-admin') or
|
hasRole('site-admin') or
|
||||||
hasRole('organisations-admin')
|
hasRole('organisations-admin')
|
||||||
%}
|
%}
|
||||||
|
{% set empty_dashboard = false %}
|
||||||
|
<div class="row">
|
||||||
{% block left_panels %}
|
{% 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">
|
||||||
<div class="col-md-6 col-sm-12 col-xs-12">
|
{{ block("latest_users") }}
|
||||||
{% block latest_users %}{{ parent() }}{% endblock %}
|
|
||||||
|
|
||||||
{% block latest_organisations %}
|
{{ block("group_users_summary") }}
|
||||||
{% if (hasRole('site-admin') or hasRole('organisations-admin')) and checkAccess('uri_activities') %}
|
</div>
|
||||||
<div class="row">
|
<!-- /.col -->
|
||||||
<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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block right_panels %}
|
{% block right_panels %}
|
||||||
{% block activities_summary %}{{ parent() }}{% endblock %}
|
<div class="col-md-6 col-sm-12 col-xs-12">
|
||||||
|
{{ block("latest_organisations") }}
|
||||||
{% block organisations_summary %}
|
</div>
|
||||||
{% 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 %}
|
{% endblock %}
|
||||||
{% else %}
|
|
||||||
{% block user_welcome %}{{ parent() }}{% endblock %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user