Listen button only visible if user has read permissions
Audioformat fix Table edit functions only available if user has edit rights
This commit is contained in:
parent
4038cb5b85
commit
4516cc0d65
|
@ -111,10 +111,10 @@ except ValueError:
|
|||
del env_CALIBRE_PORT
|
||||
|
||||
|
||||
EXTENSIONS_AUDIO = {'mp3', 'mp4', 'ogg', 'opus', 'wav', 'flac'}
|
||||
EXTENSIONS_AUDIO = {'mp3', 'mp4', 'ogg', 'opus', 'wav', 'flac', 'm4a', 'm4b'}
|
||||
EXTENSIONS_CONVERT = ['pdf', 'epub', 'mobi', 'azw3', 'docx', 'rtf', 'fb2', 'lit', 'lrf', 'txt', 'htmlz', 'rtf', 'odt']
|
||||
EXTENSIONS_UPLOAD = {'txt', 'pdf', 'epub', 'kepub', 'mobi', 'azw', 'azw3', 'cbr', 'cbz', 'cbt', 'djvu', 'prc', 'doc', 'docx',
|
||||
'fb2', 'html', 'rtf', 'lit', 'odt', 'mp3', 'mp4', 'ogg', 'opus', 'wav', 'flac'}
|
||||
'fb2', 'html', 'rtf', 'lit', 'odt', 'mp3', 'mp4', 'ogg', 'opus', 'wav', 'flac', 'm4a', 'm4b'}
|
||||
|
||||
|
||||
def has_flag(value, bit_flag):
|
||||
|
|
|
@ -24,18 +24,20 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<!--th data-field="title" id="title" data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"></th-->
|
||||
{% if g.user.role_edit() %}
|
||||
<th data-checkbox="true" data-sortable="true"></th>
|
||||
{% endif %}
|
||||
<th data-field="id" id="id" data-visible="false" data-switchable="false"></th>
|
||||
<th data-field="title" id="title" data-sortable="true">Title</th>
|
||||
<th data-field="sort" id="sort" data-sortable="true">Sort</th>
|
||||
<th data-field="author_sort" id="author_sort" data-sortable="true">Authors Sort</th>
|
||||
<th data-field="authors" id="authors" data-sortable="true">Authors</th>
|
||||
<th data-field="tags" id="tags" data-sortable="true">Tags</th>
|
||||
<th data-field="series" id="series" data-sortable="true">Series</th>
|
||||
<th data-field="series_index" id="series_index" data-sortable="true">Series Index</th>
|
||||
<th data-field="languages" id="languages" data-sortable="true">Language</th>
|
||||
<th data-field="title" id="title" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Title</th>
|
||||
<th data-field="sort" id="sort" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Sort</th>
|
||||
<th data-field="author_sort" id="author_sort" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Authors Sort</th>
|
||||
<th data-field="authors" id="authors" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Authors</th>
|
||||
<th data-field="tags" id="tags" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Tags</th>
|
||||
<th data-field="series" id="series" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Series</th>
|
||||
<th data-field="series_index" id="series_index" data-sortable="true" >Series Index</th>
|
||||
<th data-field="languages" id="languages" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Language</th>
|
||||
<th data-field="pubdate" id="pubdate" data-sortable="true">Publishing Date</th>
|
||||
<th data-field="publishers" id="publishers" data-sortable="true">Publishers</th>
|
||||
<th data-field="publishers" id="publishers" data-sortable="true" {% if g.user.role_edit() %}data-editable-type="text" data-editable-url="{{ url_for('web.edit_list_book')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>Publishers</th>
|
||||
{% if g.user.role_edit() %}
|
||||
<th data-align="right" data-formatter="EbookActions" data-switchable="false"></th>
|
||||
{% endif %}
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if audioentries|length > 0 %}
|
||||
{% if audioentries|length > 0 and g.user.role_viewer() %}
|
||||
<div class="btn-group" role="group">
|
||||
<button id="listen-in-browser" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-music"></span> {{_('Listen in Browser')}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user