mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
parent
3f2d0ea7bb
commit
0e1711631c
@ -71,7 +71,6 @@
|
|||||||
<label for="tags">{{_('Tags')}}</label>
|
<label for="tags">{{_('Tags')}}</label>
|
||||||
<input type="text" class="form-control typeahead" name="tags" id="tags" value="{% for tag in book.tags %}{{tag.name.strip()}}{% if not loop.last %}, {% endif %}{% endfor %}">
|
<input type="text" class="form-control typeahead" name="tags" id="tags" value="{% for tag in book.tags %}{{tag.name.strip()}}{% if not loop.last %}, {% endif %}{% endfor %}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="series">{{_('Series')}}</label>
|
<label for="series">{{_('Series')}}</label>
|
||||||
<input type="text" class="form-control typeahead" name="series" id="series" value="{% if book.series %}{{book.series[0].name}}{% endif %}">
|
<input type="text" class="form-control typeahead" name="series" id="series" value="{% if book.series %}{{book.series[0].name}}{% endif %}">
|
||||||
@ -100,11 +99,14 @@
|
|||||||
<input type="text" class="form-control fake-input hidden" id="fake_pubdate" value="{% if book.pubdate %}{{book.pubdate|formatdate}}{% endif %}">
|
<input type="text" class="form-control fake-input hidden" id="fake_pubdate" value="{% if book.pubdate %}{{book.pubdate|formatdate}}{% endif %}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="publisher">{{_('Publisher')}}</label>
|
||||||
|
<input type="text" class="form-control typeahead" name="publisher" id="publisher" value="{% if book.publishers|length > 0 %}{{book.publishers[0].name}}{% endif %}" disabled>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="languages">{{_('Language')}}</label>
|
<label for="languages">{{_('Language')}}</label>
|
||||||
<input type="text" class="form-control typeahead" name="languages" id="languages" value="{% for language in book.languages %}{{language.language_name.strip()}}{% if not loop.last %}, {% endif %}{% endfor %}">
|
<input type="text" class="form-control typeahead" name="languages" id="languages" value="{% for language in book.languages %}{{language.language_name.strip()}}{% if not loop.last %}, {% endif %}{% endfor %}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if cc|length > 0 %}
|
{% if cc|length > 0 %}
|
||||||
{% for c in cc %}
|
{% for c in cc %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
19
cps/web.py
19
cps/web.py
@ -3415,6 +3415,12 @@ def edit_book(book_id):
|
|||||||
else:
|
else:
|
||||||
book.pubdate = db.Books.DEFAULT_PUBDATE
|
book.pubdate = db.Books.DEFAULT_PUBDATE
|
||||||
|
|
||||||
|
'''if len(book.publishers):
|
||||||
|
if to_save["publisher"] != book.publishers[0].name:
|
||||||
|
modify_database_object(to_save["publisher"], book.publishers, db.Publishers, db.session, 'series')
|
||||||
|
else:
|
||||||
|
modify_database_object(to_save["publisher"], book.publishers, db.Publishers, db.session, 'series')'''
|
||||||
|
|
||||||
# retranslate displayed text to language codes
|
# retranslate displayed text to language codes
|
||||||
languages = db.session.query(db.Languages).all()
|
languages = db.session.query(db.Languages).all()
|
||||||
input_l = []
|
input_l = []
|
||||||
@ -3524,12 +3530,19 @@ def edit_book(book_id):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
if config.config_use_google_drive:
|
if config.config_use_google_drive:
|
||||||
gdriveutils.updateGdriveCalibreFromLocal()
|
gdriveutils.updateGdriveCalibreFromLocal()
|
||||||
author_names = []
|
|
||||||
for authr in book.authors:
|
|
||||||
author_names.append(authr.name)
|
|
||||||
if "detail_view" in to_save:
|
if "detail_view" in to_save:
|
||||||
return redirect(url_for('show_book', book_id=book.id))
|
return redirect(url_for('show_book', book_id=book.id))
|
||||||
else:
|
else:
|
||||||
|
for indx in range(0, len(book.languages)):
|
||||||
|
try:
|
||||||
|
book.languages[indx].language_name = LC.parse(book.languages[indx].lang_code).get_language_name(
|
||||||
|
get_locale())
|
||||||
|
except UnknownLocaleError:
|
||||||
|
book.languages[indx].language_name = _(
|
||||||
|
isoLanguages.get(part3=book.languages[indx].lang_code).name)
|
||||||
|
author_names = []
|
||||||
|
for authr in book.authors:
|
||||||
|
author_names.append(authr.name)
|
||||||
return render_title_template('book_edit.html', book=book, authors=author_names, cc=cc,
|
return render_title_template('book_edit.html', book=book, authors=author_names, cc=cc,
|
||||||
title=_(u"edit metadata"), page="editbook")
|
title=_(u"edit metadata"), page="editbook")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user