-
Notifications
You must be signed in to change notification settings - Fork 2k
/
new_resource.html
35 lines (29 loc) · 1.34 KB
/
new_resource.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% extends "package/base_form_page.html" %}
{% if c.userobj %}
{% set logged_in = true %}
{% else %}
{% set logged_in = false %}
{% endif %}
{% block subtitle %}{{ _('Add data to the dataset') }}{% endblock %}
{% block form %}{% snippet 'package/snippets/resource_form.html', data=data, errors=errors, error_summary=error_summary, include_metadata=false, pkg_name=pkg_name, stage=stage, allow_upload=logged_in %}{% endblock %}
{% block secondary_content %}
{% if pkg_dict %}
{% snippet 'package/snippets/info.html', pkg=pkg_dict, action='resource_new' %}
{% else %}
<section class="module module-narrow module-shallow">
<h2 class="module-heading"><i class="icon-large icon-info-sign"></i> {{ _('What\'s a resource?') }}</h2>
<div class="module-content">
<p>{{ _('A resource can be any file or link to a file containing useful data.') }}</p>
</div>
</section>
{% endif %}
{% endblock %}
{% block scripts %}
{{ super() }}
{% resource 'vendor/fileupload' %}
{% endblock %}
{% block breadcrumb_content %}
<li>{% link_for _('Datasets'), controller='package', action='search', highlight_actions = 'new index' %}</li>
<li>{% link_for h.dataset_display_name(pkg_dict)|truncate(30), controller='package', action='read', id=pkg_dict.name %}</li>
<li class="active"><a href="">Add resource</a></li>
{% endblock %}