Skip to content

Commit

Permalink
Merge branch '1030-ui-update'
Browse files Browse the repository at this point in the history
  • Loading branch information
joetsoi committed Nov 28, 2013
2 parents 618716b + 969ad6d commit ebd6db1
Show file tree
Hide file tree
Showing 47 changed files with 102 additions and 101 deletions.
17 changes: 13 additions & 4 deletions ckan/public/base/less/forms.less
Expand Up @@ -85,6 +85,12 @@ textarea {

.form-actions .control-required-message {
float: left;
margin-left: 20px;
margin-bottom: 0;
line-height: 30px;
&:first-child {
margin-left: 0;
}
}

.form-actions {
Expand Down Expand Up @@ -237,18 +243,21 @@ textarea {
}

.simple-input .field .btn-search {
.ckan-icon;
.ckan-icon-search;
position: absolute;
display: block;
height: 17px;
width: 17px;
padding: 0;
top: 50%;
right: 0;
margin-top: -8px;
margin-top: -10px;
background-color: transparent;
border: none;
text-indent: -999em;
color: #999;
.transition(color 0.2s ease-in);
&:hover {
color: #000;
}
}

.editor textarea {
Expand Down
7 changes: 7 additions & 0 deletions ckan/public/base/less/layout.less
Expand Up @@ -165,3 +165,10 @@
}
}
}

.flash-messages {
.alert {
.box-shadow(0 0 0 1px white);
}
}

4 changes: 4 additions & 0 deletions ckan/public/base/less/search.less
Expand Up @@ -84,6 +84,10 @@
color: @layoutBoldColor;
}
}
&.no-bottom-border {
border-bottom-width: 0;
margin-bottom: 0;
}
}

