mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix regression that caused tags to not be sorted when displayed in the book details panel. Fixes #1351622 [tags are not shown alphabetically in Book Details Window](https://bugs.launchpad.net/calibre/+bug/1351622)
This commit is contained in:
parent
6a1f82320d
commit
c148102a5f
@ -194,9 +194,12 @@ def mi_to_html(mi, field_list=None, default_author_link=None, use_roman_numbers=
|
||||
st = metadata['search_terms'][0]
|
||||
except Exception:
|
||||
st = field
|
||||
all_vals = mi.get(field)
|
||||
if field == 'tags':
|
||||
all_vals = sorted(all_vals, key=sort_key)
|
||||
links = ['<a href="%s" title="%s">%s</a>' % (
|
||||
search_href(st, x), _('Click to see books with {0}: {1}').format(metadata['name'], x), x)
|
||||
for x in mi.get(field)]
|
||||
for x in all_vals]
|
||||
val = metadata['is_multiple']['list_to_ui'].join(links)
|
||||
elif metadata['datatype'] == 'enumeration':
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user