forked from opencast/opencast
/
delete-events-modal.html
216 lines (194 loc) · 11.5 KB
/
delete-events-modal.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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<section class="modal wizard active modal-open" id="delete-events-status-modal" style="display: block;" ng-controller="BulkDeleteCtrl">
<header>
<a ng-click="close()" class="fa fa-times close-modal"></a>
<h2 translate="BULK_ACTIONS.DELETE.EVENTS.CAPTION"><!-- Delete Events --></h2>
</header>
<nav id="modal-nav" class="step-by-step">
<a ng-click="navigateTo('deleteForm', currentForm, [])" ng-class="{ active: currentForm === 'deleteForm'}">{{ 'BULK_ACTIONS.DELETE.EVENTS.DELETE_EVENTS' | translate }}</a>
<a ng-click="navigateTo('retractForm', currentForm, [])" ng-class="{ active: currentForm === 'retractForm', 'not-complete': !valid()}">{{ 'BULK_ACTIONS.DELETE.EVENTS.RETRACT_EVENTS' | translate }}</a>
<a ng-click="navigateTo('summaryForm', currentForm, [retractForm])" ng-class="{ active: currentForm === 'summaryForm'}">{{ 'EVENTS.RETRACT.SUMMARY' | translate }}</a>
</nav>
<nav id="breadcrumb"></nav>
<div class="modal-content" ng-class="{active: currentForm === 'deleteForm'}" ng-if="currentForm === 'deleteForm'">
<div class="modal-body">
<div class="full-col">
<div class="list-obj" ng-form="deleteForm">
<div class="modal-alert danger obj" ng-if="events.unpublished.has">
<p translate="BULK_ACTIONS.DELETE_EVENTS_WARNING_LINE1">
<!-- You have chosen to delete an event. Once deleted all metadata,
audio and video will be deleted and can not be retrieved. -->
</p>
<p translate="BULK_ACTIONS.DELETE_EVENTS_WARNING_LINE2">
<!-- By pressing delete you understand that these files are unrecoverable. -->
</p>
</div>
<div class="full-col" ng-if="events.unpublished.has">
<div class="obj">
<header translate="BULK_ACTIONS.DELETE.EVENTS.DELETE_EVENTS">
<!-- Delete Events -->
</header>
<table class="main-tbl">
<thead>
<tr>
<th class="small"><input type="checkbox" ng-model="unpublished.allSelected" ng-change="unpublished.allSelectedChanged()" class="select-all-cbox"/></th>
<th translate="EVENTS.EVENTS.TABLE.TITLE"><!-- Title --></th>
<th translate="EVENTS.EVENTS.TABLE.CREATORS"><!-- Presenter --></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in unpublished.rows">
<td><input type="checkbox" ng-model="row.selected" ng-change="unpublished.rowSelectionChanged($index)" class="child-cbox"/></td>
<td>{{ row.title }}</td>
<td>{{ row.presenters }}</td>
</tr>
</tbody>
</table>
</div> <!-- obj -->
</div><!-- full-col -->
<div class="full-col obj" ng-if="!events.unpublished.has">
<p translate="BULK_ACTIONS.DELETE.EVENTS.UNPUBLISHED.NONE">
<!-- None of the selected events can be deleted without leaving orphan files. -->
</p>
</div>
</div><!-- deleteForm-->
</div><!-- full-col-->
</div><!-- modal-body -->
</div><!-- modal-content [deleteForm] -->
<footer ng-if="currentForm === 'deleteForm'">
<a ng-click="navigateTo('retractForm', currentForm, [])"
data-modal-tab="next" class="submit"
ng-class="{active: deleteForm.$valid, disabled: deleteForm.$invalid}">
{{ 'WIZARD.NEXT_STEP' | translate }}
</a>
<a ng-click="navigateTo('deleteForm', currentForm, [])"
data-modal-tab="previous" translate="WIZARD.BACK" class="cancel">
</a>
</footer>
<div class="modal-content" ng-class="{active: currentForm === 'retractForm'}">
<div class="modal-body">
<div class="full-col">
<div class="list-obj" ng-form="retractForm">
<div class="modal-alert danger obj" ng-if="events.published.has">
<p translate="BULK_ACTIONS.DELETE.EVENTS.PUBLISHED.WARNING">
<!-- Some events can not be deleted as they have already been published and deleting
them would leave the published files with no way to delete them. Instead run a start
task to retract the events first and then delete them. -->
</p>
</div>
<div class="obj tbl-details" ng-if="events.published.has">
<header translate="BULK_ACTIONS.DELETE.EVENTS.RETRACT_EVENTS">
<!-- Retract Events -->
</header>
<table class="main-tbl">
<thead>
<tr>
<th class="small"><input type="checkbox" ng-model="published.allSelected" ng-change="published.allSelectedChanged()" class="select-all-cbox"/></th>
<th translate="EVENTS.EVENTS.TABLE.TITLE"><!-- Title --></th>
<th translate="EVENTS.EVENTS.TABLE.CREATORS"><!-- Presenter --></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in published.rows">
<td><input type="checkbox" ng-model="row.selected" ng-change="published.rowSelectionChanged($index)" class="child-cbox"/></td>
<td>{{ row.title }}</td>
<td>{{ row.presenters }}</td>
</tr>
</tbody>
</table>
</div>
<div class="obj tbl-details" ng-if="events.published.has">
<header translate="BULK_ACTIONS.DELETE.EVENTS.SELECT_RETRACT_TASK">
<!-- Select a Retract Task -->
</header>
<div class="obj-container">
<select chosen pre-select-from="processing.workflows"
data-width="'100%'"
ng-change="processing.changeWorkflow()"
data-disable-search-threshold="0"
not-empty-selection
ng-model="processing.ud.workflow"
ng-model-options="{ allowInvalid: true }"
ng-options="w.title for w in processing.workflows"
data-placeholder="{{ 'EVENTS.EVENTS.DETAILS.GENERAL.SELECT_WORKFLOW' | translate }}"
no-results-text="'{{ 'EVENTS.EVENTS.DETAILS.GENERAL.SELECT_WORKFLOW_EMPTY' | translate }}'"
>
<option value=""></option>
</select>
<div id="new-event-workflow-configuration"
class="checkbox-container"
ng-click="processing.save()"
ng-bind-html="processing.workflowConfiguration"
class="obj-container">
</div>
</div>
</div>
<div class="full-col" ng-if="!events.published.has">
<div class="obj">
<p translate="BULK_ACTIONS.DELETE.EVENTS.PUBLISHED.NONE">
<!-- None of the selected events need to be retracted before they can be deleted. -->
</p>
</div>
</div>
</div> <!-- ng-form="retractForm" -->
</div> <!-- full-col -->
</div> <!-- modal-body -->
</div><!-- retractForm -->
<footer ng-if="currentForm === 'retractForm'">
<a ng-click="retractForm.$valid = valid(); navigateTo('summaryForm', currentForm, [retractForm])"
data-modal-tab="next" class="submit"
ng-class="{active: valid(), inactive: !valid()}">
{{ 'WIZARD.NEXT_STEP' | translate }}
</a>
<a ng-click="navigateTo('deleteForm', currentForm, [])"
data-modal-tab="previous" translate="WIZARD.BACK" class="cancel">
</a>
</footer>
<div class="modal-content" ng-class="{active: currentForm === 'summaryForm'}">
<div class="modal-body">
<div class="full-col">
<div class="obj list-obj" ng-form="summaryForm">
<header translate="EVENTS.RETRACT.SUMMARY">Summary</header>
<div class="obj-container">
<ul>
<li>
<span translate="BULK_ACTIONS.DELETE.EVENTS.SUMMARY.EVENTS_DELETED">
<!-- Events to be Deleted -->
</span>
<p ng-repeat="row in getUnpublishedEvents()">{{ row.title }}</p>
</li>
<li>
<span translate="BULK_ACTIONS.DELETE.EVENTS.SUMMARY.EVENTS_RETRACTED">
<!-- Events to be Retracted -->
</span>
<p ng-repeat="row in getPublishedEvents()">{{ row.title }}</p>
</li>
<li>
<span translate="BULK_ACTIONS.DELETE.EVENTS.SUMMARY.RETRACT_WORKFLOW">
<!-- Workflow to Retract Events -->
</span>
<p>{{processing.ud.workflow.id}}</p>
</li>
<li>
<span translate="BULK_ACTIONS.SCHEDULE_TASK.SUMMARY.CONFIGURATION">
<!-- Configuration -->
</span>
<p ng-repeat="(key, value) in processing.ud.workflow.selection.configuration">{{key}}: {{value}}</p>
</li>
</ul>
</div><!-- obj-container -->
</div>
</div>
</div>
</div><!-- modal-content [summary] -->
<footer ng-if="currentForm === 'summaryForm'">
<a ng-click="submit()"
data-modal-tab="next" class="submit"
ng-class="{active: summaryForm.$valid, inactive: summaryForm.$invalid, disabled: submitButton}">
{{ 'WIZARD.RETRACT' | translate }}
</a>
<a ng-click="navigateTo('retractForm', currentForm, [])"
data-modal-tab="previous" translate="WIZARD.BACK" class="cancel">
</a>
</footer>
<div class="btm-spacer"></div>
</section>