X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ad422879d55a62e02c71024531aa4a2277dedaf3..4aa58b0435c6b280932beeed4fa893de2fa81544:/src/depot/publishers/base.py?ds=sidebyside diff --git a/src/depot/publishers/base.py b/src/depot/publishers/base.py index 88ee56b2..cdc1ff31 100644 --- a/src/depot/publishers/base.py +++ b/src/depot/publishers/base.py @@ -25,7 +25,7 @@ class BasePublisher: if wlbook.meta.audience in ('L', 'SP1', 'SP2', 'SP3', 'SP4'): description += '

{} to lektura szkolna.'.format(wlbook.meta.title) - if wlbook.tree.find('//pe') is not None: + if wlbook.tree.find('.//pe') is not None: description += '
Ebook {title} zawiera przypisy opracowane specjalnie dla uczennic i uczniów {school}.'.format( title=wlbook.meta.title, school='szkoły podstawowej' if wlbook.meta.audience.startswith('SP') else 'liceum i technikum' @@ -44,10 +44,11 @@ class BasePublisher: ) if p is not None else '' for p in wlbook.meta.authors ) + '
' - description += '{}
'.format( - wlbook.meta.url.slug, - wlbook.meta.title - ) + if wlbook.meta.url is not None: + description += '{}
'.format( + wlbook.meta.url.slug, + wlbook.meta.title + ) if wlbook.meta.translators: description += 'tłum. ' + ', '.join(p.readable() for p in wlbook.meta.translators) + '
' description += 'Epoka: ' + ', '.join(