Skip to content
Snippets Groups Projects
Commit 00c330fc authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Replaced deprecated resource blueprint with preferred <package_type>_resource

parent 2aa4fbfd
No related branches found
No related tags found
No related merge requests found
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
{% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %}
{% if h.check_access('package_update', {'id':pkg.id }) %} {% if h.check_access('package_update', {'id':pkg.id }) %}
<div class='add-resource-container'> <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> </div>
{% endif %} {% endif %}
{% endblock package_resources %} {% endblock package_resources %}
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{% block breadcrumb_content %} {% block breadcrumb_content %}
{{ super() }} {{ super() }}
{% if res %} {% 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> <li{% block breadcrumb_edit_selected %} class="active"{% endblock %}><a href="">{{ _('Edit') }}</a></li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
{% if res %} {% if res %}
<div class="odsh-dataset-heading"> <div class="odsh-dataset-heading">
<span class='title'>Ressource {%if(res.name)%}&#65282;{{res.name}}&#65282;{%endif%} bearbeiten</span> <span class='title'>Ressource {%if(res.name)%}&#65282;{{res.name}}&#65282;{%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> <span class="clear"></span>
</div> </div>
{% endif %} {% endif %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% set data = data or {} %} {% set data = data or {} %}
{% set errors = errors or {} %} {% set errors = errors or {} %}
{% set active = data and data.state=='active' %} {% 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> <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() }} {{ h.csrf_input() }}
......
{% set url_action = 'edit' if url_is_edit and can_edit else 'read' %} {% 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 #} {# hack for correcting slave url if resource was uploaded #}
{% set download = h.odsh_public_resource_url(res) or url %} {% set download = h.odsh_public_resource_url(res) or url %}
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div aria-hidden="true" class="icon icon-download"></div> <div aria-hidden="true" class="icon icon-download"></div>
</a> </a>
{% if can_edit %} {% 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> <div class="icon icon-edit"></div>
</a> </a>
{% endif %} {% endif %}
......
...@@ -23,7 +23,7 @@ Example: ...@@ -23,7 +23,7 @@ Example:
</ul> </ul>
{% else %} {% else %}
{% if h.check_access('resource_create', {'package_id': pkg['id']}) %} {% 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> <p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a></p>
{% endtrans %} {% endtrans %}
{% else %} {% else %}
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
{% block breadcrumb_edit_selected %}{% endblock %} {% block breadcrumb_edit_selected %}{% endblock %}
{% block content_action %} {% 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 %} {% 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> <a href="{{ url }}" class="btn"><i class="fa fa-eye"></i> {{ _('View view') }}</a>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment