Commit e4034407 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

Merge branch 'dev' into 'testing'

Cosmetic updates

See merge request !10
parents c2d387d4 d3ec3a34
Pipeline #6447 passed with stage
in 19 seconds
{% ckan_extends %}
{# Remove Activity Stream #}
{% block content_primary_nav %}
{{ h.build_nav_icon(group_type + '.read', _('Datasets'), id=group_dict.name, icon='sitemap') }}
{{ h.build_nav_icon(group_type + '.about', _('About'), id=group_dict.name, icon='info-circle') }}
{% endblock %}
{% ckan_extends %} {% ckan_extends %}
{# exclude About #} {# Remove access to Profile Setting #}
{% block header_account_settings_link %}
{% endblock %}
{# Exclude About and Organizations #}
{% block header_site_navigation_tabs %} {% block header_site_navigation_tabs %}
{{ h.build_nav_main( {{ h.build_nav_main(
('dataset.search', _('Datasets')), ('dataset.search', _('Datasets')),
('organization.index', _('Organizations')),
('group.index', _('Groups')) ) }} ('group.index', _('Groups')) ) }}
{% endblock %} {% endblock %}
{% ckan_extends %}
{% block featured_group %}
{% snippet 'snippets/most_popular_groups.html',
groups=h.hft_theme_most_popular_groups() %}
{% endblock %}
{% set placeholder = _('E.g. environment') %}
<div class="module module-search module-narrow module-shallow box">
<form class="module-content search-form" method="get" action="{% url_for 'dataset.search' %}">
<h3 class="heading">{{ _("Search data") }}</h3>
<div class="search-input form-group search-giant">
<input aria-label="{% block header_site_search_label %}{{ _('Search datasets') }}{% endblock %}" id="field-main-search" type="text" class="form-control" name="q" value="" autocomplete="off" placeholder="{% block search_placeholder %}{{ placeholder }}{% endblock %}" />
<button type="submit" aria-labelledby="search-label">
<i class="fa fa-search"></i>
<span class="sr-only" id="search-label">{{ _('Search') }}</span>
</button>
</div>
</form>
</div>
{% ckan_extends %}
{% block stats_group %}
<li>
<a href="{{ h.url_for('dataset.search') }}">
<strong>{{ h.SI_number_span(stats.dataset_count) }}</strong>
{{ _('dataset') if stats.dataset_count == 1 else _('datasets') }}
</a>
</li>
<li>
<a href="{{ h.url_for(controller='group', action='index') }}">
<strong>{{ h.SI_number_span(stats.group_count) }}</strong>
{{ _('group') if stats.group_count == 1 else _('groups') }}
</a>
</li>
{% endblock %}
{% ckan_extends %}
{% block primary_content_inner %}
{{ super() }}
{% if (group_dropdown) and (c.userobj) %}
{% endif %}
{% endblock %}
{% ckan_extends %}
{# Remove Activity Stream #}
{% block content_primary_nav %}
{{ h.build_nav_icon(dataset_type ~ '.read', _('Dataset'), id=pkg.id if is_activity_archive else pkg.name, icon='sitemap') }}
{{ h.build_nav_icon(dataset_type ~ '.groups', _('Groups'), id=pkg.id if is_activity_archive else pkg.name, icon='users') }}
{% endblock %}
{% ckan_extends %}
{% block package_basic_fields_title %}
{{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. A descriptive title'), value=data.title, error=errors.title, classes=['control-full', 'control-large'], attrs={'data-module': 'slug-preview-target', 'class': 'form-control'}, is_required=true) }}
{% endblock %}
{% block package_basic_fields_tags %}
{% endblock %}
{% ckan_extends %}
{% block package_metadata_author %}
{{ form.input('author', label=_('Author'), id='field-author', placeholder=_('Joe Bloggs'), value=data.author, error=errors.author, classes=['control-medium'], is_required=true) }}
{{ form.input('author_email', label=_('Author Email'), id='field-author-email', placeholder=_('joe@example.com'), value=data.author_email, error=errors.author_email, classes=['control-medium'], is_required=true) }}
{% endblock %}
{% block package_metadata_fields_maintainer %}
{{ form.input('maintainer', label=_('Maintainer'), id='field-maintainer', placeholder=_('Joe Bloggs'), value=data.maintainer, error=errors.maintainer, classes=['control-medium'], is_required=true) }}
{{ form.input('maintainer_email', label=_('Maintainer Email'), id='field-maintainer-email', placeholder=_('joe@example.com'), value=data.maintainer_email, error=errors.maintainer_email, classes=['control-medium'], is_required=true) }}
{% endblock %}
{% block package_metadata_fields_custom %}
{% endblock %}
{% ckan_extends %}
{% block basic_fields_url %}
{% set is_upload = (data.url_type == 'upload') %}
{{ form.image_upload(data, errors, field_url='url', field_upload='upload', field_clear='clear_upload',
is_upload_enabled=h.uploads_enabled(), is_url=data.url and not is_upload, is_upload=is_upload,
upload_label=_('Data (max. 150MB)'), url_label=_('URL'), placeholder=_('http://example.com/external-data.csv'), field_name='name') }}
{% endblock %}
{% ckan_extends %}
{% macro actor(activity) %}
{% endmacro %}
{% macro dataset(activity) %}
{% endmacro %}
{% macro organization(activity) %}
{% endmacro %}
{% macro user(activity) %}
{% endmacro %}
{% macro group(activity) %}
{% endmacro %}
{% block activity_stream %}
{% endblock %}
{% ckan_extends %}
{% block facet_list %}
{# hide empty facet (Organizations and Tags) #}
{% set hide_empty = hide_empty or true %}
{% with items = items or h.get_facet_items_dict(name, search_facets or c.search_facets) %}
{% if items or not hide_empty %}
{% if within_tertiary %}
{% set nav_class = 'nav nav-pills nav-stacked' %}
{% set nav_item_class = ' ' %}
{% set wrapper_class = 'nav-facet nav-facet-tertiary' %}
{% endif %}
{% block facet_list_item %}
{{ super() }}
{% endblock %}
{% endif %}
{% endwith %}
{% endblock %}
{# Renders a list of the site's most popular groups. #}
<div class="box">
<header class="module-heading">
<h3>Most popular topics</h3>
</header>
<section class="module-content">
<ul class="list-unstyled">
{% for group in groups %}
<li>
<a href="{{ h.url_for('group_read', action='read', id=group.name) }}">
<h3>{{ group.display_name }}</h3>
</a>
{% if group.description %}
<p>
{{ h.markdown_extract(group.description, extract_length=80) }}
</p>
{% else %}
<p>{{ _('This group has no description') }}</p>
{% endif %}
{% if group.package_count %}
<strong>{{ ungettext('{num} Dataset', '{num} Datasets', group.package_count).format(num=group.package_count) }}</strong>
{% else %}
<span>{{ _('0 Datasets') }}</span>
{% endif %}
</li>
{% endfor %}
</ul>
</section>
</div>
{% ckan_extends %}
{% block page_header %}
<header class="module-content page-header hug">
{% block content_primary_nav %}
<ul class="nav nav-tabs">
{{ h.build_nav_icon('dashboard.index', _('News feed'), icon='list') }}
{{ h.build_nav_icon('dashboard.datasets', _('My Datasets'), icon='sitemap') }}
</ul>
{% endblock %}
</header>
{% endblock %}
{% ckan_extends %}
{# Remove access to see all users #}
{% block breadcrumb_content %}
{{ h.build_nav('user.read', user.display_name|truncate(35), id=user.name) }}
{% endblock %}
{# Remove access to edit user profile #}
{% block content_action %}
{% endblock %}
{# Remove user API tokens and Activity Stream #}
{% block content_primary_nav %}
{{ h.build_nav_icon('user.read', _('Datasets'), id=user.name, icon='sitemap') }}
{% endblock %}
{# Remove biography #}
{% block user_about %}
{% endblock %}
{% block user_info %}
<div class="info">
{% if is_myself %}
<dl>
<dt>{{ _('Email') }} <span class="label label-default" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd>{{ user.email }}</dd>
</dl>
{% endif %}
</div>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment