Skip to content

Instantly share code, notes, and snippets.

@liconti
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liconti/4e265c9c6bb8f5568c55 to your computer and use it in GitHub Desktop.
Save liconti/4e265c9c6bb8f5568c55 to your computer and use it in GitHub Desktop.
Tutto il contenuto (nascondi esclusi)
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/main_template/macros/master"
i18n:domain="plone">
<body>
<metal:content-core fill-slot="content-core">
<metal:block define-macro="listing" extend-macro="context/folder_listing/macros/content-core">
<metal:entries fill-slot="entries">
<div metal:use-macro="context/batch_macros/macros/navigation" />
<table class="listing"
summary="Content listing"
i18n:attributes="summary summary_content_listing;"
tal:define="folder_id context/getId|context/id">
<thead>
<tr>
<th class="nosort">&nbsp;<tal:title i18n:translate="listingheader_title"
>Title</tal:title>&nbsp;</th>
<th class="nosort">&nbsp;<tal:title i18n:translate="listingheader_content"
>Content</tal:title>&nbsp;</th>
</tr>
</thead>
<tbody>
<metal:block use-macro="context/folder_listing/macros/entries">
<metal:entry fill-slot="entry">
<tr metal:define-macro="listitem"
tal:define="oddrow repeat/item/odd;"
tal:attributes="class python:test(oddrow, 'even', 'odd')">
<td>
<img width="16" height="16"
src="" alt=""
tal:condition="item_icon/url"
tal:attributes="src item_icon/url;
alt item_icon/description;
title item_icon/title;
width item_icon/width;
height item_icon/height;" />
<a href="#"
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);
class string:$item_wf_state_class $item_type_class;
title item_description;"
tal:content="item_title_or_id">
Item Title
</a>
<!--div tal:content="item_description" /-->
</td>
<td>
<div tal:replace="structure python:item.getObject().folder_partial_view_item()" />
</td>
</tr>
</metal:entry>
</metal:block>
</tbody>
</table>
</metal:entries>
</metal:block>
<metal:subtopics use-macro="context/atct_topic_view/macros/folderlisting_macro" />
</metal:content-core>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/main_template/macros/master"
i18n:domain="plone">
<tal:comment replace="nothing">
Mostra tutto il contenuto della cartella, nascondendo gli elementi esclusi dalla navigazione,
e nascondendo "Titolo" e "Descrizione" per l'elemento con "id" UGUALE all'id della cartella medesima.
</tal:comment>
<body>
<metal:content-core fill-slot="content-core">
<tal:folder define="folder_id context/getId|context/id">
<metal:block use-macro="context/folder_listing/macros/content-core">
<!-- we don't want the dl -->
<metal:entries fill-slot="entries">
<metal:block use-macro="context/folder_listing/macros/entries">
<metal:entry fill-slot="entry">
<tal:entryblock tal:define="same_id python: item_id==folder_id;
excluded item/exclude_from_nav;
skip_item python: same_id or excluded">
<div tal:replace="structure python:item.getObject().folder_full_view_item()"
tal:condition="not: skip_item"/>
<div id="same-id-of-parent-folder"
tal:define="item_layout python:item.getObject().getLayout() or item.getObject().getDefaultLayout();
override python: {'Link': 'link_view'};
item_macro python:path('here/%s/macros/content-core | nothing' % override.get(item_type, item_layout));
rendering_error python:[];
testdata python:override.get(item_type, item_layout);
context python:item.getObject()"
tal:condition="same_id">
<tal:block tal:condition="item_macro" tal:on-error="python:rendering_error.append(True)">
<div tal:replace="structure provider:plone.abovecontentbody" />
<div metal:use-macro="item_macro"> content </div>
<div tal:replace="structure provider:plone.belowcontentbody" />
</tal:block>
<tal:block tal:condition="rendering_error">
<!-- Error rendering item macro -->
</tal:block>
<p class="more" tal:condition="python:not(item_macro) or rendering_error">
<a href=""
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);">
<span class="hiddenStructure"><span tal:replace="context/Title" /> - </span>
<span i18n:translate="read_more">Read More&hellip;</span>
</a>
</p>
<div class="visualClear"><!-- --></div>
</div>
</tal:entryblock>
</metal:entry>
</metal:block>
</metal:entries>
</metal:block>
</tal:folder>
</metal:content-core>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
i18n:domain="plone"
tal:omit-tag="">
<body tal:omit-tag="">
<div class="item visualIEFloatFix"
tal:define="portal_state context/@@plone_portal_state;
context_state context/@@plone_context_state;
plone_view context/@@plone;
lang portal_state/language;
view nocall:view | nocall: plone_view;
dummy python: plone_view.mark_view(view);
portal_url portal_state/portal_url;
checkPermission nocall: context/portal_membership/checkPermission;
site_properties context/portal_properties/site_properties;
item_type context/portal_type;
item_layout here/getLayout;
override python: {'Link': 'link_view'};
item_macro python:path('here/%s/macros/content-core | nothing' % override.get(item_type, item_layout));
use_view_action site_properties/typesUseViewActionInListings|python:();
item_url context/absolute_url;
normalizeString nocall: context/plone_utils/normalizeString;
item_type_class python: 'contenttype-' + normalizeString(item_type);
kss_inline_editable python:False;
rendering_error python:[];
">
<!--
<div tal:replace="structure provider:plone.abovecontenttitle" />
<h2 class="headline">
<a href="#" class="summary url" tal:content="context/Title"
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);">
Title or id
</a>
</h2>
<div tal:replace="structure provider:plone.belowcontenttitle" />
<div class="description"
tal:content="context/Description"
tal:condition="context/Description">
Description
</div>
-->
<tal:block tal:condition="item_macro" tal:on-error="python:rendering_error.append(True)">
<div tal:replace="structure provider:plone.abovecontentbody" />
<div metal:use-macro="item_macro">
content
</div>
<div tal:replace="structure provider:plone.belowcontentbody" />
</tal:block>
<tal:block tal:condition="rendering_error">
<!-- Error rendering item macro -->
</tal:block>
<p class="more" tal:condition="python:not(item_macro) or rendering_error">
<a href=""
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);">
<span class="hiddenStructure"><span tal:replace="context/Title" /> - </span>
<span i18n:translate="read_more">Read More&hellip;</span>
</a>
</p>
<div class="visualClear"><!-- --></div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/main_template/macros/master"
i18n:domain="plone">
<body>
<metal:content-core fill-slot="content-core">
<metal:block define-macro="listing" extend-macro="context/folder_listing/macros/content-core">
<!-- we don't want the dl -->
<metal:entries fill-slot="entries">
<metal:block use-macro="context/folder_listing/macros/entries">
<metal:entry fill-slot="entry">
<div class="tileItem visualIEFloatFix"
tal:define="item_object item/getObject;"
tal:condition="not: item/exclude_from_nav">
<a href="#"
tal:condition="exists:item_object/image_thumb"
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url)">
<img src="" alt=""
tal:replace="structure python: path('nocall:item_object/tag')(scale='thumb', css_class='tileImage')" />
</a>
<h2 class="tileHeadline"
metal:define-macro="listitem">
<a href="#"
class="summary url"
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);"
tal:content="item_title_or_id">
Item Title
</a>
</h2>
<div class="documentByLine" tal:condition="python: site_properties.allowAnonymousViewAbout or not isAnon">
<tal:event condition="python: item_type == 'Event'">
<span tal:condition="python: item_type == 'Event' and item.location"
i18n:translate="label_event_byline_with_location">
(<span tal:content="string:${item/location}"
class="location"
i18n:name="location">Oslo</span>, from
<abbr class="dtstart"
tal:attributes="title python:item_start"
tal:content="python:toLocalizedTime(item_start,long_format=1)"
i18n:name="start">from date</abbr> to
<abbr class="dtend"
tal:attributes="title python:item_end"
tal:content="python:toLocalizedTime(item_end,long_format=1)"
i18n:name="end">to date</abbr>)
</span>
<span tal:condition="python: item_type == 'Event' and not item.location"
i18n:translate="label_event_byline_without_location">
(from
<abbr class="dtstart"
tal:attributes="title python:item_start"
tal:content="python:toLocalizedTime(item_start,long_format=1)"
i18n:name="start">from date</abbr> to
<abbr class="dtend"
tal:attributes="title python:item_end"
tal:content="python:toLocalizedTime(item_end,long_format=1)"
i18n:name="end">to date</abbr>)
</span>
</tal:event>
<tal:newsitem condition="python: item_type == 'News Item'">
<tal:name tal:condition="item_creator"
tal:define="author python:pas_member.info(item_creator)">
<span class="documentAuthor" i18n:translate="label_by_author">
by
<a href="#"
tal:attributes="href string:${navigation_root_url}/author/${item_creator}"
tal:content="author/name_or_id"
tal:omit-tag="not:author"
i18n:name="author">
Bob Dobalina
</a>
</span>
</tal:name>
&mdash;
<span class="documentModified">
<tal:mod i18n:translate="box_last_modified">
last modified
</tal:mod>
<span tal:replace="python:toLocalizedTime(item_modified,long_format=1)">
August 16, 2001 at 23:35:59
</span>
</span>
</tal:newsitem>
</div>
<p class="tileBody" tal:condition="item_description">
<span class="description" tal:content="item_description">
description
</span>
</p>
<p class="tileFooter">
<a href=""
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);">
<span class="hiddenStructure"><span tal:replace="item_title_or_id" /> - </span>
<span i18n:translate="read_more">Read More&hellip;</span>
</a>
</p>
<div class="visualClear"><!-- --></div>
</div>
</metal:entry>
</metal:block>
</metal:entries>
</metal:block>
</metal:content-core>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment