diff --git a/ckanext/odsh/templates/package/read.html b/ckanext/odsh/templates/package/read.html index 17d6f37f5411eb836442af747e7d8d8c9f61aa93..62ab0d93d083a1b96013c275816a595d57e54ec8 100644 --- a/ckanext/odsh/templates/package/read.html +++ b/ckanext/odsh/templates/package/read.html @@ -106,7 +106,7 @@ {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} {% if h.check_access('package_update', {'id':pkg.id }) %} <div class='add-resource-container'> - {% link_for _('Add new resource'), named_route='resource.new', id=pkg.name, class_='btn btn-primary', icon='plus' %} + {% link_for _('Add new resource'), named_route='dataset_resource.new', id=pkg.name, class_='btn btn-primary', icon='plus' %} </div> {% endif %} {% endblock package_resources %} diff --git a/ckanext/odsh/templates/package/resource_edit_base.html b/ckanext/odsh/templates/package/resource_edit_base.html index 4ada9a1e0e8d5d34d86c2e1b176e23c990651e17..1262ac0a2de43f60a5cf0a425e5e1446a3524e00 100644 --- a/ckanext/odsh/templates/package/resource_edit_base.html +++ b/ckanext/odsh/templates/package/resource_edit_base.html @@ -8,7 +8,7 @@ {% block breadcrumb_content %} {{ super() }} {% if res %} - <li>{% link_for h.resource_display_name(res)|truncate(30), named_route='resource.read', id=pkg.name, resource_id=res.id %}</li> + <li>{% link_for h.resource_display_name(res)|truncate(30), named_route='dataset_resource.read', id=pkg.name, resource_id=res.id %}</li> <li{% block breadcrumb_edit_selected %} class="active"{% endblock %}><a href="">{{ _('Edit') }}</a></li> {% endif %} {% endblock %} @@ -25,7 +25,7 @@ {% if res %} <div class="odsh-dataset-heading"> <span class='title'>Ressource {%if(res.name)%}"{{res.name}}"{%endif%} bearbeiten</span> - {% link_for _('Back'), named_route='resource.read', id=pkg.name, resource_id=res.id, class_='btn btn-heading', icon='arrow-left' %} + {% link_for _('Back'), named_route='dataset_resource.read', id=pkg.name, resource_id=res.id, class_='btn btn-heading', icon='arrow-left' %} <span class="clear"></span> </div> {% endif %} diff --git a/ckanext/odsh/templates/package/snippets/resource_form.html b/ckanext/odsh/templates/package/snippets/resource_form.html index d67a14ba16d35fb1fad506f0b6f202ecfbcbead1..f2ee2a839bf3ee2a7fe5e0438758e8f27981fd32 100644 --- a/ckanext/odsh/templates/package/snippets/resource_form.html +++ b/ckanext/odsh/templates/package/snippets/resource_form.html @@ -3,7 +3,7 @@ {% set data = data or {} %} {% set errors = errors or {} %} {% set active = data and data.state=='active' %} -{% set action = form_action or h.url_for('resource.new', id=pkg_name) %} +{% set action = form_action or h.url_for('dataset_resource.new', id=pkg_name) %} <form id="resource-edit" class="{%if(data)%}resource-edit-form{%endif%}" method="post" action="{{ action }}" data-module="basic-form resource-form" enctype="multipart/form-data" novalidate> {{ h.csrf_input() }} diff --git a/ckanext/odsh/templates/package/snippets/resource_item.html b/ckanext/odsh/templates/package/snippets/resource_item.html index 5c957ea66e44e3bae6a7d52f14074d7c0ce52908..84cc628ebd6ef678d3b336493d2c5b908dbccfbe 100644 --- a/ckanext/odsh/templates/package/snippets/resource_item.html +++ b/ckanext/odsh/templates/package/snippets/resource_item.html @@ -1,5 +1,5 @@ {% set url_action = 'edit' if url_is_edit and can_edit else 'read' %} -{% set url = h.url_for('resource.'+url_action, id=pkg.name, resource_id=res.id) %} +{% set url = h.url_for('dataset_resource.'+url_action, id=pkg.name, resource_id=res.id) %} {# hack for correcting slave url if resource was uploaded #} {% set download = h.odsh_public_resource_url(res) or url %} @@ -46,7 +46,7 @@ <div aria-hidden="true" class="icon icon-download"></div> </a> {% if can_edit %} - <a href="{{ h.url_for('resource.edit', id=pkg.name, resource_id=res.id) }}"> + <a href="{{ h.url_for('dataset_resource.edit', id=pkg.name, resource_id=res.id) }}"> <div class="icon icon-edit"></div> </a> {% endif %} diff --git a/ckanext/odsh/templates/package/snippets/resources_list.html b/ckanext/odsh/templates/package/snippets/resources_list.html index e67668171e41f165fab8bf217d0a67c4bd4eeed2..cc4b9efd3fd0f9ad1df175774b5943c844c2e12b 100644 --- a/ckanext/odsh/templates/package/snippets/resources_list.html +++ b/ckanext/odsh/templates/package/snippets/resources_list.html @@ -23,7 +23,7 @@ Example: </ul> {% else %} {% if h.check_access('resource_create', {'package_id': pkg['id']}) %} - {% trans url=h.url_for('resource.new', id=pkg.name) %} + {% trans url=h.url_for('dataset_resource.new', id=pkg.name) %} <p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a></p> {% endtrans %} {% else %} diff --git a/ckanext/odsh/templates/package/view_edit_base.html b/ckanext/odsh/templates/package/view_edit_base.html index 6b3e0de85610ec20bdad8e0ef641145561fa8093..23b205cbfaf6c8012fba38cfca9dd6c2d79b1f0a 100644 --- a/ckanext/odsh/templates/package/view_edit_base.html +++ b/ckanext/odsh/templates/package/view_edit_base.html @@ -6,9 +6,9 @@ {% block breadcrumb_edit_selected %}{% endblock %} {% block content_action %} - {% link_for _('All views'), named_route='resource.views', id=pkg.name, resource_id=res.id, class_='btn', icon='arrow-left' %} + {% link_for _('All views'), named_route='dataset_resource.views', id=pkg.name, resource_id=res.id, class_='btn', icon='arrow-left' %} {% if res %} - {% set url = h.url_for('resource.read', id=pkg.name, resource_id=res.id) ~ '?view_id=' ~ resource_view.id %} + {% set url = h.url_for('dataset_resource.read', id=pkg.name, resource_id=res.id) ~ '?view_id=' ~ resource_view.id %} <a href="{{ url }}" class="btn"><i class="fa fa-eye"></i> {{ _('View view') }}</a> {% endif %} {% endblock %}