Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS classes document-byline, document-description, label-by-author, lead-image #686

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all 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
89 changes: 38 additions & 51 deletions plone/app/contenttypes/browser/templates/listing.pt
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:tal="http://xml.zope.org/namespaces/tal"
lang="en"
metal:use-macro="context/@@main_template/macros/master"
xml:lang="en"
i18n:domain="plone"
>
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:tal="http://xml.zope.org/namespaces/tal"
lang="en"
metal:use-macro="context/@@main_template/macros/master"
xml:lang="en"
i18n:domain="plone">
<body>

<metal:content-core fill-slot="content-core">
<metal:block define-macro="content-core">

<div class="stx"
id="parent-fieldname-text"
metal:define-macro="text-field-view"
tal:define="
id="parent-fieldname-text"
metal:define-macro="text-field-view"
tal:define="
text python:view.text;
"
tal:condition="python:text"
tal:attributes="
tal:condition="python:text"
tal:attributes="
class python:view.text_class;
"
>
">
<div metal:define-slot="inside"
tal:replace="structure text"
>The body</div>
tal:replace="structure text">The body</div>
</div>


Expand All @@ -40,16 +37,14 @@
">
<tal:listing condition="python:batch">
<div class="entries"
metal:define-slot="entries"
tal:define="
metal:define-slot="entries"
tal:define="
portal python:portal_state.portal();
image_scale portal/@@image_scale;
"
>
">

<tal:repeat metal:define-macro="entries"
repeat="item python:batch"
>
repeat="item python:batch">
<tal:block tal:define="
obj python:item.getObject();
item_url python:item.getURL();
Expand All @@ -73,34 +68,30 @@
<article class="mb-3 row">

<div class="col"
metal:define-macro="listitem"
>
metal:define-macro="listitem">

<div class="mb-1">
<a tal:content="python:item_title"
tal:attributes="
tal:attributes="
href python:item_link;
class string:$item_type_class $item_wf_state_class url;
title item_type;
"
>
">
Item Title
</a>
</div>

<metal:block metal:define-macro="document_byline">
<div class="mb-1">
<div class="document-byline mb-1">

<tal:event condition="python:item_is_event">
<tal:date tal:replace="structure python:view.formatted_date(obj)" />
<span tal:condition="python:obj.location"
i18n:translate="label_event_byline_location"
>
i18n:translate="label_event_byline_location">
&mdash;
<span class="location"
tal:content="python:obj.location"
i18n:name="location"
>Oslo</span>
tal:content="python:obj.location"
i18n:name="location">Oslo</span>
</span>
&mdash;
</tal:event>
Expand All @@ -113,17 +104,16 @@
creator_is_openid python:'/' in creator_short_form;
creator_id python:(creator_short_form, creator_long_form)[creator_is_openid];
"
tal:condition="python:item_creator"
>
<span i18n:translate="label_by_author">
tal:condition="python:item_creator">
<span class="label-by-author"
i18n:translate="label_by_author">
by
<a tal:content="python: author.get('name_or_id')"
tal:omit-tag="python: not author"
tal:attributes="
tal:omit-tag="python: not author"
tal:attributes="
href string:${view/navigation_root_url}/author/${item_creator};
"
i18n:name="author"
>
i18n:name="author">
Bob Dobalina
</a>
</span>
Expand All @@ -147,17 +137,15 @@
</div>
</metal:block>

<p class="me-3"
tal:condition="python:item_description"
tal:content="python:item_description"
>
<p class="document-description me-3"
tal:condition="python:item_description"
tal:content="python:item_description">
description
</p>
</div>

<div class="col-3 text-end"
tal:condition="python:item_has_image and thumb_scale_list"
>
<div class="lead-image col-3 text-end"
tal:condition="python:item_has_image and thumb_scale_list">
<a tal:attributes="
href python:item_link;
">
Expand All @@ -177,9 +165,8 @@

<metal:empty metal:define-slot="no_items_in_listing">
<p class="discreet"
tal:condition="python: not batch"
tal:content="python: view.no_items_message"
>
tal:condition="python: not batch"
tal:content="python: view.no_items_message">
There are currently no items in this folder.
</p>
</metal:empty>
Expand Down
Loading