Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Rosanny Sihombing
ckan theme
Commits
d3ec3a34
Commit
d3ec3a34
authored
2 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
cosmetic updates
parent
cc8a8c53
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
ckanext-theme_hft/ckanext/theme_hft/templates/group/read_base.html
+7
-0
...heme_hft/ckanext/theme_hft/templates/group/read_base.html
ckanext-theme_hft/ckanext/theme_hft/templates/header.html
+5
-2
ckanext-theme_hft/ckanext/theme_hft/templates/header.html
ckanext-theme_hft/ckanext/theme_hft/templates/home/layout2.html
+6
-0
...t-theme_hft/ckanext/theme_hft/templates/home/layout2.html
ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/search.html
+14
-0
...hft/ckanext/theme_hft/templates/home/snippets/search.html
ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/stats.html
+16
-0
..._hft/ckanext/theme_hft/templates/home/snippets/stats.html
ckanext-theme_hft/ckanext/theme_hft/templates/package/group_list.html
+8
-0
...e_hft/ckanext/theme_hft/templates/package/group_list.html
ckanext-theme_hft/ckanext/theme_hft/templates/package/read_base.html
+7
-0
...me_hft/ckanext/theme_hft/templates/package/read_base.html
ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_basic_fields.html
+8
-0
..._hft/templates/package/snippets/package_basic_fields.html
ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_metadata_fields.html
+14
-0
...t/templates/package/snippets/package_metadata_fields.html
ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/resource_form.html
+8
-0
...t/theme_hft/templates/package/snippets/resource_form.html
ckanext-theme_hft/ckanext/theme_hft/templates/snippets/activity_stream.html
+19
-0
...ckanext/theme_hft/templates/snippets/activity_stream.html
ckanext-theme_hft/ckanext/theme_hft/templates/snippets/facet_list.html
+17
-0
..._hft/ckanext/theme_hft/templates/snippets/facet_list.html
ckanext-theme_hft/ckanext/theme_hft/templates/snippets/most_popular_groups.html
+29
-0
...ext/theme_hft/templates/snippets/most_popular_groups.html
ckanext-theme_hft/ckanext/theme_hft/templates/user/dashboard.html
+12
-0
...theme_hft/ckanext/theme_hft/templates/user/dashboard.html
ckanext-theme_hft/ckanext/theme_hft/templates/user/read_base.html
+30
-0
...theme_hft/ckanext/theme_hft/templates/user/read_base.html
with
200 additions
and
2 deletions
+200
-2
ckanext-theme_hft/ckanext/theme_hft/templates/group/read_base.html
0 → 100644
+
7
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/header.html
+
5
-
2
View file @
d3ec3a34
{% ckan_extends %}
{# exclude About #}
{# Remove access to Profile Setting #}
{% block header_account_settings_link %}
{% endblock %}
{# Exclude About and Organizations #}
{% block header_site_navigation_tabs %}
{{ h.build_nav_main(
('dataset.search', _('Datasets')),
('organization.index', _('Organizations')),
('group.index', _('Groups')) ) }}
{% endblock %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/home/layout2.html
0 → 100644
+
6
-
0
View file @
d3ec3a34
{% ckan_extends %}
{% block featured_group %}
{% snippet 'snippets/most_popular_groups.html',
groups=h.hft_theme_most_popular_groups() %}
{% endblock %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/search.html
0 → 100644
+
14
-
0
View file @
d3ec3a34
{% 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>
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/home/snippets/stats.html
0 → 100644
+
16
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/package/group_list.html
0 → 100644
+
8
-
0
View file @
d3ec3a34
{% ckan_extends %}
{% block primary_content_inner %}
{{ super() }}
{% if (group_dropdown) and (c.userobj) %}
{% endif %}
{% endblock %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/package/read_base.html
0 → 100644
+
7
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_basic_fields.html
0 → 100644
+
8
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/package_metadata_fields.html
0 → 100644
+
14
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/package/snippets/resource_form.html
0 → 100644
+
8
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/snippets/activity_stream.html
0 → 100644
+
19
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/snippets/facet_list.html
0 → 100644
+
17
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/snippets/most_popular_groups.html
0 → 100644
+
29
-
0
View file @
d3ec3a34
{# 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>
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/user/dashboard.html
0 → 100644
+
12
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
ckanext-theme_hft/ckanext/theme_hft/templates/user/read_base.html
0 → 100644
+
30
-
0
View file @
d3ec3a34
{% 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 %}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment