Read and archive bit visible in book table

This commit is contained in:
Ozzie Isaacs
2021-10-24 21:32:19 +02:00
parent 516e76de4f
commit f6a2b8a9ef
7 changed files with 124 additions and 44 deletions
+6 -5
View File
@@ -14,13 +14,13 @@
>{{ show_text }}</th>
{%- endmacro %}
{% macro book_checkbox_row(parameter, array_field, show_text, element, value, sort) -%}
<!--th data-name="{{parameter}}" data-field="{{parameter}}"
{% macro book_checkbox_row(parameter, show_text, sort) -%}
<th data-name="{{parameter}}" data-field="{{parameter}}"
{% if sort %}data-sortable="true" {% endif %}
data-visible="{{visiblility.get(parameter)}}"
data-formatter="checkboxFormatter">
data-formatter="bookCheckboxFormatter">
{{show_text}}
</th-->
</th>
{%- endmacro %}
@@ -71,7 +71,8 @@
<!--th data-field="pubdate" data-type="date" data-visible="{{visiblility.get('pubdate')}}" data-viewformat="dd.mm.yyyy" id="pubdate" data-sortable="true">{{_('Publishing Date')}}</th-->
{{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false, true) }}
<th data-field="comments" id="comments" data-escape="true" data-editable-mode="popup" data-visible="{{visiblility.get('comments')}}" data-sortable="false" {% if g.user.role_edit() %} data-editable-type="wysihtml5" data-editable-url="{{ url_for('editbook.edit_list_book', param='comments')}}" data-edit="true" data-editable-title="{{_('Enter comments')}}"{% endif %}>{{_('Comments')}}</th>
<!-- data-editable-formatter="comment_display" -->
{{ book_checkbox_row('is_archived', _('Enter Archiv Status'), false)}}
{{ book_checkbox_row('read_status', _('Enter Read Status'), false)}}
{% for c in cc %}
{% if c.datatype == "int" %}
<th data-field="custom_column_{{ c.id|string }}" id="custom_column_{{ c.id|string }}" data-visible="{{visiblility.get('custom_column_'+ c.id|string)}}" data-sortable="false" {% if g.user.role_edit() %} data-editable-type="number" data-editable-placeholder="1" data-editable-step="1" data-editable-url="{{ url_for('editbook.edit_list_book', param='custom_column_'+ c.id|string)}}" data-edit="true" data-editable-title="{{_('Enter ') + c.name}}"{% endif %}>{{c.name}}</th>
+1 -1
View File
@@ -228,7 +228,7 @@
<form id="archived_form" action="{{ url_for('web.toggle_archived', book_id=entry.id)}}" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<label class="block-label">
<input id="archived_cb" data-checked="{{_('Restore from archive')}}" data-unchecked="{{_('Add to archive')}}" type="checkbox" {% if entry.is_archived.is_archived %}checked{% endif %} >
<input id="archived_cb" data-checked="{{_('Restore from archive')}}" data-unchecked="{{_('Add to archive')}}" type="checkbox" {% if entry.is_archived %}checked{% endif %} >
<span>{{_('Archived')}}</span>
</label>
</form>