Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKAN 2.10.1 small fixes #6173

Merged
merged 4 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ckan/config/middleware/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def make_flask_stack(conf: Union[Config, CKANConfig]) -> CKANApp:
_register_plugins_blueprints(app)

if config.get("ckan.csrf_protection.ignore_extensions"):
log.warn(csrf_warn_extensions)
# log.warn(csrf_warn_extensions)
_exempt_plugins_blueprints_from_csrf(csrf)

lib_plugins.register_package_blueprints(app)
Expand Down
2 changes: 1 addition & 1 deletion ckanext-hdx_theme/ckanext/hdx_theme/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def hdx_popular(type_, number, min=1, title=None):


def hdx_license_list():
license_touple_list = base.model.Package.get_license_options()
license_touple_list = model.Package.get_license_options()
license_dict_list = [{'value': _id, 'text': _title} for _title, _id in license_touple_list]
return license_dict_list

Expand Down
24 changes: 12 additions & 12 deletions ckanext-hdx_theme/ckanext/hdx_theme/templates/group/read_base.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{% extends "page.html" %}

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

{% block breadcrumb_content %}
{% snippet "snippets/other_breadcrumb_item.html", title=_('Groups'), controller='group', action='index', position=2 %}
<li class="breadcrumb-item active">{% link_for c.group_dict.display_name|truncate(35), controller='group', action='read', id=c.group_dict.name %}</li>
<li class="breadcrumb-item active">{% link_for group_dict.display_name|truncate(35), controller='group', action='read', id=group_dict.name %}</li>
{% endblock %}

