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

Adds missing breadcrumbs and improves breadcrumbs on some pages. #264

Merged
merged 1 commit into from
Nov 26, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block breadcrumb_content %}
<li>{{ h.nav_link(_('Dashboards'), named_route='dashboards.index') }}</li>
<li>{{ h.nav_link( dashboard.title|truncate(35), named_route='dashboards.read', name=dashboard.name) }}</li>
<li>{% link_for _(dashboard.title)|truncate(30), named_route='dashboards.view', name=dashboard.name %}</li>
<li class="active">{{ h.nav_link(_('Edit'), named_route='dashboards.edit', name=dashboard.name) }}</li>
{% endblock %}

Expand Down
25 changes: 25 additions & 0 deletions ckanext/knowledgehub/templates/package/edit_view.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% ckan_extends %}

{% block breadcrumb_content %}
{% if pkg %}
{% set dataset = h.dataset_display_name(pkg) %}
{% if pkg.organization %}
{% set organization = h.get_translated(pkg.organization, 'title') or pkg.organization.name %}
{% set group_type = pkg.organization.type %}
<li>{% link_for _('Organizations'), controller='organization', action='index', named_route=group_type + '_index' %}</li>
<li>{% link_for organization|truncate(30), controller='organization', action='read', id=pkg.organization.name, named_route=group_type + '_read' %}</li>
{% else %}
<li>{% link_for _('Datasets'), controller='package', action='search' %}</li>
{% endif %}
<li{{ self.breadcrumb_content_selected() }}>{% link_for dataset|truncate(30), controller='package', action='read', id=pkg.name %}</li>
{% else %}
<li>{% link_for _('Datasets'), controller='package', action='search' %}</li>
<li class="active"><a href="">{{ _('Create Dataset') }}</a></li>
{% endif %}
{% if res %}
<li>{% link_for h.resource_display_name(res)|truncate(30), controller='package', action='resource_read', id=pkg.name, resource_id=res.id %}</li>
<li>{% link_for _(resource_view.title)|truncate(30), controller='package', action='resource_read', id=pkg.name, resource_id=res.id, view_id=resource_view.id %}</li>
<li{% block breadcrumb_edit_selected %} class="active"{% endblock %}><a href="">{{ _('Edit') }}</a></li>
{% endif %}
<h2>PAJO</h2>
{% endblock %}
2 changes: 1 addition & 1 deletion ckanext/knowledgehub/templates/sub_theme/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block breadcrumb_content %}
<li>{{ h.nav_link(_('Sub-Themes'), named_route='sub_theme.search') }}</li>
<li>{{ h.nav_link(sub_theme.get('name', ''), named_route='sub_theme.read', name=sub_theme.get('name', '')) }}</li>
<li class="active">{{ h.nav_link(_('Manage'), named_route='sub_theme.edit', id=sub_theme.get('id', '')) }}</li>
<li class="active">{{ h.nav_link(_('Manage'), named_route='sub_theme.edit', name=sub_theme.get('name', '')) }}</li>
{% endblock %}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
{% endif %}
<li>{% link_for dataset|truncate(30), controller='package', action='read', id=pkg.name %}</li>
<li>{% link_for h.resource_display_name(res)|truncate(30), controller='package', action='resource_read', id=pkg.name, resource_id=res.id %}</li>
{% set edit_url = h.url_for(controller='package', action='resource_edit', id=pkg.name, resource_id=res.id) %}
<li><a href="{{ edit_url }}">{{ _('Edit') }}</a></li>
<li class="active"><a href="#">{{ _('Edit chart view') }}</a></li>
<li>{% link_for _(data.title)|truncate(30), controller='package', action='resource_read', id=pkg.name, resource_id=res.id, view_id=data.id %}</li>
<li class="active"><a href="">{{ _('Edit') }}</a></li>
{% endblock %}

{% block content_action %}
Expand Down