|
145 | 145 | </div> |
146 | 146 | {% endif %} |
147 | 147 | </section> |
148 | | - |
149 | | - |
150 | | - <div class="ui container"> |
151 | | - <div class="ui relaxed grid mt-5"> |
152 | | - <div class="two column row top-padded"> |
153 | | - |
154 | | - {# Main content #} |
155 | | - <article |
156 | | - class="sixteen wide tablet eleven wide computer column main-record-content"> |
157 | | - {% if record_ui["access"]["record"] == 'restricted' %} |
158 | | - <section id="record-access-status" |
159 | | - class="ui {{ record_ui["ui"]["access_status"]["message_class"] }} message rel-mt-1" |
160 | | - aria-label="{{ _('Record access information') }}" |
161 | | - > |
162 | | - <i class="{{ record_ui["ui"]["access_status"]["icon"] }} icon" aria-hidden="true"></i> |
163 | | - <strong>{{ record_ui["ui"]["access_status"]["title_l10n"] }}</strong> |
164 | | - {{ record_ui["ui"]["access_status"]["description_l10n"] }} |
165 | | - |
166 | | - {% if record_ui["access"]["embargo"]["reason"] %} |
167 | | - <p>{{ _("Reason") }}: {{ record_ui["access"]["embargo"]["reason"] }}</p> |
168 | | - {% endif %} |
169 | | - </section> |
170 | | - {% endif %} |
171 | | - |
172 | | - {%- block record_body -%} |
173 | | - |
174 | | - {%- block record_header -%} |
175 | | - |
176 | | - {%- block record_header_button -%} |
177 | | - |
178 | | - {% if is_preview and not is_preview_submission_request and can_curate_record and is_draft %} |
179 | | - <nav class="back-navigation rel-pb-2 pl-0" |
180 | | - aria-label="{{ _('Back-navigation') }}"> |
181 | | - {%- set back_page = url_for('invenio_app_rdm_records.deposit_edit', pid_value=record_ui.id) -%} |
182 | | - {%- set back_btn_label = _('Back to edit') -%} |
183 | | - <a class="ui button labeled icon small compact" |
184 | | - href="{{ back_page }}"> |
185 | | - <i class="ui icon angle left"></i> {{ back_btn_label }}</a> |
186 | | - </nav> |
187 | | - {% endif %} |
188 | | - |
189 | | - {% endblock record_header_button %} |
190 | | - |
191 | | - {% if show_record_management_menu %} |
192 | | - <section id="mobile-record-management" |
193 | | - class="ui grid tablet only mobile only"> |
194 | | - <div class="sixteen wide column right aligned"> |
195 | | - <button id="manage-record-btn" |
196 | | - class="ui small basic icon button m-0" |
197 | | - aria-haspopup="dialog" |
198 | | - aria-expanded="false" |
199 | | - > |
200 | | - <i class="cog icon"></i> {{ _('Manage record') }} |
201 | | - </button> |
202 | | - </div> |
203 | | - <div id="recordManagementMobile" |
204 | | - role="dialog" |
205 | | - class="ui flowing popup transition hidden" |
206 | | - data-record='{{ record_ui | tojson }}' |
207 | | - data-permissions='{{ permissions | tojson }}' |
208 | | - data-is-draft="{{ is_draft | tojson }}" |
209 | | - {% if config.RDM_DETAIL_SIDE_BAR_MANAGE_ATTRIBUTES_EXTENSION_TEMPLATE %} |
210 | | - {% include config.RDM_DETAIL_SIDE_BAR_MANAGE_ATTRIBUTES_EXTENSION_TEMPLATE %} |
211 | | - {% endif %} |
212 | | - > |
213 | | - </div> |
214 | | - </section> |
215 | | - {% endif %} |
216 | | - |
217 | | - <section id="record-info" |
218 | | - aria-label="{{ _('Publication date and version number') }}"> |
219 | | - <div class="ui grid middle aligned"> |
220 | | - <div class="two column row"> |
221 | | - <div class="left floated left aligned column"> |
222 | | - <span class="ui" title="{{ _('Publication date') }}"> |
223 | | - {{ _('Published') }} {{ record_ui["ui"]["publication_date_l10n_long"] }} |
224 | | - </span> |
225 | | - <span |
226 | | - class="label text-muted"> | {{ _('Version {version_number}').format(version_number=record_ui["ui"]["version"]) }}</span> |
227 | | - </div> |
228 | | - <div class="right floated right aligned column"> |
229 | | - |
230 | | - {% if record_ui["ui"]["resource_type"] %} |
231 | | - <span role="note" |
232 | | - class="ui label horizontal small neutral mb-5" |
233 | | - aria-label="{{ _('Resource type') }}" |
234 | | - > |
235 | | - {{ record_ui["ui"]["resource_type"]["title_l10n"] }} |
236 | | - </span> |
237 | | - {% endif %} |
238 | | - |
239 | | - <span role="note" |
240 | | - class="ui label horizontal small access-status {{ record_ui["ui"]["access_status"]["id"] }} mb-5" |
241 | | - data-tooltip="{{ record_ui["ui"]["access_status"]["description_l10n"] }}" |
242 | | - data-inverted="" |
243 | | - aria-label="{{ _('Access status') }}" |
244 | | - > |
245 | | - {% if record_ui["ui"]["access_status"]["icon"] %} |
246 | | - <i class="icon {{ record_ui["ui"]["access_status"]["icon"] }}" |
247 | | - aria-hidden="true"></i> |
248 | | - {% endif %} |
249 | | - <span |
250 | | - aria-label="{{ record_ui["ui"]["access_status"]["description_l10n"] }}"> |
251 | | - {{ record_ui["ui"]["access_status"]["title_l10n"] }} |
252 | | - </span> |
253 | | - </span> |
254 | | - </div> |
255 | | - </div> |
256 | | - </div> |
257 | | - </section> |
258 | | - <div class="ui divider hidden"></div> |
259 | | - |
260 | | - {%- endblock record_header -%} |
261 | | - |
262 | | - {# Title #} |
263 | | - {%- block record_title -%} |
264 | | - <section id="record-title-section" |
265 | | - aria-label="{{ _('Record title and creators') }}"> |
266 | | - <h1 id="record-title" |
267 | | - class="wrap-overflowing-text">{{ metadata.title }}</h1> |
268 | | - |
269 | | - {% if record_ui["ui"]["creators"] or record_ui["ui"]["contributors"] %} |
270 | | - <section id="creatibutors" |
271 | | - aria-label="{{ _('Creators and contributors') }}"> |
272 | | - {%- include "invenio_app_rdm/records/details/creatibutors.html" %} |
273 | | - </section> |
274 | | - {% endif %} |
275 | | - </section> |
276 | | - {%- endblock record_title -%} |
277 | | - |
278 | | - {# Description #} |
279 | | - {%- block record_content -%} |
280 | | - {%- include "invenio_app_rdm/records/details/description.html" %} |
281 | | - {%- endblock record_content -%} |
282 | | - |
283 | | - {# Files #} |
284 | | - {%- block record_files -%} |
285 | | - {# record has files BUT passed files are empty. This happens when we display are request. #} |
286 | | - {%- if record_ui["files"]["enabled"] -%} |
287 | | - <section id="record-files" class="rel-mt-2 rel-mb-3" |
288 | | - aria-label="{{ _('Files') }}"> |
289 | | - {%- if permissions.can_read_files -%} |
290 | | - {# record has files AND user can see files #} |
291 | | - {%- set files = files | order_entries | selectattr("status", "==", "completed") | list %} |
292 | | - {%- if files|length > 0 -%} |
293 | | - <h2 id="files-heading">{{ _('Files') }}</h2> |
294 | | - {%- if files|has_previewable_files -%} |
295 | | - {%-set preview_file = files|select_preview_file(default_preview=record_ui["files"]["default_preview"]) %} |
296 | | - {{ preview_file_box(preview_file, record_ui["id"], is_preview, record, include_deleted) }} |
297 | | - {%- endif -%} |
298 | | - {{ file_list_box(files, record_ui["id"], is_preview, include_deleted, record, permissions) }} |
299 | | - {% endif %} |
300 | | - {% else %} |
301 | | - {# record has files BUT user does not have permission to see files #} |
302 | | - <div |
303 | | - class="ui accordion panel mb-10 {{ record_ui["ui"]["access_status"]["id"] }}" |
304 | | - href="#files-preview-accordion-panel"> |
305 | | - <h3 |
306 | | - class="active title panel-heading {{ record_ui["ui"]["access_status"]["id"] }} m-0"> |
307 | | - <div role="button" id="files-preview-accordion-trigger" |
308 | | - tabindex="0" class="trigger" |
309 | | - aria-controls="files-preview-accordion-panel"> |
310 | | - {{ _("Files") }} |
311 | | - <i class="angle right icon" aria-hidden="true"></i> |
312 | | - </div> |
313 | | - </h3> |
314 | | - <div role="region" id="files-preview-accordion-panel" |
315 | | - aria-labelledby="files-preview-accordion-trigger" |
316 | | - class="active content preview-container pt-0"> |
317 | | - <div |
318 | | - class="ui {{ record_ui["ui"]["access_status"]["message_class"] }} message file-box-message rel-pl-1 rel-pr-1"> |
319 | | - <i class="ui {{ record_ui["ui"]["access_status"]["icon"] }} icon" |
320 | | - aria-hidden="true"></i> |
321 | | - <h4 |
322 | | - class="inline">{{ record_ui["ui"]["access_status"]["title_l10n"] }}</h4> |
323 | | - <p>{{ record_ui["ui"]["access_status"]["description_l10n"] }}</p> |
324 | | - |
325 | | - {% if record_ui["access"]["embargo"]["reason"] %} |
326 | | - <p>{{ _("Reason") }}: {{ record_ui["access"]["embargo"]["reason"] }}</p> |
327 | | - {% endif %} |
328 | | - |
329 | | - {% block record_files_access_request %} |
330 | | - {%- if allow_user_requests or allow_guest_requests %} |
331 | | - <div class="ui divider"></div> |
332 | | - <h4>{{ _("Request access") }}</h4> |
333 | | - <p> |
334 | | - {{ _("If you would like to request access to these files, please fill out the form below.") }} |
335 | | - </p> |
336 | | - {%- if record_ui["parent"]["access"]["settings"] %} |
337 | | - {%- set accept_conditions_text = record_ui["parent"]["access"]["settings"]["accept_conditions_text"] %} |
338 | | - {%- endif %} |
339 | | - |
340 | | - {%- if accept_conditions_text %} |
341 | | - <p class="ui small header rel-mt-2 rel-mb-1"> |
342 | | - {{ _("You need to satisfy these conditions in order for this request to be accepted:") }} |
343 | | - </p> |
344 | | - <div class="rel-mt-2 rich-input-content"> |
345 | | - {{ accept_conditions_text | safe }} |
346 | | - </div> |
347 | | - {%- endif %} |
348 | | - |
349 | | - {%- include "invenio_app_rdm/records/details/access-form.html" %} |
350 | | - {%- endif %} |
351 | | - {% endblock record_files_access_request %} |
352 | | - </div> |
353 | | - </div> |
354 | | - </div> |
355 | | - {%- endif %} |
356 | | - </section> |
357 | | - {%- endif %} |
358 | | - {%- endblock record_files -%} |
359 | | - |
360 | | - {# Media files #} |
361 | | - {%- block record_media_files -%} |
362 | | - {# record has media files AND user can see files #} |
363 | | - {# can_media_read_files is false when record is fully restricted and users can't see the landing page at all #} |
364 | | - {%- if media_files and media_files.enabled and media_files.entries and permissions.can_media_read_files -%} |
365 | | - {%- set any_visible = media_files.entries | selectattr('access.hidden', 'equalto', false) | list | length > 0 %} |
366 | | - {%- if any_visible %} |
367 | | - <section id="record-media-files" aria-label="{{ _('System files') }}"> |
368 | | - {%- set media_files = media_files | order_entries | selectattr("status", "==", "completed") | list %} |
369 | | - {%- if media_files|length > 0 -%} |
370 | | - {{ media_file_list_box(media_files, record_ui["id"], is_preview, include_deleted, record, permissions) }} |
371 | | - {%- endif %} |
372 | | - </section> |
373 | | - {%- endif %} |
374 | | - {%- endif %} |
375 | | - {%- endblock record_media_files -%} |
376 | | - |
377 | | - {# Additional details #} |
378 | | - {%- block record_details -%} |
379 | | - <section id="additional-details" class="rel-mt-2" |
380 | | - aria-label="{{ _('Additional record details') }}"> |
381 | | - {%- include "invenio_app_rdm/records/details/details.html" %} |
382 | | - </section> |
383 | | - {%- endblock record_details -%} |
384 | | - |
385 | | - {# Record footer #} |
386 | | - {%- block record_footer -%} |
387 | | - {%- endblock record_footer -%} |
388 | | - |
389 | | - {%- endblock record_body %} |
390 | | - </article> |
391 | | - |
392 | | - {# Sidebar #} |
393 | | - <aside class="sixteen wide tablet five wide computer column sidebar" |
394 | | - aria-label="{{ _('Record details') }}"> |
395 | | - {% block record_sidebar %} |
396 | | - {%- include "invenio_app_rdm/records/details/side_bar.html" %} |
397 | | - {% endblock record_sidebar %} |
398 | | - </aside> |
399 | | - </div> |
400 | | - </div> |
401 | | - |
402 | | - <div class="ui container"> |
403 | | - <div class="ui relaxed grid"> |
404 | | - <div class="two column row"> |
405 | | - <div class="sixteen wide tablet eleven wide computer column"> |
406 | | - {# Jump up button #} |
407 | | - {%- block jump -%} |
408 | | - <div class="ui grid"> |
409 | | - <div class="centered row rel-mt-1"> |
410 | | - <button id="jump-btn" class="jump-to-top ui button labeled icon" |
411 | | - aria-label="{{ _('Jump to top of page') }}"> |
412 | | - <i class="arrow alternate circle up outline icon"></i> |
413 | | - {{ _("Jump up") }} |
414 | | - </button> |
415 | | - </div> |
416 | | - </div> |
417 | | - {%- endblock jump -%} |
418 | | - </div> |
419 | | - </div> |
420 | | - </div> |
421 | | - </div> |
422 | | - </div> |
| 148 | + |
| 149 | + {% include "invenio_app_rdm/records/record_content.html" %} |
423 | 150 |
|
424 | 151 | {%- endblock page_body %} |
425 | 152 |
|
|
0 commit comments