-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added bootstrap3 as default template style
Added verbose_plural_name to group entities
- Loading branch information
1 parent
7cfdd39
commit b115aed
Showing
59 changed files
with
1,358 additions
and
1,436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
groups_manager/templates/groups_manager/bootstrap3/group.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% extends "groups_manager/bootstrap3/groups_manager.html" %} | ||
|
||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li> | ||
<a href="{% url 'groups_manager:group_list' %}">Groups</a> | ||
</li> | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
{% block sidebar %} | ||
|
||
{{ block.super }} | ||
|
||
<ul class="nav nav-sidebar"> | ||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.add_group %} | ||
<li> | ||
<a href="{% url 'groups_manager:group_add' %}"> | ||
<i class="fa fa-plus"></i> Add group | ||
</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
|
||
{% endblock sidebar %} |
29 changes: 29 additions & 0 deletions
29
groups_manager/templates/groups_manager/bootstrap3/group_confirm_delete.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% extends "groups_manager/bootstrap3/group.html" %} | ||
|
||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li> | ||
<a href="{% url 'groups_manager:group_delete' group.id %}">Delete</a> | ||
</li> | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
{% block content %} | ||
|
||
<h2 class="page-title"> | ||
<i class="fa fa-groups-manager-group"></i> Delete group | ||
</h2> | ||
|
||
<div class="bs-callout bs-callout-danger"> | ||
<h3>{{ group }}</h3> | ||
<p>Are you sure you want to delete this group?</p> | ||
<p>All relations that involve this group will be deleted too.</p> | ||
<form action="{% url 'groups_manager:group_delete' group.id %}" method="post"> | ||
{% csrf_token %} | ||
<input type="submit" class="btn btn-danger" value="Delete" /> | ||
<a href="{% url 'groups_manager:group_detail' group.id %}" class="btn">Back to details</a> | ||
</form> | ||
</div> | ||
|
||
{% endblock content %} |
169 changes: 169 additions & 0 deletions
169
groups_manager/templates/groups_manager/bootstrap3/group_detail.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
{% extends "groups_manager/bootstrap3/group.html" %} | ||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li> | ||
<a href="{% url 'groups_manager:group_detail' group.id %}">{{ group }}</a> | ||
</li> | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
{% block sidebar %} | ||
|
||
{{ block.super }} | ||
|
||
<ul class="nav nav-sidebar"> | ||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.can_change_group %} | ||
<li> | ||
<a href="{% url 'groups_manager:group_edit' group.id %}"> | ||
<i class="fa fa-edit"></i> | ||
Edit group | ||
</a> | ||
</li> | ||
{% endif %} | ||
|
||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.can_delete_group %} | ||
<li> | ||
<a href="{% url 'groups_manager:group_delete' group.id %}"> | ||
<i class="fa fa-times"></i> | ||
Delete group | ||
</a> | ||
</li> | ||
{% endif %} | ||
</li> | ||
</ul> | ||
|
||
{% endblock sidebar %} | ||
|
||
|
||
{% block content %} | ||
|
||
<h2 class="page-title"> | ||
<i class="fa fa-groups-manager-group"></i> {{ group }} | ||
</h2> | ||
|
||
<div class="container-fluid"> | ||
|
||
{% if group.description %} | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="bs-callout bs-callout-info"> | ||
<p>{{ group.description|linebreaksbr }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="row"> | ||
<div class="col-md-6"> | ||
<h3>Details</h3> | ||
<table class="table table-striped"> | ||
<tr> | ||
<th>Name</th> | ||
<td>{{ group.name }}</td> | ||
</tr> | ||
<tr> | ||
<th>Codename</th> | ||
<td>{{ group.codename }}</td> | ||
</tr> | ||
{% if group.group_type %} | ||
<tr> | ||
<th>Group type</th> | ||
<td> | ||
{{ group.group_type }} | ||
</td> | ||
</tr> | ||
{% endif %} | ||
{% if group.group_entities.all %} | ||
<tr> | ||
<th>Group entities</th> | ||
<td> | ||
{% for group_entity in group.group_entities.all %} | ||
<a href="{% url 'groups_manager:group_entity_detail' group_entity.id %}"> | ||
{{ group_entity.label }}</a>{% if not forloop.last %}, {% endif %} | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
{% endif %} | ||
{% if group.parent %} | ||
<tr> | ||
<th>Parent</th> | ||
<td> | ||
<a href="{% url 'groups_manager:group_detail' group.parent.id %}"> | ||
{{ group.parent }} | ||
</a> | ||
</td> | ||
</tr> | ||
{% endif %} | ||
{% if group.comment %} | ||
<tr> | ||
<th>Comment</th> | ||
<td> | ||
{{ group.comment|linebreaksbr }} | ||
</td> | ||
</tr> | ||
{% endif %} | ||
</table> | ||
</div> | ||
<div class="col-md-6"> | ||
<h3>Members</h3> | ||
{% with group_memberships=group.group_membership.all %} | ||
{% if group_memberships %} | ||
<table class="table table-striped"> | ||
<tr> | ||
<td>Member</td> | ||
<td>Roles</td> | ||
<td></td> | ||
</tr> | ||
{% for group_membership in group_memberships %} | ||
<tr> | ||
<td> | ||
<a href="{% url 'groups_manager:member_detail' group_membership.member.id %}"> | ||
{{ group_membership.member.full_name }} | ||
</a> | ||
</td> | ||
<td> | ||
{% for role in group_membership.roles.all %} | ||
{{ role }}{% if not forloop.last %}, {% endif %} | ||
{% endfor %} | ||
</td> | ||
<td class="text-right"> | ||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.can_change_groupmember %} | ||
<a href="{% url 'groups_manager:group_member_edit' group_membership.id %}" class="btn btn-sm btn-default"> | ||
<i class="fa fa-edit"></i> | ||
</a> | ||
{% endif %} | ||
{% if perms.groups_manager.can_delete_groupmember %} | ||
<a href="{% url 'groups_manager:group_member_delete' group_membership.id %}" class="btn btn-sm btn-default"> | ||
<i class="fa fa-times"></i> | ||
</a> | ||
{% endif %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% else %} | ||
<div class="bs-callout bs-callout-info"> | ||
<p>This group has no related members.</p> | ||
</div> | ||
{% endif %} | ||
|
||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.can_add_groupmember %} | ||
<p> | ||
<a href="{% url 'groups_manager:group_member_add_member' group.id %}"> | ||
<i class="fa fa-plus"></i> | ||
Add member to group | ||
</a> | ||
</p> | ||
{% endif %} | ||
|
||
{% endwith %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock content %} |
32 changes: 32 additions & 0 deletions
32
groups_manager/templates/groups_manager/bootstrap3/group_entity.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% extends "groups_manager/bootstrap3/groups_manager.html" %} | ||
|
||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li> | ||
<a href="{% url 'groups_manager:group_entity_list' %}">Group Entities</a> | ||
</li> | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
{% block sidebar %} | ||
|
||
{{ block.super }} | ||
|
||
<ul class="nav nav-sidebar"> | ||
<li> | ||
<a href="{% url 'groups_manager:group_entity_list' %}"> | ||
<i class="fa fa-list"></i> List group entities | ||
</a> | ||
</li> | ||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.add_groupentity %} | ||
<li> | ||
<a href="{% url 'groups_manager:group_entity_add' %}"> | ||
<i class="fa fa-plus"></i> Add group entity | ||
</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
|
||
{% endblock sidebar %} |
28 changes: 28 additions & 0 deletions
28
groups_manager/templates/groups_manager/bootstrap3/group_entity_confirm_delete.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% extends "groups_manager/bootstrap3/group_entity.html" %} | ||
|
||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li> | ||
<a href="{% url 'groups_manager:group_entity_delete' group_entity.id %}">Delete</a> | ||
</li> | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
{% block content %} | ||
|
||
<h2 class="page-title"> | ||
<i class="fa fa-groups-manager-group-entity"></i> Delete group entity | ||
</h2> | ||
|
||
<div class="bs-callout bs-callout-danger"> | ||
<h3>{{ group_entity }}</h3> | ||
<p>Are you sure you want to delete this group entity?</p> | ||
<form action="{% url 'groups_manager:group_entity_delete' group_entity.id %}" method="post"> | ||
{% csrf_token %} | ||
<input entity="submit" class="btn btn-danger" value="Delete" /> | ||
<a href="{% url 'groups_manager:group_entity_detail' group_entity.id %}" class="btn">Back to details</a> | ||
</form> | ||
</div> | ||
|
||
{% endblock content %} |
91 changes: 91 additions & 0 deletions
91
groups_manager/templates/groups_manager/bootstrap3/group_entity_detail.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{% extends "groups_manager/bootstrap3/group_entity.html" %} | ||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li> | ||
<a href="{% url 'groups_manager:group_entity_detail' group_entity.id %}">{{ group_entity }}</a> | ||
</li> | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
{% block sidebar %} | ||
|
||
{{ block.super }} | ||
|
||
<ul class="nav nav-sidebar"> | ||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.can_change_groupentity %} | ||
<li> | ||
<a href="{% url 'groups_manager:group_entity_edit' group_entity.id %}"> | ||
<i class="fa fa-edit"></i> | ||
Edit group entity | ||
</a> | ||
</li> | ||
{% endif %} | ||
|
||
<!--PERMISSIONS_HERE--> | ||
{% if perms.groups_manager.can_delete_groupentity %} | ||
<li> | ||
<a href="{% url 'groups_manager:group_entity_delete' group_entity.id %}"> | ||
<i class="fa fa-times"></i> | ||
Delete group entity | ||
</a> | ||
</li> | ||
{% endif %} | ||
</li> | ||
</ul> | ||
|
||
{% endblock sidebar %} | ||
|
||
|
||
{% block content %} | ||
|
||
<h2 class="page-title"> | ||
<i class="fa fa-groups-manager-group-entity"></i> {{ group_entity }} | ||
</h2> | ||
|
||
<div class="container-fluid"> | ||
|
||
<div class="row"> | ||
<div class="col-md-6"> | ||
<h3>Details</h3> | ||
<table class="table table-striped"> | ||
<tr> | ||
<th>Label</th> | ||
<td>{{ group_entity.label }}</td> | ||
</tr> | ||
<tr> | ||
<th>Codename</th> | ||
<td>{{ group_entity.codename }}</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<div class="col-md-6"> | ||
<h3>Groups</h3> | ||
{% with group_entity_groups=group_entity.groups.all %} | ||
{% if group_entity_groups %} | ||
<table class="table table-striped"> | ||
<tr> | ||
<td>Group</td> | ||
</tr> | ||
{% for group in group_entity_groups %} | ||
<tr> | ||
<td> | ||
<a href="{% url 'groups_manager:group_detail' group.id %}"> | ||
{{ group.name }} | ||
</a> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% else %} | ||
<div class="bs-callout bs-callout-info"> | ||
<p>This group entity is not related to any group.</p> | ||
</div> | ||
{% endif %} | ||
{% endwith %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock content %} |
Oops, something went wrong.