Added organisation information page
This commit is contained in:
109
templates/pages/organisation.html.twig
Normal file
109
templates/pages/organisation.html.twig
Normal file
@@ -0,0 +1,109 @@
|
||||
{% extends "pages/abstract/dashboard.html.twig" %}
|
||||
|
||||
{% block stylesheets_page %}
|
||||
<!-- Page-specific CSS asset bundle -->
|
||||
{{ assets.css('css/form-widgets') | raw }}
|
||||
{% endblock %}
|
||||
|
||||
{# Overrides blocks in head of base template #}
|
||||
{% block page_title %}{{ translate("ORGANISATION", 2) }} | {{organisation.name}}{% endblock %}
|
||||
|
||||
{% block page_description %}{{ translate("ORGANISATION.INFO_PAGE", {name: organisation.name}) }}{% endblock %}
|
||||
|
||||
{% block body_matter %}
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div id="view-organisation" class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{translate('ORGANISATION.SUMMARY')}}</h3>
|
||||
{% if 'tools' not in tools.hidden %}
|
||||
<div class="box-tools pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-cog"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu box-tool-menu">
|
||||
{% block tools %}
|
||||
<li>
|
||||
<a href="#" class="js-organisation-edit" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-edit fa-fw"></i> {{translate('EDIT')}}
|
||||
</a>
|
||||
</li>
|
||||
{% if 'delete' not in tools.hidden %}
|
||||
<li>
|
||||
<a href="#" class="js-organisation-delete" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-trash-alt fa-fw"></i> {{translate('DELETE')}}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="box-body box-profile">
|
||||
<h3 class="profile-username text-center">{{organisation.name}}</h3>
|
||||
|
||||
{% if 'description' not in fields.hidden %}
|
||||
<p class="text-muted">
|
||||
{{organisation.description}}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if 'members' not in fields.hidden %}
|
||||
<hr>
|
||||
<strong><i class="fas fa-wrench margin-r-5"></i> {{ translate('ADMIN', 2)}}</strong>
|
||||
<p class="badge bg-blue box-profile-property">
|
||||
{{organisation.admin_count}}
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
<strong><i class="fas fa-users margin-r-5"></i> {{ translate('MEMBER', 2)}}</strong>
|
||||
<p class="badge bg-blue box-profile-property">
|
||||
{{organisation.non_admin_count}}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% block organisation_profile %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div id="widget-organisation-members" class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><i class="fas fa-fw fa-user"></i> {{translate('MEMBER', 2)}}</h3>
|
||||
{% include "tables/table-tool-menu.html.twig" %}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% include "tables/users.html.twig" with {
|
||||
"table" : {
|
||||
"id" : "table-organisation-members"
|
||||
}
|
||||
}
|
||||
%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts_page %}
|
||||
<!-- Include page variables -->
|
||||
<script>
|
||||
{% include "pages/partials/page.js.twig" %}
|
||||
|
||||
// Add organisation slug
|
||||
page = $.extend(
|
||||
true, // deep extend
|
||||
{
|
||||
organisation_slug: "{{organisation.slug}}",
|
||||
delete_redirect: "{{delete_redirect}}"
|
||||
},
|
||||
page
|
||||
);
|
||||
</script>
|
||||
|
||||
<!-- Include form widgets JS -->
|
||||
{{ assets.js('js/form-widgets') | raw }}
|
||||
|
||||
<!-- Include page-specific JS -->
|
||||
{{ assets.js('js/pages/organisation') | raw }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user