{% block page_header %}
<div class="mTop35">
<h1 class="itemTitle">
{{ c.group_dict.display_name }}
{{ group_dict.display_name }}
</h1>
<span class="followButtonContainer float-end">
{{ h.follow_button('group', c.group_dict.id) }}
{{ h.follow_button('group', group_dict.id) }}
</span>
</div>
<header class="module-content page-header paddingRowHack mBottom10">
<ul class="nav nav-tabs paddingLeftHack paddingRightHack">
{% block content_primary_nav %}
{{ h.bs5_build_nav_icon('group_read', _('Datasets'), class_='nav-link', id=c.group_dict.name) }}
{{ h.bs5_build_nav_icon('group_activity', _('Activity Stream'), id=c.group_dict.name, class_='nav-link mx-activity-stream', offset=0) }}
{# {{ h.build_nav_icon('group_about', _('About'), id=c.group_dict.name) }} #}
{{ h.bs5_build_nav_icon('group.read', _('Datasets'), class_='nav-link', id=group_dict.name) }}
{{ h.bs5_build_nav_icon('activity.group_activity', _('Activity Stream'), id=group_dict.name, class_='nav-link mx-activity-stream', offset=0) }}
{# {{ h.build_nav_icon('group.about', _('About'), id=group_dict.name) }} #}
{% endblock %}
</ul>
</header>
{% if self.content_action() | trim %}
<div class="content_action">
{% 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' %}
{% if h.check_access('group_update', {'id': group_dict.id}) %}
{% link_for _('Edit'), controller='group', action='edit', id=group_dict.name, class_='btn', icon='wrench' %}
{% endif %}
{% endblock %}
</div>
{% endif %}
<div>
{% if c.group_dict.description %}
{% if group_dict.description %}
<p>
{{ c.group_dict.description }}
{{ group_dict.description }}
</p>
{% else %}
<p class="empty">{{ _('There is no description for this group') }}</p>
Expand All @@ -46,7 +46,7 @@ <h1 class="itemTitle">
{% endblock %}

{% block secondary_content %}
{% snippet "group/snippets/info.html", group=c.group_dict, show_nums=true %}
{% snippet "group/snippets/info.html", group=group_dict, show_nums=true %}
{% endblock %}

{% block links %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h2 class="uppercase">{{_('Related Showcases')}}</h2>
{% snippet 'package/snippets/activity_stream.html', activity_stream=hdx_activities, id=pkg.id, object_type='package' %}
<br>
{% if h.follow_status('dataset', pkg.name) %}
<span class="more mb-2">See more in <a href="{{ h.url_for('dashboard.index') }}">your dashboard</a></span>
<span class="more mb-2">See more in <a href="{{ h.url_for('activity.dashboard') }}">your dashboard</a></span>
{% endif %}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="module module-narrow module-shallow license">
<h2 class="module-heading"><i class="icon-medium fa fa-th-list"></i> {{ _('Misc') }}</h2>
<p class="module-content">
<a href="{{ h.url_for('dataset_activity', _('Activity Stream'), id=pkg_dict.name) }}"><i class="fa fa-chevron-circle-left"></i> View {{ _('Activity Stream') }}</a>
<a href="{{ h.url_for('activity.package_activity', _('Activity Stream'), id=pkg_dict.name) }}"><i class="fa fa-chevron-circle-left"></i> View {{ _('Activity Stream') }}</a>
</p>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2 class="sspBold28 black mTop20">
{% block page_header %}
<header class="page-header paddingRowHack" style="position: relative;">
<ul class="nav nav-tabs paddingLeftHack paddingRightHack">
{{ h.bs5_build_nav_icon('dashboard.index', _('Newsfeed'), class_='nav-link hdx-tab-button') }}
{{ h.bs5_build_nav_icon('activity.dashboard', _('Newsfeed'), class_='nav-link hdx-tab-button') }}
{{ h.bs5_build_nav_icon('hdx_user_dashboard.datasets', _('My Datasets'), class_='nav-link hdx-tab-button') }}
{{ h.bs5_build_nav_icon('dashboard.organizations', _('My Organisations'), class_='nav-link hdx-tab-button') }}
{{ h.bs5_build_nav_icon('dashboard.groups', _('My Locations'), class_='nav-link hdx-tab-button') }}
Expand Down Expand Up @@ -64,7 +64,7 @@ <h2 class="sspBold28 black mTop20">
{% block primary_content_inner %}
<div>
{% block activity_stream %}
{% snippet 'snippets/activity_stream.html', activity_stream=dashboard_activity_stream %}
{% snippet 'snippets/stream.html', activity_stream=dashboard_activity_stream %}
{% endblock %}
</div>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<div class="dropdown-divider"></div>
{% if followees %}
<li>
<a class="dropdown-item everything {% if context.selected_id == False %}active{% endif %}" href="{{ h.url_for('dashboard.index') }}">
<a class="dropdown-item everything {% if context.selected_id == False %}active{% endif %}" href="{{ h.url_for('activity.dashboard') }}">
Everything
</a>
</li>
{% for followee in followees %}
<li>
<a class="dropdown-item {% if context.selected_id == followee.dict.id %}active{% endif %}" href="{{ h.url_for('dashboard.index', type=followee.type, name=followee.dict.name) }}" title="{{ followee.display_name }}">
<a class="dropdown-item {% if context.selected_id == followee.dict.id %}active{% endif %}" href="{{ h.url_for('activity.dashboard', type=followee.type, name=followee.dict.name) }}" title="{{ followee.display_name }}">
{{ followee.display_name }}
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{'url_name': 'hdx_group.index', 'usertype': 'all'},
{'url_name': 'hdx_org.index', 'usertype': 'all'},
{'url_name': 'dashboard.organizations', 'usertype': 'all'},
{'url_name': 'dashboard.index', 'usertype': 'all'},
{'url_name': 'activity.dashboard', 'usertype': 'all'},
{'url_name': 'hdx_user_dashboard.datasets', 'usertype': 'all'},
{'url_name': 'dashboard.groups', 'usertype': 'all'},
{'url_name': 'hdx_user_dashboard.datasets', 'usertype': 'all', 'url_params': {'id': 'tester'}},
Expand Down
2 changes: 1 addition & 1 deletion common-config-ini.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ckanext.spatial.common_map.custom.url = /crisis-tiles/{z}/{x}/{y}.png

## Email settings

# email_to = [email protected]
email_to = [email protected]
error_email_from = paste@localhost
smtp.server = localhost
smtp.starttls = False
Expand Down
Loading