Skip to content

Commit

Permalink
Merge branch 'master' into 3022-IDatasetForm-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 20, 2012
2 parents 3163bfc + 5ca73a5 commit 4e3bc3a
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 96 deletions.
4 changes: 0 additions & 4 deletions ckan/templates/base.html
Expand Up @@ -10,10 +10,6 @@
<!--[if gt IE 8]><!--> <html lang="{{ lang }}"> <!--<![endif]-->
{%- endblock -%}

<!--
{{ g }}
-->

{# Allows custom attributes to be added to the <head> tag #}
<head{% block headtag %}{% endblock %}>
{#
Expand Down
16 changes: 1 addition & 15 deletions ckan/templates/group/base_form_page.html
@@ -1,4 +1,4 @@
{% extends "page.html" %}
{% extends "group/index.html" %}

{% block breadcrumb_content %}
<li>{{ h.nav_link(_('Groups'), controller='group', action='index') }}</li>
Expand All @@ -15,17 +15,3 @@ <h1 class="page-heading">{% block page_heading %}{{ _('Group Form') }}{% endbloc
</div>
</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 Groups?') }}</h2>
<div class="module-content">
{% trans %}
<p>Whilst tags are great at collecting datasets together, there are
occasions when you want to restrict users from editing a collection.</p>
<p>A group can be set-up to specify which users have permission to add or
remove datasets from it.</p>
{% endtrans %}
</div>
</div>
{% endblock %}
12 changes: 9 additions & 3 deletions ckan/templates/group/index.html
Expand Up @@ -33,11 +33,17 @@ <h1 class="page-heading">{{ _('Groups') }}</h1>

{% block secondary_content %}
<div class="module module-narrow module-shallow">
<h2 class="module-heading"><i class="icon-large icon-info-sign"></i> {{ _('What are Groups?') }}</h2>
<h2 class="module-heading">
<i class="icon-large icon-info-sign"></i>
{{ _('What are Groups?') }}
</h2>
<div class="module-content">
{% trans %}
<p>Groups allow you to group together datasets under a organisation (for example, the Department of Health) or topic (e.g. Transport, Health) so make it easier for users to browse datasets by theme.</p>
<p>Groups also enable you to assign roles and authorisation to members of the group - i.e. individuals can be given the right to publish datasets from a particular organisation.</p>
<p>Groups allow you to group together datasets under a community (for
example, Civil Liberty data) or topic (e.g. Transport, Health,
Environment) to make it easier for users to browse datasets by theme.
Datasets can be part of a group, but do not belong to the group for
editing or authorisation purposes.</p>
{% endtrans %}
</div>
</div>
Expand Down
158 changes: 87 additions & 71 deletions ckan/templates/header.html
@@ -1,86 +1,102 @@
{% block header %}
<header class="masthead">
{% if g.debug and not g.debug_supress_header %}
<div class="debug">Controller : {{ c.controller }}<br/>Action : {{ c.action }}</div>
{% endif %}
<div class="container">
{# The .header-image class hides the main text and uses image replacement for the title #}
<hgroup class="{{ g.header_class }}">
{% if g.site_logo %}
<a class="logo" href="{{ h.url('home') }}"><img src="{{ h.url_for_static(g.site_logo) }}" alt="{{ g.site_title }} Logo" title="{{ g.site_title }} Logo" /></a>
{% else %}
<h1>
<a href="{{ h.url('home') }}">{{ g.site_title }}</a>
</h1>
{% if g.site_description %}<h2>{{ g.site_description }}</h2>{% endif %}
{% endif %}

{% block header_logo %}
{% if g.site_logo %}
<a class="logo" href="{{ h.url('home') }}"><img src="{{ h.url_for_static(g.site_logo) }}" alt="{{ g.site_title }} Logo" title="{{ g.site_title }} Logo" /></a>
{% else %}
<h1>
<a href="{{ h.url('home') }}">{{ g.site_title }}</a>
</h1>
{% if g.site_description %}<h2>{{ g.site_description }}</h2>{% endif %}
{% endif %}
{% endblock %}

</hgroup>
<div class="content">
<nav class="section navigation">
<ul class="unstyled">
{{ h.build_nav_main(
('add dataset', _('Add Dataset'), 'package_create'),
('search', _('Datasets')),
('organizations_index', _('Organizations')),
('group_index', _('Groups')),
('about', _('About'))
) }}
</ul>
</nav>
<form class="section site-search simple-input" action="{% url_for controller='package', action='search' %}" method="get">
<div class="field">
<label for="field-sitewide-search">{{ _('Search Datasets') }}</label>
<input id="field-sitewide-search" name="q" placeholder="{{ _('Search') }}" />
<button class="btn-search" type="submit">{{ _('Search') }}</button>
</div>
</form>
{% if c.userobj %}
<div class="section account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
<div class="dropdown">
<a href="{{ h.url_for(controller='user', action='dashboard') }}" class="button notifications{% if c.new_activities > 0 %} notifications-important{% endif %}" title="{{ c.new_activities }} {{ _('new notifications') }}">
{{ c.new_activities }}
</a>
</div>
<div class="dropdown">
<a href="#" class="button image dropdown-toggle" data-toggle="dropdown">
{{ h.gravatar((c.userobj.email_hash if c and c.userobj else ''),size=25) }}
<i class="icon-chevron-down"></i>
</a>
<ul class="user-dropdown-menu dropdown-menu pull-right" role="menu">
<li>
<a href="{{ h.url_for(controller='user', action='dashboard') }}">
<i class="icon-dashboard"></i>
{{ _('Dashboard') }}
</a>
</li>
<li>
<a href="{{ h.url_for(controller='user', action='read', id=c.userobj.name) }}">
<i class="icon-user"></i>
{{ _('My Profile') }}
</a>
</li>
<li>
<a href="{{ h.url_for(controller='user', action='edit', id=c.userobj.name) }}">
<i class="icon-wrench"></i>
{{ _('Edit Profile') }}
</a>
</li>
<li>
<a href="{{ h.url_for('/user/_logout') }}">
<i class="icon-signout"></i>
{{ _('Log out') }}
</a>
</li>
</ul>
</div>
</div>
{% else %}
<nav class="section account not-authed">

{% block header_site_navigation %}
<nav class="section navigation">
<ul class="unstyled">
<li>{% link_for _('Log in'), controller='user', action='login' %}</li>
<li>{% link_for _('Register'), controller='user', action='register', class_='sub' %}</li>
{{ h.build_nav_main(
('add dataset', _('Add Dataset'), 'package_create'),
('search', _('Datasets')),
('organizations_index', _('Organizations')),
('group_index', _('Groups')),
('about', _('About'))
) }}
</ul>
</nav>
{% endif %}
{% endblock %}

{% block header_site_search %}
<form class="section site-search simple-input" action="{% url_for controller='package', action='search' %}" method="get">
<div class="field">
<label for="field-sitewide-search">{{ _('Search Datasets') }}</label>
<input id="field-sitewide-search" name="q" placeholder="{{ _('Search') }}" />
<button class="btn-search" type="submit">{{ _('Search') }}</button>
</div>
</form>
{% endblock %}

{% block header_account %}
{% if c.userobj %}
<div class="section account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
<div class="dropdown">
<a href="{{ h.url_for(controller='user', action='dashboard') }}" class="button notifications{% if c.new_activities > 0 %} notifications-important{% endif %}" title="{{ c.new_activities }} {{ _('new notifications') }}">
{{ c.new_activities }}
</a>
</div>
<div class="dropdown">
<a href="#" class="button image dropdown-toggle" data-toggle="dropdown">
{{ h.gravatar((c.userobj.email_hash if c and c.userobj else ''),size=25) }}
<i class="icon-chevron-down"></i>
</a>
<ul class="user-dropdown-menu dropdown-menu pull-right" role="menu">
<li>
<a href="{{ h.url_for(controller='user', action='dashboard') }}">
<i class="icon-dashboard"></i>
{{ _('Dashboard') }}
</a>
</li>
<li>
<a href="{{ h.url_for(controller='user', action='read', id=c.userobj.name) }}">
<i class="icon-user"></i>
{{ _('My Profile') }}
</a>
</li>
<li>
<a href="{{ h.url_for(controller='user', action='edit', id=c.userobj.name) }}">
<i class="icon-wrench"></i>
{{ _('Edit Profile') }}
</a>
</li>
<li>
<a href="{{ h.url_for('/user/_logout') }}">
<i class="icon-signout"></i>
{{ _('Log out') }}
</a>
</li>
</ul>
</div>
</div>
{% else %}
<nav class="section account not-authed">
<ul class="unstyled">
<li>{% link_for _('Log in'), controller='user', action='login' %}</li>
<li>{% link_for _('Register'), controller='user', action='register', class_='sub' %}</li>
</ul>
</nav>
{% endif %}
{% endblock %}

</div>
</div>
</header>
{% endblock %}
6 changes: 6 additions & 0 deletions ckan/templates/organization/edit.html
Expand Up @@ -3,3 +3,9 @@
{% block subtitle %}{{ _('Edit a Organization') }}{% endblock %}

{% block page_heading %}{{ _('Edit a Organization') }}{% endblock %}

{% block secondary_content %}
{% if organization %}
{% snippet 'snippets/organization.html', organization=organization %}
{% endif %}
{% endblock %}
3 changes: 2 additions & 1 deletion ckan/templates/organization/edit_base.html
@@ -1,4 +1,4 @@
{% extends "page.html" %}
{% extends "organization/index.html" %}

{% set organization = c.group_dict %}

Expand Down Expand Up @@ -43,6 +43,7 @@
{% endblock %}

{% block secondary_content %}
{{ super() }}
{% if organization %}
{% snippet 'snippets/organization.html', organization=organization %}
{% endif %}
Expand Down
13 changes: 11 additions & 2 deletions ckan/templates/organization/index.html
Expand Up @@ -33,10 +33,19 @@ <h1 class="page-heading">{{ _('Organizations') }}</h1>

{% 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>
<h2 class="module-heading">
<i class="icon-large icon-info-sign"></i>
{{ _('What are Organizations?') }}
</h2>
<div class="module-content">
{% trans %}
<p>I have no idea</p>
<p>Organizations act like publishing departments for datasets (for
example, the Department of Health). This means that datasets can be
published by and belong to a department instead of an individual
user.</p>
<p>Within organizations, admins can assign roles and authorisation its
members, giving individual users the right to publish datasets from
that particular organisation (e.g. Office of National Statistics).</p>
{% endtrans %}
</div>
</div>
Expand Down

0 comments on commit 4e3bc3a

Please sign in to comment.