.tertiary {
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/admin/config.html
Expand Up @@ -10,7 +10,7 @@
<div class="form-actions">
{% set locale = h.dump_json({'content': _('Are you sure you want to reset the config?')}) %}
<a href="{% url_for controller='admin', action='reset_config' %}" class="btn btn-danger pull-left" data-module="confirm-action" data-module-i18n="{{ locale }}">{{ _('Reset') }}</a>
<button type="submit" class="btn btn-primary" name="save">{{ _('Update') }}</button>
<button type="submit" class="btn btn-primary" name="save">{{ _('Update Config') }}</button>
</div>
</form>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/about.html
@@ -1,6 +1,6 @@
{% extends "group/read_base.html" %}

{% block subtitle %}{{ _('About') }} - {{ c.group_dict.display_name }}{% endblock %}
{% block subtitle %}{{ _('About') }} - {{ super() }}{% endblock %}

{% block primary_content_inner %}
<h1>{% block page_heading %}{{ c.group_dict.display_name }}{% endblock %}</h1>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/activity_stream.html
@@ -1,6 +1,6 @@
{% extends "group/read_base.html" %}

{% block subtitle %}{{ _('Activity Stream') }} - {{ c.group_dict.title or c.group_dict.name }}{% endblock %}
{% block subtitle %}{{ _('Activity Stream') }} - {{ super() }}{% endblock %}

{% block primary_content_inner %}
<h2 class="hide-heading">{% block page_heading %}{{ _('Activity Stream') }}{% endblock %}</h2>
Expand Down
4 changes: 1 addition & 3 deletions ckan/templates/group/edit.html
Expand Up @@ -4,11 +4,9 @@
<li>{% link_for _('Groups'), controller='group', action='index' %}</li>
{% block breadcrumb_content_inner %}
<li>{% link_for group.display_name|truncate(35), controller='group', action='read', id=group.name %}</li>
<li class="active">{% link_for _('Edit'), controller='group', action='edit', id=group.name %}</li>
<li class="active">{% link_for _('Manage'), controller='group', action='edit', id=group.name %}</li>
{% endblock %}
{% endblock %}

{% block subtitle %}{{ _('Edit Group') }}{% endblock %}

{% block page_heading_class %}hide-heading{% endblock %}
{% block page_heading %}{{ _('Edit Group') }}{% endblock %}
6 changes: 4 additions & 2 deletions ckan/templates/group/edit_base.html
@@ -1,17 +1,19 @@
{% extends "page.html" %}

{% block subtitle %}{{ _('Manage') }} - {{ c.group_dict.display_name }} - {{ _('Groups') }}{% endblock %}

{% set group = c.group_dict %}

{% block breadcrumb_content %}
<li>{% link_for _('Groups'), controller='group', action='index' %}</li>
{% block breadcrumb_content_inner %}
<li>{% link_for group.display_name|truncate(35), controller='group', action='read', id=group.name %}</li>
<li class="active">{% link_for _('Edit'), controller='group', action='edit', id=group.name %}</li>
<li class="active">{% link_for _('Manage'), controller='group', action='edit', id=group.name %}</li>
{% endblock %}
{% endblock %}

{% block content_action %}
{% link_for _('View group'), controller='group', action='read', id=c.group_dict.name, class_='btn', icon='eye-open' %}
{% link_for _('View'), controller='group', action='read', id=c.group_dict.name, class_='btn', icon='eye-open' %}
{% endblock %}

{% block content_primary_nav %}
Expand Down
8 changes: 5 additions & 3 deletions ckan/templates/group/index.html
@@ -1,6 +1,6 @@
{% extends "page.html" %}

{% block subtitle %}{{ _('Groups of Datasets') }}{% endblock %}
{% block subtitle %}{{ _('Groups') }}{% endblock %}

{% block breadcrumb_content %}
<li class="active">{% link_for _('Groups'), controller='group', action='index' %}</li>
Expand All @@ -17,11 +17,13 @@
{% block primary_content_inner %}
<h1 class="hide-heading">{{ _('Groups') }}</h1>
{% block groups_search_form %}
{% snippet 'snippets/search_form.html', type='group', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search groups...'), show_empty=request.params %}
{% snippet 'snippets/search_form.html', type='group', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search groups...'), show_empty=request.params, no_bottom_border=true if c.page.items %}
{% endblock %}
{% block groups_list %}
{% if c.page.items or request.params %}
{% snippet "group/snippets/group_list.html", groups=c.page.items %}
{% if c.page.items %}
{% snippet "group/snippets/group_list.html", groups=c.page.items %}
{% endif %}
{% else %}
<p class="empty">
{{ _('There are currently no groups for this site') }}.
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/members.html
@@ -1,6 +1,6 @@
{% extends "group/edit_base.html" %}

{% block subtitle %}{{ _('Members') }} - {{ c.group_dict.display_name }}{% endblock %}
{% block subtitle %}{{ _('Members') }} - {{ c.group_dict.display_name }} - {{ _('Groups') }}{% endblock %}

{% block primary_content_inner %}
{% link_for _('Add Member'), controller='group', action='member_new', id=c.group_dict.id, class_='btn pull-right', icon='plus-sign-alt' %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/new.html
Expand Up @@ -2,7 +2,7 @@

{% block subtitle %}{{ _('Create a Group') }}{% endblock %}

{% block breadcrumb_link %}{{ h.nav_link(_('Create Group'), controller='group', action='edit', id=c.group.name) }}{% endblock %}
{% block breadcrumb_link %}{{ h.nav_link(_('Create a Group'), controller='group', action='edit', id=c.group.name) }}{% endblock %}

{% block page_heading %}{{ _('Create a Group') }}{% endblock %}

Expand Down
2 changes: 0 additions & 2 deletions ckan/templates/group/read.html
@@ -1,7 +1,5 @@
{% extends "group/read_base.html" %}

{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %}

{% block page_primary_action %}
{% link_for _('Add Dataset'), controller='package', action='new', group=c.group_dict.id, class_='btn btn-primary', icon='plus-sign-alt' %}
{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/group/read_base.html
@@ -1,6 +1,6 @@
{% extends "page.html" %}

{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %}
{% block subtitle %}{{ c.group_dict.display_name }} - {{ _('Groups') }}{% endblock %}

{% block breadcrumb_content %}
<li>{% link_for _('Groups'), controller='group', action='index' %}</li>
Expand All @@ -9,7 +9,7 @@

{% block content_action %}
{% if h.check_access('group_update', {'id': c.group_dict.id}) %}
{% link_for _('Edit'), controller='group', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %}
{% link_for _('Manage'), controller='group', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %}
{% endif %}
{% endblock %}

Expand Down
12 changes: 6 additions & 6 deletions ckan/templates/group/snippets/group_form.html
Expand Up @@ -70,13 +70,13 @@
#}

<div class="form-actions">
{% block delete_button %}
{% if h.check_access('group_delete', {'id': data.id}) %}
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this Group?')}) %}
<a class="btn btn-danger pull-left" href="{% url_for controller='group', action='delete', id=data.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endblock %}
{{ form.required_message() }}
{% block delete_button %}
{% if h.check_access('group_delete', {'id': data.id}) %}
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this Group?')}) %}
<a class="btn btn-danger pull-left" href="{% url_for controller='group', action='delete', id=data.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endblock %}
<button class="btn btn-primary" name="save" type="submit">{% block save_text %}{{ _('Save Group') }}{% endblock %}</button>
</div>
</form>
4 changes: 2 additions & 2 deletions ckan/templates/header.html
Expand Up @@ -105,8 +105,8 @@ <h1>
<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" type="text" name="q" placeholder="{{ _('Search') }}" />
<button class="btn-search" type="submit">{{ _('Search') }}</button>
<input id="field-sitewide-search" type="text" name="q" placeholder="{{ _('Search datasets...') }}" />
<button class="btn-search" type="submit"><i class="icon-search"></i></button>
</div>
</form>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/about.html
@@ -1,6 +1,6 @@
{% extends "organization/read_base.html" %}

{% block subtitle %}{{ _('About') }} - {{ c.group_dict.display_name }}{% endblock %}
{% block subtitle %}{{ _('About') }} - {{ super() }}{% endblock %}

{% block primary_content_inner %}
<h1>{% block page_heading %}{{ c.group_dict.display_name }}{% endblock %}</h1>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/activity_stream.html
@@ -1,6 +1,6 @@
{% extends "organization/read_base.html" %}

{% block subtitle %}{{ _('Activity Stream') }} - {{ c.group_dict.title or c.group_dict.name }}{% endblock %}
{% block subtitle %}{{ _('Activity Stream') }} - {{ super() }}{% endblock %}

{% block primary_content_inner %}
<h2 class="hide-heading">{% block page_heading %}{{ _('Activity Stream') }}{% endblock %}</h2>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/edit.html
@@ -1,6 +1,6 @@
{% extends "organization/base_form_page.html" %}

{% block subtitle %}{{ _('Edit Organization') }}{% endblock %}
{% block subtitle %}{{ _('Edit') }} - {{ super() }}{% endblock %}

{% block page_heading_class %}hide-heading{% endblock %}
{% block page_heading %}{{ _('Edit Organization') }}{% endblock %}
7 changes: 3 additions & 4 deletions ckan/templates/organization/edit_base.html
Expand Up @@ -2,21 +2,20 @@

{% set organization = c.group_dict %}

{% block subtitle %}{{ organization.display_name }}{% endblock %}
{% block subtitle %}{{ c.group_dict.display_name }} - {{ _('Organizations') }}{% endblock %}

{% block breadcrumb_content %}
<li>{% link_for _('Organizations'), controller='organization', action='index' %}</li>
{% block breadcrumb_content_inner %}
<li>{% link_for organization.display_name|truncate(35), controller='organization', action='read', id=organization.name %}</li>
<li class="active">{% link_for _('Admin'), controller='organization', action='edit', id=organization.name %}</li>
<li class="active">{% link_for _('Manage'), controller='organization', action='edit', id=organization.name %}</li>
{% endblock %}
{% endblock %}

{% block content_action %}
{% if organization and h.check_access('organization_update', {'id': organization.id}) %}
{% link_for _('View organization'), controller='organization', action='read', id=organization.name, class_='btn', icon='eye-open' %}
{% link_for _('View'), controller='organization', action='read', id=organization.name, class_='btn', icon='eye-open' %}
{% endif %}
{# <li>{% link_for _('History'), controller='organization', action='history', id=organization.name, class_='btn', icon='undo' %}</li> #}
{% endblock %}

{% block content_primary_nav %}
Expand Down
6 changes: 4 additions & 2 deletions ckan/templates/organization/index.html
Expand Up @@ -17,11 +17,13 @@
{% block primary_content_inner %}
<h1 class="hide-heading">{% block page_heading %}{{ _('Organizations') }}{% endblock %}</h1>
{% block organizations_search_form %}
{% snippet 'snippets/search_form.html', type='organization', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search organizations...'), show_empty=request.params %}
{% snippet 'snippets/search_form.html', type='organization', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search organizations...'), show_empty=request.params, no_bottom_border=true if c.page.items %}
{% endblock %}
{% block organizations_list %}
{% if c.page.items or request.params %}
{% snippet "organization/snippets/organization_list.html", organizations=c.page.items %}
{% if c.page.items %}
{% snippet "organization/snippets/organization_list.html", organizations=c.page.items %}
{% endif %}
{% else %}
<p class="empty">
{{ _('There are currently no organizations for this site') }}.
Expand Down
6 changes: 3 additions & 3 deletions ckan/templates/organization/member_new.html
Expand Up @@ -4,7 +4,7 @@

{% set user = c.user_dict %}

{% block subtitle %}{{ _('Members') }} - {{ c.group_dict.display_name }}{% endblock %}
{% block subtitle %}{{ _('Edit Member') if user else _('Add Member') }} - {{ super() }}{% endblock %}

{% block primary_content_inner %}
{% link_for _('Back to all members'), controller='organization', action='members', id=organization.name, class_='btn pull-right', icon='arrow-left' %}
Expand Down Expand Up @@ -55,11 +55,11 @@ <h1 class="page-heading">
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this member?')}) %}
<a href="{% url_for controller='organization', action='member_delete', id=c.group_dict.id, user=user.id %}" class="btn btn-danger pull-left" data-module="confirm-action" data-module-i18n="{{ locale }}">{{ _('Delete') }}</a>
<button class="btn btn-primary" type="submit" name="submit" >
{{ _('Save') }}
{{ _('Update Member') }}
</button>
{% else %}
<button class="btn btn-primary" type="submit" name="submit" >
{{ _('Add') }}
{{ _('Add Member') }}
</button>
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/members.html
@@ -1,6 +1,6 @@
{% extends "organization/edit_base.html" %}

{% block subtitle %}{{ _('Members') }} - {{ c.group_dict.display_name }}{% endblock %}
{% block subtitle %}{{ _('Members') }} - {{ super() }}{% endblock %}

{% block page_primary_action %}
{% link_for _('Add Member'), controller='organization', action='member_new', id=c.group_dict.id, class_='btn btn-primary', icon='plus-sign-alt' %}
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/organization/read_base.html
@@ -1,6 +1,6 @@
{% extends "page.html" %}

{% block subtitle %}{{ c.group_dict.display_name }}{% endblock %}
{% block subtitle %}{{ c.group_dict.display_name }} - {{ _('Organizations') }}{% endblock %}

{% block breadcrumb_content %}
<li>{% link_for _('Organizations'), controller='organization', action='index' %}</li>
Expand All @@ -9,7 +9,7 @@

{% block content_action %}
{% if h.check_access('organization_update', {'id': c.group_dict.id}) %}
{% link_for _('Admin'), controller='organization', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %}
{% link_for _('Manage'), controller='organization', action='edit', id=c.group_dict.name, class_='btn', icon='wrench' %}
{% endif %}
{% endblock %}

Expand Down
12 changes: 6 additions & 6 deletions ckan/templates/organization/snippets/organization_form.html
Expand Up @@ -73,12 +73,12 @@

{{ form.required_message() }}
<div class="form-actions">
{% block delete_button %}
{% if h.check_access('organization_delete', {'id': data.id}) %}
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this Organization? This will delete all the public and private datasets belonging to this organization.')}) %}
<a class="btn btn-danger pull-left" href="{% url_for controller='organization', action='delete', id=data.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endblock %}
{% block delete_button %}
{% if h.check_access('organization_delete', {'id': data.id}) %}
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this Organization? This will delete all the public and private datasets belonging to this organization.')}) %}
<a class="btn btn-danger pull-left" href="{% url_for controller='organization', action='delete', id=data.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endblock %}
<button class="btn btn-primary" name="save" type="submit">{% block save_text %}{{ _('Save Organization') }}{% endblock %}</button>
</div>
</form>
2 changes: 1 addition & 1 deletion ckan/templates/package/activity.html
@@ -1,6 +1,6 @@
{% extends "package/read_base.html" %}

{% block subtitle %}{{ _('Activity Stream') }} - {{ c.pkg_dict.title or c.pkg_dict.name }}{% endblock %}
{% block subtitle %}{{ _('Activity Stream') }} - {{ super() }}{% endblock %}

{% block primary_content_inner %}
<h1 class="hide-heading">{% block page_heading %}{{ _('Activity Stream') }}{% endblock %}</h1>
Expand Down
10 changes: 0 additions & 10 deletions ckan/templates/package/activity_stream.html

This file was deleted.

2 changes: 2 additions & 0 deletions ckan/templates/package/base.html
Expand Up @@ -4,6 +4,8 @@

{% block breadcrumb_content_selected %} class="active"{% endblock %}

{% block subtitle %}{{ _('Datasets') }}{% endblock %}

{% block breadcrumb_content %}
{% if pkg %}
{% set dataset = pkg.title or pkg.name %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/base_form_page.html
@@ -1,4 +1,4 @@
{% extends "package/base.html" %}
{% extends "package/edit_base.html" %}

{% block primary_content %}
<section class="module">
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/new.html
@@ -1,3 +1,3 @@
{% extends "package/base_form_page.html" %}

{% block subtitle %}{{ _('Create dataset') }}{% endblock %}
{% block subtitle %}{{ _('Create Dataset') }}{% endblock %}
2 changes: 0 additions & 2 deletions ckan/templates/package/read.html
Expand Up @@ -2,8 +2,6 @@

{% set pkg = c.pkg_dict %}

{% block subtitle %}{{ pkg.title or pkg.name }}{% endblock %}

{% block primary_content_inner %}
{{ super() }}
{% block package_description %}
Expand Down

0 comments on commit ebd6db1

Please sign in to comment.