2023-04-25 11:29:40 +00:00
|
|
|
<!-- prettier-ignore -->
|
|
|
|
{% extends 'base.html' %}
|
2023-05-03 07:04:31 +00:00
|
|
|
|
2023-06-02 08:22:24 +00:00
|
|
|
{% block title %}{{section.label}}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2023-05-15 09:14:49 +00:00
|
|
|
{% if current_user.is_authenticated %}
|
2023-06-02 08:22:24 +00:00
|
|
|
{% include 'book/modals/approve_interpretation_modal.html' %}
|
|
|
|
{% include 'book/modals/edit_interpretation_modal.html' %}
|
|
|
|
{% include 'book/modals/delete_interpretation_modal.html' %}
|
2023-05-19 11:36:55 +00:00
|
|
|
{% block right_sidebar %}
|
|
|
|
{% endblock %}
|
2023-05-15 09:14:49 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2023-05-03 07:04:31 +00:00
|
|
|
|
2023-05-08 08:24:26 +00:00
|
|
|
{% include 'book/breadcrumbs_navigation.html'%}
|
2023-05-25 13:51:42 +00:00
|
|
|
<div class="overflow-x-auto shadow-md sm:rounded-lg">
|
2023-04-25 11:29:40 +00:00
|
|
|
<!-- prettier-ignore -->
|
2023-06-21 09:29:17 +00:00
|
|
|
<div class="fixed z-30 w-full top-28 md:top-44 pt-6 bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700">
|
2023-05-08 08:24:26 +00:00
|
|
|
<!-- prettier-ignore -->
|
2023-05-15 09:14:49 +00:00
|
|
|
<h1 class="text-l font-extrabold dark:text-white ml-4">{{section.label}}</h1>
|
2023-05-08 08:24:26 +00:00
|
|
|
<!-- prettier-ignore -->
|
2023-05-08 14:33:15 +00:00
|
|
|
<div class="mb-1">
|
2023-06-13 12:39:13 +00:00
|
|
|
<ul class="flex flex-wrap -mb-px text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
|
|
|
|
<li class="mr-2" role="presentation">
|
|
|
|
<button class="flex items-center space-x-2 p-4 rounded-t-lg" id="interpretation-tab" data-tabs-target="#interpretation" type="button" role="tab" aria-controls="interpretation" aria-selected="false">
|
2023-06-19 14:33:19 +00:00
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" /> </svg>
|
2023-06-13 12:39:13 +00:00
|
|
|
<span>Interpretations</span>
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2023-05-08 08:24:26 +00:00
|
|
|
</div>
|
2023-06-21 09:29:17 +00:00
|
|
|
<div id="myTabContent" class="mt-40">
|
|
|
|
<!-- prettier-ignore -->
|
|
|
|
<div class="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800" id="interpretation" role="tabpanel" aria-labelledby="interpretation-tab">
|
2023-06-13 12:39:13 +00:00
|
|
|
{% if not current_user.is_authenticated %}
|
|
|
|
<div class="bg-white dark:bg-gray-900 max-w-full p-6 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
|
|
|
|
<div class="grid gap-6">
|
|
|
|
<div class="col-span-6 sm:col-span-3 truncate">
|
|
|
|
<h3 class="text-xl font-semibold text-gray-900 dark:text-white ">Connect you wallet to start contributing!</h3>
|
2023-05-24 11:44:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-25 11:29:40 +00:00
|
|
|
<!-- prettier-ignore -->
|
2023-06-13 12:39:13 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if current_user.is_authenticated %}
|
2023-05-05 16:51:55 +00:00
|
|
|
<!-- prettier-ignore -->
|
2023-06-13 12:39:13 +00:00
|
|
|
<form
|
|
|
|
action="{{ url_for('book.interpretation_create', book_id=book.id, section_id=section.id) }}"
|
|
|
|
method="post" class="prevent-submit-on-enter bg-white rounded-lg shadow dark:bg-gray-700"
|
|
|
|
>
|
|
|
|
{{ form_hidden_tag() }}
|
|
|
|
<input type="hidden" name="section_id" id="section_id" value="{{section.id}}" />
|
|
|
|
<input type="hidden" name="label" id="label" value="{{section.label}}" />
|
|
|
|
|
|
|
|
<input type="hidden" name="text" id="interpretation-text-input" />
|
|
|
|
<!-- Form body -->
|
|
|
|
<div class="p-6 space-y-6">
|
|
|
|
<div class="w-full max-w-6xl mx-auto rounded-xl bg-gray-50 dark:bg-gray-600 shadow-lg text-white-900">
|
|
|
|
<div class="overflow-hidden rounded-md bg-gray-50 [&>*]:dark:bg-gray-600 text-black [&>*]:!border-none [&>*]:!stroke-black dark:text-white dark:[&>*]:!stroke-white">
|
|
|
|
<div id="interpretation-text" class="quill-editor dark:text-white h-64">
|
|
|
|
</div>
|
2023-06-01 04:57:31 +00:00
|
|
|
</div>
|
2023-06-13 12:39:13 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-10 12:07:07 +00:00
|
|
|
|
2023-06-13 12:39:13 +00:00
|
|
|
<!-- Modal footer -->
|
|
|
|
<div class="flex items-center p-6 space-x-2 border-t border-gray-200 rounded-b dark:border-gray-600">
|
|
|
|
<button name="submit" type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 ml-auto">Submit</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<!-- prettier-ignore -->
|
|
|
|
{% endif %}
|
2023-05-11 15:02:14 +00:00
|
|
|
|
2023-06-13 12:39:13 +00:00
|
|
|
<!-- prettier-ignore -->
|
|
|
|
<dl class="w-md md:w-full text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700">
|
|
|
|
{% set access_to_delete_interpretation = has_permission(section, Access.D, EntityType.INTERPRETATION) %}
|
|
|
|
{% set access_to_approve_interpretation = has_permission(section, Access.A, EntityType.INTERPRETATION) %}
|
2023-05-11 15:02:14 +00:00
|
|
|
|
2023-06-13 12:39:13 +00:00
|
|
|
<!-- prettier-ignore -->
|
|
|
|
{% for interpretation in section.active_interpretations %}
|
|
|
|
<!-- prettier-ignore -->
|
2023-06-21 09:51:14 +00:00
|
|
|
{% with show_control_btns=True %}
|
|
|
|
{% include 'book/components/interpretation_list_item.html' %}
|
|
|
|
{% endwith %}
|
2023-06-13 12:39:13 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
<span class="approved-interpretation-id hidden">
|
|
|
|
{% if section.approved_interpretation.approved %}
|
|
|
|
{{ section.approved_interpretation.id }}
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
</dl>
|
|
|
|
</div>
|
2023-06-21 09:29:17 +00:00
|
|
|
</div>
|
2023-06-13 12:39:13 +00:00
|
|
|
|
2023-06-06 11:03:20 +00:00
|
|
|
<div class="flex p-10 justify-between">
|
|
|
|
<!-- prettier-ignore -->
|
2023-06-06 15:04:10 +00:00
|
|
|
{% set previous_section = section.previous_section %}
|
|
|
|
{% if previous_section %}
|
2023-06-21 09:29:17 +00:00
|
|
|
<a
|
|
|
|
href="{{url_for('book.interpretation_view', book_id=book.id, section_id=previous_section.id)}}"
|
|
|
|
type="button"
|
|
|
|
class="w-2/5 md:w-1/5 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
|
|
|
<!-- prettier-ignore -->
|
|
|
|
<svg aria-hidden="true" class="w-5 h-5 mr-2 -ml-1 rotate-180" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z" clip-rule="evenodd"></path> </svg>
|
|
|
|
<div class="truncate flex flex-col ml-3 w-full">
|
|
|
|
<p class="hidden sm:inline p-3 text-right truncate">{{ book.label }}</p>
|
|
|
|
<p class="hidden sm:inline p-3 text-right truncate">
|
|
|
|
{{ previous_section.label }}
|
|
|
|
</p>
|
2023-06-13 12:39:13 +00:00
|
|
|
</div>
|
2023-06-21 09:29:17 +00:00
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
<div></div>
|
2023-06-06 15:04:10 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2023-06-06 11:03:20 +00:00
|
|
|
<!-- prettier-ignore -->
|
2023-06-06 14:17:43 +00:00
|
|
|
{% set next_section = section.next_section %}
|
|
|
|
{% if next_section %}
|
2023-06-21 09:29:17 +00:00
|
|
|
<a
|
|
|
|
href="{{url_for('book.interpretation_view', book_id=book.id, section_id=next_section.id)}}"
|
|
|
|
type="button"
|
|
|
|
class="w-2/5 md:w-1/5 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
|
|
|
<div class="truncate flex flex-col w-full">
|
|
|
|
<p class="hidden sm:inline p-3 text-left truncate">{{ book.label }}</p>
|
|
|
|
<p class="hidden sm:inline p-3 text-left truncate">
|
|
|
|
{{ next_section.label }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<!-- prettier-ignore -->
|
|
|
|
<svg aria-hidden="true" class="w-5 h-5 ml-2 -mr-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z" clip-rule="evenodd"></path> </svg>
|
|
|
|
</a>
|
2023-06-06 15:04:10 +00:00
|
|
|
{% else %}
|
2023-06-21 09:29:17 +00:00
|
|
|
<div></div>
|
2023-06-06 14:17:43 +00:00
|
|
|
{% endif %}
|
2023-06-06 11:03:20 +00:00
|
|
|
</div>
|
2023-04-25 11:29:40 +00:00
|
|
|
</div>
|
2023-05-04 06:56:09 +00:00
|
|
|
<!-- prettier-ignore -->
|
|
|
|
{% endblock %}
|