Fixes for books-table and user-table

This commit is contained in:
Ozzie Isaacs
2026-08-15 15:54:20 +02:00
parent efe0db7b3d
commit 17c2af91df
3 changed files with 119 additions and 59 deletions
+60 -2
View File
@@ -1964,7 +1964,19 @@ body.book_table .bootstrap-table .fixed-table-pagination .pagination > li > span
body.book_table .bootstrap-table .fixed-table-pagination .pagination > li > a:focus,
body.book_table .bootstrap-table .fixed-table-pagination .pagination > li > a:hover,
body.book_table .bootstrap-table .fixed-table-pagination .pagination > li > span:focus,
body.book_table .bootstrap-table .fixed-table-pagination .pagination > li > span:hover {
body.book_table .bootstrap-table .fixed-table-pagination .pagination > li > span:hover,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > li > a,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > li > span,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > li > a:focus,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > li > a:hover,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > li > span:focus,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > li > span:hover,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > li > a,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > li > span,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > li > a:focus,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > li > a:hover,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > li > span:focus,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > li > span:hover {
background-color: hsla(0, 0%, 100%, .25);
border-color: transparent;
color: #fff;
@@ -1975,7 +1987,19 @@ body.book_table .bootstrap-table .fixed-table-pagination .pagination > .active >
body.book_table .bootstrap-table .fixed-table-pagination .pagination > .active > a:focus,
body.book_table .bootstrap-table .fixed-table-pagination .pagination > .active > span:focus,
body.book_table .bootstrap-table .fixed-table-pagination .pagination > .active > a:hover,
body.book_table .bootstrap-table .fixed-table-pagination .pagination > .active > span:hover {
body.book_table .bootstrap-table .fixed-table-pagination .pagination > .active > span:hover,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > .active > a,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > .active > span,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > .active > a:focus,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > .active > span:focus,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > .active > a:hover,
body.usertable .bootstrap-table .fixed-table-pagination .pagination > .active > span:hover,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > .active > a,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > .active > span,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > .active > a:focus,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > .active > span:focus,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > .active > a:hover,
body.user_table .bootstrap-table .fixed-table-pagination .pagination > .active > span:hover {
background-color: var(--color-secondary);
border-color: transparent;
color: #fff;
@@ -4456,6 +4480,31 @@ body.admin > div.container-fluid > div > div.col-sm-10 > div.container-fluid > d
line-height: 1
}
body.usertable.admin > div.container-fluid > div > div.col-sm-10 > div.discover > h2:first-of-type,
body.user_table.admin > div.container-fluid > div > div.col-sm-10 > div.discover > h2:first-of-type {
position: fixed;
top: 60px;
left: 240px;
width: calc(100vw - 240px);
height: 60px;
margin: 0;
padding-left: 25px;
background: rgba(0, 0, 0, .15);
color: hsla(0, 0%, 100%, .7);
font-family: "Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
font-weight: 400;
line-height: 60px;
white-space: nowrap;
text-decoration: none;
z-index: 1;
}
body.usertable.admin > div.container-fluid > div > div.col-sm-10 > div.discover > h2:first-of-type::before,
body.user_table.admin > div.container-fluid > div > div.col-sm-10 > div.discover > h2:first-of-type::before {
content: none;
}
.table-striped > tbody > tr:nth-of-type(2n+1) {
background-color: transparent
}
@@ -5860,6 +5909,15 @@ body.edituser.admin > div.container-fluid > div.row-fluid > div.col-sm-10 > div.
margin-top: -65px
}
body.usertable > div.container-fluid > div > div.col-sm-10 > div.discover > div.col-sm-12:before,
body.user_table > div.container-fluid > div > div.col-sm-10 > div.discover > div.col-sm-12:before {
content: none;
display: none;
background: transparent;
height: 0;
margin: 0;
}
body.edituser.admin > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > div.col-sm-12 > div.col-sm-2, body.me > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > form > div.col-sm-12 > div.col-sm-12 > div.col-sm-2, body > div.container-fluid > div.row-fluid > div.col-sm-10 > div.discover > div.col-sm-12 > div.col-sm-2 {
width: 135px !important;
max-width: 135px !important;
@@ -50,8 +50,8 @@
{% endblock %}
{% block body %}
<div class="discover">
<h2 class="{{page}}">{{_(title)}}</h2>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<h2 class="{{page}}">{{_(title)}}</h2>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="col-xs-12 col-sm-6">
<div class="row form-group">
<div class="btn btn-default disabled" id="merge_books" aria-disabled="true">
+57 -55
View File
@@ -117,62 +117,64 @@
<link href="{{ url_for('static', filename='css/libs/bootstrap-select.min.css') }}" rel="stylesheet" >
{% endblock %}
{% block body %}
<h2 class="{{page}}">{{_(title)}}</h2>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="col-xs-12 col-sm-12">
<div class="row">
<div class="btn btn-default disabled mass_selection" id="user_delete_selection" aria-disabled="true">{{_('Clear selections')}}</div>
</div>
</div>
<table id="user-table" class="table table-no-bordered table-striped"
data-url="{{url_for('admin.list_users')}}" data-locale="{{ current_user.locale }}">
<thead>
<tr>
<th data-name="edit" data-buttontext="{{_('Edit User')}}" data-visible="{{visiblility.get('edit')}}" data-formatter="singleUserFormatter">{{_('Edit')}}</th>
<th data-name="state" data-field="state" data-checkbox="true" data-visible="{{visiblility.get('state')}}" data-sortable="true"></th>
<th data-name="id" data-field="id" id="id" data-visible="false" data-switchable="false"></th>
{{ user_table_row('name', _('Enter Username'), _('Username'), true) }}
{{ user_table_row('email', _('Enter Email'), _('Email'), true) }}
{{ user_table_row('kindle_mail', _('Enter eReader Email'), _('eReader Email'), false) }}
{{ user_select_translations('locale', url_for('admin.table_get_locale'), _('Locale'), true) }}
{{ user_select_languages('default_language', url_for('admin.table_get_default_lang'), _('Visible Book Languages'), true) }}
{{ user_table_row('allowed_tags', _("Edit Allowed Tags"), _("Allowed Tags"), false, tags) }}
{{ user_table_row('denied_tags', _("Edit Denied Tags"), _("Denied Tags"), false, tags) }}
{{ user_table_row('allowed_column_value', _("Edit Allowed Column Values"), _("Allowed Column Values"), false, custom_values) }}
{{ user_table_row('denied_column_value', _("Edit Denied Column Values"), _("Denied Column Values"), false, custom_values) }}
{{ user_checkbox_row("role", "admin_role", _('Admin'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "passwd_role", _('Change Password'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "upload_role",_('Upload'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "download_role", _('Download'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "viewer_role", _('View'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "edit_role", _('Edit'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "delete_role", _('Delete'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "edit_shelf_role", _('Edit Public Shelves'), visiblility, all_roles)}}
{% if kobo_support %}
{{ user_single_checkbox_row("kobo_only_shelves_sync", _('Sync selected Shelves with Kobo'))}}
{% endif %}
{{ user_checkbox_row("sidebar_view", "detail_random", _('Show Random Books in Detail View'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_language", _('Show Language Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_read_and_unread", _('Show Read/Unread Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_series", _('Show Series Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_category", _('Show Category Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_random", _('Show Random Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_author", _('Show Author Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_best_rated", _('Show Top Rated Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_read_and_unread", _('Show Random Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_publisher", _('Show Publisher Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_rating", _('Show Ratings Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_format", _('Show File Formats Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_archived", _('Show Archived Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_download", _('Show Downloaded Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_list", _('Show Books List'), visiblility, sidebar_settings)}}
<th data-align="right" data-formatter="UserActions" data-switchable="false"><div><div class="btn btn-default button_head disabled" aria-disabled="true">{{_('Delete User')}}</div></div><br>{{_('Delete User')}}</th>
</tr>
</thead>
</table>
<div class="errorlink">
<div class="btn btn-default" data-back="{{ url_for('admin.admin') }}" id="back">{{_('Back')}}</div>
<div class="discover">
<h2 class="{{page}}">{{_(title)}}</h2>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="col-xs-12 col-sm-12">
<div class="row">
<div class="btn btn-default disabled mass_selection" id="user_delete_selection" aria-disabled="true">{{_('Clear selections')}}</div>
</div>
</div>
<table id="user-table" class="table table-no-bordered table-striped"
data-url="{{url_for('admin.list_users')}}" data-locale="{{ current_user.locale }}">
<thead>
<tr>
<th data-name="edit" data-buttontext="{{_('Edit User')}}" data-visible="{{visiblility.get('edit')}}" data-formatter="singleUserFormatter">{{_('Edit')}}</th>
<th data-name="state" data-field="state" data-checkbox="true" data-visible="{{visiblility.get('state')}}" data-sortable="true"></th>
<th data-name="id" data-field="id" id="id" data-visible="false" data-switchable="false"></th>
{{ user_table_row('name', _('Enter Username'), _('Username'), true) }}
{{ user_table_row('email', _('Enter Email'), _('Email'), true) }}
{{ user_table_row('kindle_mail', _('Enter eReader Email'), _('eReader Email'), false) }}
{{ user_select_translations('locale', url_for('admin.table_get_locale'), _('Locale'), true) }}
{{ user_select_languages('default_language', url_for('admin.table_get_default_lang'), _('Visible Book Languages'), true) }}
{{ user_table_row('allowed_tags', _("Edit Allowed Tags"), _("Allowed Tags"), false, tags) }}
{{ user_table_row('denied_tags', _("Edit Denied Tags"), _("Denied Tags"), false, tags) }}
{{ user_table_row('allowed_column_value', _("Edit Allowed Column Values"), _("Allowed Column Values"), false, custom_values) }}
{{ user_table_row('denied_column_value', _("Edit Denied Column Values"), _("Denied Column Values"), false, custom_values) }}
{{ user_checkbox_row("role", "admin_role", _('Admin'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "passwd_role", _('Change Password'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "upload_role",_('Upload'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "download_role", _('Download'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "viewer_role", _('View'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "edit_role", _('Edit'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "delete_role", _('Delete'), visiblility, all_roles)}}
{{ user_checkbox_row("role", "edit_shelf_role", _('Edit Public Shelves'), visiblility, all_roles)}}
{% if kobo_support %}
{{ user_single_checkbox_row("kobo_only_shelves_sync", _('Sync selected Shelves with Kobo'))}}
{% endif %}
{{ user_checkbox_row("sidebar_view", "detail_random", _('Show Random Books in Detail View'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_language", _('Show Language Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_read_and_unread", _('Show Read/Unread Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_series", _('Show Series Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_category", _('Show Category Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_random", _('Show Random Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_author", _('Show Author Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_best_rated", _('Show Top Rated Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_read_and_unread", _('Show Random Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_publisher", _('Show Publisher Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_rating", _('Show Ratings Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_format", _('Show File Formats Section'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_archived", _('Show Archived Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_download", _('Show Downloaded Books'), visiblility, sidebar_settings)}}
{{ user_checkbox_row("sidebar_view", "sidebar_list", _('Show Books List'), visiblility, sidebar_settings)}}
<th data-align="right" data-formatter="UserActions" data-switchable="false"><div><div class="btn btn-default button_head disabled" aria-disabled="true">{{_('Delete User')}}</div></div><br>{{_('Delete User')}}</th>
</tr>
</thead>
</table>
<div class="errorlink">
<div class="btn btn-default" data-back="{{ url_for('admin.admin') }}" id="back">{{_('Back')}}</div>
</div>
</div>
{% endblock %}
{% block modal %}
{{ delete_confirm_modal() }}