Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2375-demo-theme-development' of github.com:okfn/ckan in…
…to 2375-demo-theme-development
- Loading branch information
Showing
20 changed files
with
169 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{% extends "group/snippets/group_form.html" %} | ||
|
||
{# | ||
As the form is rendered as a seperate page we take advantage of this by | ||
overriding the form blocks depending on the current context | ||
#} | ||
{% block dataset_fields %} | ||
{% if action == "edit" %}{{ super() }}{% endif %} | ||
{% endblock %} | ||
|
||
{% block custom_fields %} | ||
{% if action == "edit" %}{{ super() }}{% endif %} | ||
{% endblock %} | ||
|
||
{% block save_text %} | ||
{%- if action == "edit" -%} | ||
{{ _('Update Organization') }} | ||
{%- else -%} | ||
{{ _('Create Organization') }} | ||
{%- endif -%} | ||
{% endblock %} | ||
|
||
{% block delete_button %} | ||
{% if action == "edit" %}{{ super() }}{% endif %} | ||
{% endblock %} | ||
|
||
{% block basic_fields %} | ||
{% set attrs = {'data-module': 'slug-preview-target'} %} | ||
{{ form.input('title', label=_('Title'), id='field-title', placeholder=_('My Organization'), value=data.title, error=errors.title, classes=['control-full'], attrs=attrs) }} | ||
|
||
{% set prefix = h.url_for(controller='group', action='read', id='') %} | ||
{% set domain = h.url_for(controller='group', action='read', id='', qualified=true) %} | ||
{% set domain = domain|replace("http://", "")|replace("https://", "") %} | ||
{% set attrs = {'data-module': 'slug-preview-slug', 'data-module-prefix': domain, 'data-module-placeholder': '<organization>'} %} | ||
|
||
{{ form.prepend('name', label=_('URL'), prepend=prefix, id='field-url', placeholder=_('my-organization'), value=data.name, error=errors.name, attrs=attrs) }} | ||
|
||
{{ form.markdown('description', label=_('Description'), id='field-description', placeholder=_('A little information about my organization...'), value=data.description, error=errors.description) }} | ||
|
||
{{ form.input('image_url', label=_('Image URL'), id='field-image-url', type='url', placeholder=_('http://example.com/my-image.jpg'), value=data.image_url, error=errors.image_url, classes=['control-full']) }} | ||
|
||
{% 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,41 @@ | ||
{% extends "page.html" %} | ||
|
||
{% block subtitle %}{{ _('Organization') }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li class="active">{% link_for _('Organizations'), controller='group', action='index' %}</li> | ||
{% endblock %} | ||
|
||
{% block actions_content %} | ||
<li>{% link_for _('Add Organization'), controller='group', action='new', class_='btn', icon='plus' %}</li> | ||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<div class="module"> | ||
<div class="module-content"> | ||
<h1 class="page-heading">{{ _('Organizations') }}</h1> | ||
{% if c.page.items %} | ||
{% snippet "group/snippets/group_list.html", groups=c.page.items %} | ||
{% else %} | ||
<p class="empty"> | ||
{{ _('There are currently no organizations for this site') }}. | ||
{% if h.check_access('package_create') %} | ||
{% link_for _('How about creating one?'), controller='group', action='new' %}</a>. | ||
{% endif %} | ||
</p> | ||
{% endif %} | ||
</div> | ||
{{ c.page.pager() }} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
<div class="module module-narrow module-shallow"> | ||
<h2 class="module-heading"><i class="icon-large icon-info-sign"></i> {{ _('What are Organizations?') }}</h2> | ||
<div class="module-content"> | ||
{% trans %} | ||
<p>Organizations allow you to add both users and datasets to it in order to control who can access and manage your datasets</p> | ||
{% endtrans %} | ||
</div> | ||
</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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends "group/base_form_page.html" %} | ||
|
||
{% block subtitle %}{{ _('Create an organization') }}{% endblock %} | ||
|
||
{% block breadcrumb_link %}{{ h.nav_link(_('Create Organization'), controller='group', action='edit', id=c.group.name) }}{% endblock %} | ||
|
||
{% block page_heading %}{{ _('Create an organization') }}{% endblock %} | ||
|
||
{% block secondary_content %} | ||
<div class="module module-narrow module-shallow"> | ||
<h2 class="module-heading"><i class="icon-large icon-info-sign"></i> {{ _('What are Organizations?') }}</h2> | ||
<div class="module-content"> | ||
{% trans %} | ||
<p>An organization can be set-up to specify which users have permission to add or | ||
remove datasets from it.</p> | ||
{% endtrans %} | ||
</div> | ||
</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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% extends "page.html" %} | ||
|
||
{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li>{% link_for _('Organizations'), 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('group_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='group', action='edit', id=c.group_dict.name, class_='btn', icon='cog' %}</li> | ||
<li>{% link_for _('Manage Users'), controller='ckanext.organizations.controllers:OrganizationController', action='users', id=c.group_dict.name, class_='btn', icon='cog' %}</li> | ||
{% endif %} | ||
{# <li>{% link_for _('History'), controller='group', 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/group.html', group=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> | ||
|
||
{{ 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 "group/snippets/feeds.html" %} | ||
{% endblock %} |
Empty file.
Empty file.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -40,5 +40,5 @@ | |
</ul> | ||
</py:match> | ||
|
||
<xi:include href="layout.html" /> | ||
<xi:include href="../layout.html" /> | ||
</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
File renamed without changes.
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
File renamed without changes.