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

Removed named route

parent bc5fe5ce
Branches
Tags
2 merge requests!41Version 2.0.0,!38Merge py3 into dev
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{% endif %} {% endif %}
<div class="odsh-comment-wrapper"> <div class="odsh-comment-wrapper">
{# <a href="{{ h.url_for(named_route='user.read', id=comment.user.get('name')) }}" {# <a href="{{ h.url_for('user.read', id=comment.user.get('name')) }}"
class="comment-avatar"> class="comment-avatar">
{{ h.gravatar(comment.user.get('email_hash'), 48) }} {{ h.gravatar(comment.user.get('email_hash'), 48) }}
</a> </a>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#} #}
<div class="comment-header-text"> <div class="comment-header-text">
<i class="icon-comment fa fa-comment"></i> <i class="icon-comment fa fa-comment"></i>
<a href="{{ h.url_for(named_route='user.read', id=comment.user.get('name')) }}" class="comment-author">{{ comment.user.get('display_name') }}</a> <a href="{{ h.url_for('user.read', id=comment.user.get('name')) }}" class="comment-author">{{ comment.user.get('display_name') }}</a>
<span class='comment-date' title="{{comment.time}}">{{ h.odsh_render_datetime(comment.time).lower() }}</span> <span class='comment-date' title="{{comment.time}}">{{ h.odsh_render_datetime(comment.time).lower() }}</span>
</div> </div>
</div> </div>
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
{{ form.input('title', label=_('Name'), id='field-name', placeholder=_('My Organization'), value=data.title, error=errors.title, classes=['control-full'], attrs=attrs) }} {{ form.input('title', label=_('Name'), id='field-name', placeholder=_('My Organization'), value=data.title, error=errors.title, classes=['control-full'], attrs=attrs) }}
{# Perhaps these should be moved into the controller? #} {# Perhaps these should be moved into the controller? #}
{% set prefix = h.url_for(named_route='organization.read', id='') %} {% set prefix = h.url_for('organization.read', id='') %}
{% set domain = h.url_for(named_route='organization.read', id='', qualified=true) %} {% set domain = h.url_for('organization.read', id='', qualified=true) %}
{% set domain = domain|replace("http://", "")|replace("https://", "") %} {% set domain = domain|replace("http://", "")|replace("https://", "") %}
{% set attrs = {'data-module': 'slug-preview-slug', 'data-module-prefix': domain, 'data-module-placeholder': '<organization>'} %} {% set attrs = {'data-module': 'slug-preview-slug', 'data-module-prefix': domain, 'data-module-placeholder': '<organization>'} %}
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
{% if not res.description and package.notes %} {% if not res.description and package.notes %}
<h3>{{ _('From the dataset abstract') }}</h3> <h3>{{ _('From the dataset abstract') }}</h3>
<blockquote>{{ h.markdown_extract(h.get_translated(package, 'notes')) }}</blockquote> <blockquote>{{ h.markdown_extract(h.get_translated(package, 'notes')) }}</blockquote>
<p>{% trans dataset=package.title, url=h.url_for(named_route='dataset.read', id=package['name']) %}Source: <a href="{{ url }}">{{ dataset }}</a>{% endtrans %} <p>{% trans dataset=package.title, url=h.url_for('dataset.read', id=package['name']) %}Source: <a href="{{ url }}">{{ dataset }}</a>{% endtrans %}
{% endif %} {% endif %}
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -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(named_route='resource.new', id=pkg_name) %} {% set action = form_action or h.url_for('resource.new', id=pkg_name) %}
<form id="resource-edit" class="dataset-form dataset-resource-form {%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="dataset-form dataset-resource-form {%if(data)%}resource-edit-form{%endif%}" method="post" action="{{ action }}" data-module="basic-form resource-form" enctype="multipart/form-data" novalidate>
{% block stages %} {% block stages %}
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,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(named_route='resource.edit', id=pkg.name, resource_id=res.id) }}"> <a href="{{ h.url_for('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 %}
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,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(named_route='resource.edit', id=pkg.name, resource_id=res.id) }}"> <a href="{{ h.url_for('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 %}
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{% 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='resource.views', id=pkg.name, resource_id=res.id, class_='btn', icon='arrow-left' %}
{% if res %} {% if res %}
{% set url = h.url_for(named_route='resource.read', id=pkg.name, resource_id=res.id) ~ '?view_id=' ~ resource_view.id %} {% set url = h.url_for('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