mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont show ids that have no urls in the book details view. Follows behavior of book details panel in the GUI
This commit is contained in:
parent
edfbb3c7bc
commit
5b2f202a2c
@ -172,12 +172,10 @@ def render_metadata(mi, table, book_id, field_list=None): # {{{
|
|||||||
for k in keys:
|
for k in keys:
|
||||||
idval = val[k]
|
idval = val[k]
|
||||||
x = url_map[k]
|
x = url_map[k]
|
||||||
if isinstance(x, list) and x.length is 2:
|
if x:
|
||||||
|
if td.childNodes.length:
|
||||||
|
td.appendChild(document.createTextNode(', '))
|
||||||
td.appendChild(E.a(title='{}:{}'.format(k, idval), target='_new', href=x[1], x[0]))
|
td.appendChild(E.a(title='{}:{}'.format(k, idval), target='_new', href=x[1], x[0]))
|
||||||
else:
|
|
||||||
td.appendChild(E.span(k, ':', idval))
|
|
||||||
if k is not keys[-1]:
|
|
||||||
td.appendChild(document.createTextNode(', '))
|
|
||||||
|
|
||||||
def process_languages(field, fm, name, val):
|
def process_languages(field, fm, name, val):
|
||||||
if val and val.length:
|
if val and val.length:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user