Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/369.bugix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fixes the "by" translation and the date issues for document byline viewlet
Comment thread
szakitibi marked this conversation as resolved.
Outdated
[szakitibi]
48 changes: 29 additions & 19 deletions plone/app/layout/viewlets/document_byline.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@
tal:condition="python:creator_ids and view.show_about()"
>
<span class="label-by-author">
<tal:i18n i18n:translate="">by</tal:i18n>
<tal:for repeat="user_id creator_ids">
<tal:user define="
url_path python: view.get_url_path(user_id);
fullname python:view.get_fullname(user_id);
">
<a class="badge rounded-pill bg-light text-dark fw-normal fs-6"
href="${navigation_root_url}/${url_path}"
tal:condition="url_path"
>${fullname}</a>
<span class="badge rounded-pill bg-light text-dark fw-normal fs-6"
tal:condition="not:url_path"
>${fullname}</span>
</tal:user>
</tal:for>
<tal:i18n i18n:translate="label_by_author">
by
<tal:for repeat="user_id creator_ids" i18n:name="author">
<tal:user define="
url_path python: view.get_url_path(user_id);
fullname python:view.get_fullname(user_id);
">
<a class="badge rounded-pill bg-light text-dark fw-normal fs-6"
href="${navigation_root_url}/${url_path}"
tal:condition="url_path"
>${fullname}</a>
<span class="badge rounded-pill bg-light text-dark fw-normal fs-6"
tal:condition="not:url_path"
>${fullname}</span>
</tal:user>
</tal:for>
</tal:i18n>
&mdash;
</span>
</tal:creators>
Expand All @@ -37,7 +39,12 @@
tal:condition="published"
>
<span i18n:translate="box_published">published</span>
<span tal:content="python:context.toLocalizedTime(published)">Published</span>
<span tal:content="published"
class="pat-display-time"
data-pat-display-time="from-now: true"
datetime="${published}"
title="${python: context.toLocalizedTime(published, long_format=True)}"
>Published</span>
<tal:sep condition="show_modification_date">,</tal:sep>
</span>

Expand All @@ -47,9 +54,12 @@
<span i18n:translate="box_last_modified">
last modified
</span>
<span tal:content="python:context.toLocalizedTime(modified)">
Modified
</span>
<span tal:content="modified"
class="pat-display-time"
data-pat-display-time="from-now: true"
datetime="${modified}"
title="${python: context.toLocalizedTime(modified, long_format=True)}"
>Modified</span>
</span>
</tal:dates>

Expand Down