Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
179 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends "page.html" %} | ||
|
||
{% block subtitle %}{{ _("Confirm Delete") }}{% endblock %} | ||
|
||
{% block maintag %}<div class="row" role="main">{% endblock %} | ||
|
||
{% block main_content %} | ||
<section class="module span6 offset3"> | ||
<div class="module-content"> | ||
<p>{{ _('Are you sure you want to delete member - {name}?').format(name=c.user_dict.name) }}</p> | ||
<p class="form-actions"> | ||
<form action="{% url_for controller='group', action='member_delete', id=c.group_id %}" method="post"> | ||
<input type="hidden" name="user" value="{{ c.user_id }}" /> | ||
<button class="btn" type="submit" name="cancel" >{{ _('Cancel') }}</button> | ||
<button class="btn btn-primary" type="submit" name="delete" >{{ _('Confirm Delete') }}</button> | ||
</form> | ||
</p> | ||
</div> | ||
</section> | ||
{% endblock %} |
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,48 @@ | ||
{% extends "page.html" %} | ||
{% import 'macros/form.html' as form %} | ||
|
||
{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li>{% link_for _('Groups'), controller='group', action='index' %}</li> | ||
<li class="active">{% link_for c.group_dict.display_name|truncate(35), controller='group', action='read', id=c.group_dict.name %}</li> | ||
{% endblock %} | ||
|
||
{% block actions_content %} | ||
{% if h.check_access('organization_member_create', {'id': c.group_dict.id}) %} | ||
<li>{% link_for _('Members'), controller='group', action='members', id=c.group_dict.id, class_='btn' %}</li> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<section class="module"> | ||
<div class="module-content"> | ||
{% if c.user_name %} | ||
<h1 class="page-heading">{{ _('Edit Member:') }} {{ c.user_name }}</h1> | ||
{% else %} | ||
<h1 class="page-heading">{{ _('Add Member') }}</h1> | ||
{% endif %} | ||
<form class="dataset-form form-horizontal" method='post'> | ||
{% if c.user_name %} | ||
<input type="hidden" name="username" value="{{ c.user_name }}" /> | ||
{% else %} | ||
{% set format_attrs = {'data-module': 'autocomplete', 'data-module-source': '/api/2/util/user/autocomplete?q=?'} %} | ||
{{ form.input('username', id='field-username', label=_('User'), placeholder=_('Username'), value='', error='', classes=['control-medium'], attrs=format_attrs) }} | ||
{% endif %} | ||
{% set format_attrs = {'data-module': 'autocomplete'} %} | ||
{{ form.select('role', label=_('Role'), options=c.roles, selected='', error='', attrs=format_attrs) }} | ||
<button class="btn btn-primary" type="submit" name="submit" >{{ _('Add') }}</button> | ||
</form> | ||
</div> | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
{% snippet 'snippets/group.html', group=c.group_dict %} | ||
|
||
{% endblock %} | ||
|
||
{% block links %} | ||
{{ super() }} | ||
{% include "group/snippets/feeds.html" %} | ||
{% endblock %} |
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,43 @@ | ||
{% extends "page.html" %} | ||
|
||
{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li>{% link_for _('Groups'), controller='group', action='index' %}</li> | ||
<li class="active">{% link_for c.group_dict.display_name|truncate(35), controller='group', action='read', id=c.group_dict.name %}</li> | ||
{% endblock %} | ||
|
||
{% block actions_content %} | ||
{% if h.check_access('organization_member_create', {'id': c.group_dict.id}) %} | ||
<li>{% link_for _('Add Member'), controller='group', action='member_new', id=c.group_dict.id, class_='btn', icon='plus' %}</li> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<section class="module"> | ||
<div class="module-content"> | ||
<h1 class="page-heading">{{ _('Members') }}</h1> | ||
<table class="table table-bordered"> | ||
{% for user_id, user, role in c.members %} | ||
<tr> | ||
<td class="media">{{ h.linked_user(user_id, maxlength=20) }}</td> | ||
<td>{{ role }}</td> | ||
<td>{% link_for _('Edit'), controller='group', action='member_new', id=c.group_dict.id, class_='btn', user=user_id %}</td> | ||
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this member?')}) %} | ||
<td><a class="btn btn-danger" href="{% url_for controller='group', action='member_delete', id=c.group_dict.id, user=user_id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a></td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
{% snippet 'snippets/group.html', group=c.group_dict %} | ||
|
||
{% endblock %} | ||
|
||
{% block links %} | ||
{{ super() }} | ||
{% include "group/snippets/feeds.html" %} | ||
{% endblock %} |
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,20 @@ | ||
{% extends "page.html" %} | ||
|
||
{% block subtitle %}{{ _("Confirm Delete") }}{% endblock %} | ||
|
||
{% block maintag %}<div class="row" role="main">{% endblock %} | ||
|
||
{% block main_content %} | ||
<section class="module span6 offset3"> | ||
<div class="module-content"> | ||
<p>{{ _('Are you sure you want to delete member - {name}?').format(name=c.user_dict.name) }}</p> | ||
<p class="form-actions"> | ||
<form action="{% url_for controller='organization', action='member_delete', id=c.group_id %}" method="post"> | ||
<input type="hidden" name="user" value="{{ c.user_id }}" /> | ||
<button class="btn" type="submit" name="cancel" >{{ _('Cancel') }}</button> | ||
<button class="btn btn-primary" type="submit" name="delete" >{{ _('Confirm Delete') }}</button> | ||
</form> | ||
</p> | ||
</div> | ||
</section> | ||
{% endblock %} |
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,48 @@ | ||
{% extends "page.html" %} | ||
{% import 'macros/form.html' as form %} | ||
|
||
{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li>{% link_for _('Organizations'), controller='organization', action='index' %}</li> | ||
<li class="active">{% link_for c.group_dict.display_name|truncate(35), controller='organization', action='read', id=c.group_dict.name %}</li> | ||
{% endblock %} | ||
|
||
{% block actions_content %} | ||
{% if h.check_access('organization_member_create', {'id': c.group_dict.id}) %} | ||
<li>{% link_for _('Members'), controller='organization', action='members', id=c.group_dict.id, class_='btn' %}</li> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<section class="module"> | ||
<div class="module-content"> | ||
{% if c.user_name %} | ||
<h1 class="page-heading">{{ _('Edit Member:') }} {{ c.user_name }}</h1> | ||
{% else %} | ||
<h1 class="page-heading">{{ _('Add Member') }}</h1> | ||
{% endif %} | ||
<form class="dataset-form form-horizontal" method='post'> | ||
{% if c.user_name %} | ||
<input type="hidden" name="username" value="{{ c.user_name }}" /> | ||
{% else %} | ||
{% set format_attrs = {'data-module': 'autocomplete', 'data-module-source': '/api/2/util/user/autocomplete?q=?'} %} | ||
{{ form.input('username', id='field-username', label=_('User'), placeholder=_('Username'), value='', error='', classes=['control-medium'], attrs=format_attrs) }} | ||
{% endif %} | ||
{% set format_attrs = {'data-module': 'autocomplete'} %} | ||
{{ form.select('role', label=_('Role'), options=c.roles, selected='', error='', attrs=format_attrs) }} | ||
<button class="btn btn-primary" type="submit" name="submit" >{{ _('Add') }}</button> | ||
</form> | ||
</div> | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
{% snippet 'snippets/organization.html', organization=c.group_dict %} | ||
|
||
{% endblock %} | ||
|
||
{% block links %} | ||
{{ super() }} | ||
{% include "organization/snippets/feeds.html" %} | ||
{% endblock %} |