-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathlist.html
More file actions
133 lines (115 loc) · 5.28 KB
/
list.html
File metadata and controls
133 lines (115 loc) · 5.28 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{% extends "base.html" %}
{% load render_bundle from webpack_loader %}
{% load comment_extras %}
{% load static %}
{% block top_includes %}
<link rel="stylesheet" type="text/css" href="/static/css/institutions.css" />
{% endblock %}
{% block title %}
<title>Share Reindex</title>
{% endblock title %}
{% block content %}
<h2>Share Reindex</h2>
{% include "util/pagination.html" with items=page extra_query_params="&type="|add:selected_resource_type %}
<div class="row" style="margin-bottom: 20px;">
<div class="col-md-3">
<form method="GET" action="">
<select class="form-control" name="type" onchange="this.form.submit()">
<option value="projects" {% if selected_resource_type == 'projects' %}selected{% endif %}>Projects</option>
<option value="preprints" {% if selected_resource_type == 'preprints' %}selected{% endif %}>Preprints</option>
<option value="registries" {% if selected_resource_type == 'registries' %}selected{% endif %}>Registries</option>
<option value="users" {% if selected_resource_type == 'users' %}selected{% endif %}>Users</option>
<option value="files" {% if selected_resource_type == 'files' %}selected{% endif %}>Files</option>
</select>
</form>
</div>
<div class="col-md-3">
<a data-toggle="modal" data-target="#confirmReindexShareNodes" class="btn btn-primary">
SHARE Reindex All {{selected_resource_type}}
</a>
<div class="modal" id="confirmReindexShareNodes">
<div class="modal-dialog">
<div class="modal-content">
<form method="post" action="{% url 'admin:reindex-share-resource' resource_type=selected_resource_type %}">
{% csrf_token %}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Are you sure you want to reindex {{selected_resource_type}} (SHARE)?</h3>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<input class="btn btn-primary" type="submit" value="Confirm Re-index" />
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div>
<p>{{share_reindex_message}}</p>
</div>
<table class="table table-striped table-hover table-responsive">
<thead>
<tr>
<th>Guid</th>
{% if selected_resource_type == 'projects' or selected_resource_type == 'preprints' or selected_resource_type == 'registries' %}
<th>Title</th>
{% elif selected_resource_type == 'users' %}
<th>Fullname</th>
{% else %}
<th>Name</th>
{% endif %}
<th>Datetime Last Indexed</th>
<!-- there is no a file indexing option for detail page for now -->
{% if selected_resource_type != 'files' %}
<th>Reindex</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for item in items_to_index %}
<tr>
<td>
<a href="{% url resource_detail guid=item.first_guid %}">
{{item.first_guid}}
</a>
</td>
{% if selected_resource_type == 'projects' or selected_resource_type == 'preprints' or selected_resource_type == 'registries' %}
<td>{{item.title}}</td>
{% elif selected_resource_type == 'users' %}
<td>{{item.fullname}}</td>
{% else %}
<th>{{item.name}}</th>
{% endif %}
<td>{{item.date_last_indexed}}</td>
{% if selected_resource_type != 'files' %}
<td>
<a data-toggle="modal" data-target="#confirmReindexShareNode-{{ item.first_guid }}" class="btn btn-primary">SHARE Reindex</a>
</td>
<div class="modal" id="confirmReindexShareNode-{{ item.first_guid }}">
<div class="modal-dialog">
<div class="modal-content">
<form class="well" method="post" action="{% url resource_guid_reindex guid=item.first_guid %}">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3>Are you sure you want to reindex this node (SHARE)? {{ item.first_guid }}</h3>
</div>
{% csrf_token %}
<div class="modal-footer">
<input class="btn btn-danger" type="submit" value="Confirm" />
<button type="button" class="btn btn-default" data-dismiss="modal">
Cancel
</button>
</div>
</form>
</div>
{# Data from above link #}
</div>
</div>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endblock content %}