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
1 parent
6e03d1a
commit 2317da3
Showing
10 changed files
with
158 additions
and
142 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
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
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,10 @@ | ||
{% extends "organization/read_base.html" %} | ||
|
||
{% block subtitle %}{{ _('Administrators') }} - {{ c.group_dict.title or c.group_dict.name }}{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<section class="module-content"> | ||
<h1 class="hide-heading">{{ _('Administrators') }}</h1> | ||
{% snippet "user/snippets/followers.html", followers=c.admins %} | ||
</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 |
---|---|---|
@@ -1,48 +1,25 @@ | ||
{% extends "page.html" %} | ||
{% extends "organization/read_base.html" %} | ||
{% import 'macros/form.html' as form %} | ||
|
||
{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %} | ||
{% block subtitle %}{{ _('Members') }} - {{ 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"> | ||
{% block primary_content_inner %} | ||
<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 %} | ||
<h1 class="page-heading">{{ _('Edit Member:') }} {{ c.user_name }}</h1> | ||
<input type="hidden" name="username" value="{{ c.user_name }}" /> | ||
{% else %} | ||
<h1 class="page-heading">{{ _('Add Member') }}</h1> | ||
{% 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 %} | ||
<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" %} | ||
{% 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> | ||
{% 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 |
---|---|---|
@@ -1,43 +1,38 @@ | ||
{% extends "page.html" %} | ||
{% extends "organization/read_base.html" %} | ||
|
||
{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %} | ||
{% block subtitle %}{{ _('Members') }} - {{ 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 _('Add Member'), controller='organization', 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"> | ||
{% block primary_content_inner %} | ||
<div class="module-content"> | ||
<h1 class="hide-heading">{{ _('Members') }}</h1> | ||
<table class="table table-bordered"> | ||
<thead> | ||
<tr> | ||
<th>{{ _('User') }}</th> | ||
<th>{{ _('Role') }}</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for user_id, user, role in c.members %} | ||
<tr> | ||
<td class="media">{{ h.linked_user(user_id, maxlength=20) }}</td> | ||
<td class="media"> | ||
{{ h.linked_user(user_id, maxlength=20) }} | ||
</td> | ||
<td>{{ role }}</td> | ||
<td>{% link_for _('Edit'), controller='organization', 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='organization', 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> | ||
<td> | ||
<div class="btn-group pull-right"> | ||
{% link_for _('Edit'), controller='organization', action='member_new', id=c.group_dict.id, class_='btn', icon='wrench', user=user_id %} | ||
<a class="btn btn-danger" href="{% url_for controller='organization', action='member_delete', id=c.group_dict.id, user=user_id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}<i class="icon-remove"></i> {{ _('Delete') }}{% endblock %}</a> | ||
</div> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
{% snippet 'snippets/organization.html', organization=c.group_dict %} | ||
|
||
{% endblock %} | ||
|
||
{% block links %} | ||
{{ super() }} | ||
{% include "organization/snippets/feeds.html" %} | ||
</tbody> | ||
</table> | ||
<p> | ||
{% link_for _('Add member'), controller='organization', action='member_new', id=c.group_dict.id, class_='btn btn-success', icon='plus' %} | ||
</p> | ||
</div> | ||
{% 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 |
---|---|---|
@@ -1,53 +1,8 @@ | ||
{% extends "page.html" %} | ||
{% extends "organization/read_base.html" %} | ||
|
||
{% 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 %} | ||
{% if h.check_access('organization_update', {'id': c.group.id}) %} | ||
<li>{% link_for _('Add Dataset to Organization'), controller='package', action='new', group=c.group_dict.id, class_='btn', icon='plus' %}</li> | ||
<li>{% link_for _('Edit'), controller='organization', action='edit', id=c.group_dict.name, class_='btn', icon='cog' %}</li> | ||
{% endif %} | ||
{# <li>{% link_for _('History'), controller='organization', action='history', id=c.group_dict.name, class_='btn', icon='undo' %}</li> #} | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<section class="module"> | ||
<div class="module-content"> | ||
{% include "package/snippets/search_form.html" %} | ||
</div> | ||
{{ c.page.pager(q=c.q) }} | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
{% snippet 'snippets/organization.html', organization=c.group_dict %} | ||
|
||
<section class="module module-narrow module-shallow"> | ||
<h2 class="module-heading"><i class="icon-large icon-user"></i> {{ _('Administrators') }}</h2> | ||
<ul class="nav nav-simple"> | ||
{% for admin in c.group_admins %} | ||
<li class="nav-item image">{{ h.linked_user(admin, 30) }}</li> | ||
{% endfor %} | ||
</ul> | ||
</section> | ||
|
||
{% if h.user_in_org_or_group(c.group_dict.id) %} | ||
{{ h.snippet('snippets/facet_list.html', title='Visibility', name='capacity', extras={'id':c.group_dict.id}) }} | ||
{% endif %} | ||
|
||
{{ h.snippet('snippets/facet_list.html', title='Tags', name='tags', extras={'id':c.group_dict.id}) }} | ||
{{ h.snippet('snippets/facet_list.html', title='Formats', name='res_format', extras={'id':c.group_dict.id}) }} | ||
{% endblock %} | ||
|
||
{% block links %} | ||
{{ super() }} | ||
{% include "organization/snippets/feeds.html" %} | ||
{% block primary_content_inner %} | ||
<div class="module-content"> | ||
{% include "package/snippets/search_form.html" %} | ||
</div> | ||
{{ c.page.pager(q=c.q) }} | ||
{% 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,56 @@ | ||
{% extends "page.html" %} | ||
|
||
{% 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_update', {'id': c.group.id}) %} | ||
<li>{% link_for _('Add Dataset to Organization'), controller='package', action='new', group=c.group_dict.id, class_='btn', icon='plus' %}</li> | ||
<li>{% link_for _('Edit'), controller='organization', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %}</li> | ||
{% endif %} | ||
{# <li>{% link_for _('History'), controller='organization', action='history', id=c.group_dict.name, class_='btn', icon='undo' %}</li> #} | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<section class="module"> | ||
{% block primary_content_header %} | ||
<header class="module-content page-header"> | ||
<ul class="nav nav-tabs"> | ||
<li{% if c.action == 'read' %} class="active"{% endif %}> | ||
{% link_for _('Datasets'), controller='organization', action='read', id=c.group_dict.name, icon='sitemap' %} | ||
</li> | ||
{% if h.check_access('organization_member_create', {'id': c.group_dict.id}) %} | ||
<li{% if c.action == 'members' or c.action =='member_new' %} class="active"{% endif %}> | ||
{% link_for _('Members'), controller='organization', action='members', id=c.group_dict.name, icon='group' %} | ||
</li> | ||
{% endif %} | ||
<li{% if c.action == 'admins' %} class="active"{% endif %}> | ||
{% link_for _('Administrators'), controller='organization', action='admins', id=c.group_dict.name, icon='cog' %} | ||
</li> | ||
</ul> | ||
</header> | ||
{% endblock %} | ||
{% block primary_content_inner %} | ||
{% endblock %} | ||
</section> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
{% snippet 'snippets/organization.html', organization=c.group_dict %} | ||
|
||
{% if h.user_in_org_or_group(c.group_dict.id) %} | ||
{{ h.snippet('snippets/facet_list.html', title='Visibility', name='capacity', extras={'id':c.group_dict.id}) }} | ||
{% endif %} | ||
|
||
{{ h.snippet('snippets/facet_list.html', title='Tags', name='tags', extras={'id':c.group_dict.id}) }} | ||
{{ h.snippet('snippets/facet_list.html', title='Formats', name='res_format', extras={'id':c.group_dict.id}) }} | ||
{% endblock %} | ||
|
||
{% block links %} | ||
{{ super() }} | ||
{% include "organization/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