-
Notifications
You must be signed in to change notification settings - Fork 2k
/
bulk_process.html
104 lines (101 loc) · 4.5 KB
/
bulk_process.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{% extends "organization/edit_base.html" %}
{% block subtitle %}{{ _('Edit datasets') }} - {{ super() }}{% endblock %}
{% block page_primary_action %}
{% link_for _('Add dataset'), controller='package', action='new', group=c.group_dict.id, class_='btn btn-primary', icon='plus-sign-alt' %}
{% endblock %}
{% block primary_content_inner %}
<div class="clearfix">
<h1 class="hide-heading">{{ _('Edit datasets') }}</h1>
<div class="primary">
<h3 class="page-heading">
{% block page_heading %}
{%- if c.page.item_count -%}
{{ c.page.item_count }} datasets{{ _(" found for \"{query}\"").format(query=c.q) if c.q }}
{%- elif request.params -%}
{{ _('Sorry no datasets found for "{query}"').format(query=c.q) }}
{%- else -%}
{{ _('Datasets') }}
{%- endif -%}
{% endblock %}
</h3>
{% block form %}
{% if c.page.item_count %}
<form method="POST" data-module="basic-form">
<table class="table table-bordered table-header table-hover table-bulk-edit table-edit-hover" data-module="table-selectable-rows">
<col width="8">
<col width="120">
<thead>
<tr>
<th></th>
<th class="table-actions">
<div class="btn-group">
<button name="bulk_action" value="public" class="btn" type="submit">
<i class="icon-eye-open"></i>
{{ _('Make public') }}
</button>
<button name="bulk_action" value="private" class="btn" type="submit">
<i class="icon-eye-close"></i>
{{ _('Make private') }}
</button>
</div>
<div class="btn-group">
<button name="bulk_action" value="delete" class="btn btn-danger" type="submit">
<i class="icon-remove"></i>
{{ _('Delete') }}
</button>
</div>
</th>
</tr>
</thead>
<tbody>
{% for package in c.packages %}
{% set truncate = truncate or 180 %}
{% set truncate_title = truncate_title or 80 %}
{% set title = package.title or package.name %}
{% set notes = h.markdown_extract(package.notes, extract_length=truncate) %}
<tr>
<td>
<input type="checkbox" name="dataset_{{ package.id }}">
</td>
<td class="context">
<a href="{% url_for controller='package', action='edit', id=package.name %}" class="edit pull-right">
{{ _('Edit') }}
</a>
<h3 class="dataset-heading">
{{ h.link_to(h.truncate(title, truncate_title), h.url_for(controller='package', action='read', id=package.name)) }}
{% if package.get('state', '').startswith('draft') %}
<span class="label label-info">{{ _('Draft') }}</span>
{% elif package.get('state', '').startswith('deleted') %}
<span class="label label-important">{{ _('Deleted') }}</span>
{% endif %}
{% if package.private %}
<span class="label label-important">{{ _('Private') }}</span>
{% endif %}
</h3>
{% if notes %}
<p>{{ notes|urlize }}</p>
{% else %}
<p class="empty">{{ _("This dataset has no description") }}</p>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% else %}
<p class="empty">{{ _('This organization has no datasets associated to it') }}</p>
{% endif %}
{% endblock %}
</div>
<aside class="tertiary">
{% block tertiary_content %}
{% snippet 'snippets/simple_search.html', q=c.q, sort=c.sort_by_selected, placeholder=_('Search datasets...'), extra_sort=[(_('Last Modified'), 'data_modified asc')], input_class='search-normal', form_class='search-aside' %}
{% for facet in c.facet_titles %}
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':c.group_dict.id}) }}
{% endfor %}
{% endblock %}
</aside>
</div>
{{ c.page.pager() }}
{% endblock %}