Skip to content

Commit

Permalink
merged with PLIP plone/Products.CMFPlone#1483
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrcon committed Mar 22, 2017
1 parent ff7b13d commit 3ecb34c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
16 changes: 5 additions & 11 deletions plone/app/contenttypes/browser/templates/listing.pt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
thumb_size_list python:view.get_thumbSize_list();
thumb_size_table python:view.get_thumbSize_table();
thumb_size_summary python:view.get_thumbSize_summary();
img_class_list python:'image-'+thumb_size_list;
img_class_summmary python:'image-'+thumb_size_summary;
showicons view/show_icons ;">
<tal:listing condition="batch">
<div class="entries" metal:define-slot="entries"
Expand All @@ -45,21 +43,17 @@
item_link python:item_type in view.use_view_action and item_url+'/view' or item_url;
item_is_event python:view.is_event(obj);
item_has_image python:item.getIcon;
item_type_class python:('contenttype-' + view.normalizeString(item_type)) if showicons else '' ;
item_type_class python:('contenttype-' + view.normalizeString(item_type)) if showicons else '' ;
">
<metal:block define-slot="entry">
<article class="entry">
<header metal:define-macro="listitem" tal:attributes="class python:'vevent' if item_is_event else None">
<span class="summary" tal:attributes="title item_type">
<a tal:attributes="href item_link">
<img tal:condition="item_has_image"
tal:replace="structure python:image_scale.tag(item, 'image', scale='tile', css_class='image-tile')">
src item/MimeTypeIcon;">
<img tal:define="thumb_url python:item_url +'/@@images/image/'+thumb_size_list;"
tal:condition="python: item_has_image and not thumb_size_list=='none'"
tal:attributes="href item/getURL;
src string:$thumb_url;
class string:$img_class_list pull-right">

<img tal:condition="python: item_has_image and (thumb_size_list!='none')"
tal:replace="structure python:image_scale.tag(item, 'image', scale=thumb_size_list, css_class='pull-right image-'+thumb_size_list)" />

</a>
<a tal:attributes="href item_link;
class string:$item_type_class $item_wf_state_class url;
Expand Down
5 changes: 3 additions & 2 deletions plone/app/contenttypes/browser/templates/listing_summary.pt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
tal:condition="python: item_has_image and not thumb_size_summary=='none'"
tal:attributes="class python: 'tileImage' if item_description else 'tileImageNoFloat'">
<a tal:attributes="href item_link">
<img tal:replace="structure python:image_scale.tag(item, 'image', scale='thumb')" />
class string:$img_class_summmary">
<img tal:condition="python: item_has_image and (thumb_size_summary!='none')"
tal:replace="structure python:image_scale.tag(item, 'image', scale=thumb_size_summary, css_class='image-'+thumb_size_summary)" />

</a>
</div>

Expand Down
11 changes: 3 additions & 8 deletions plone/app/contenttypes/browser/templates/listing_tabular.pt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
item_wf_state item/review_state;
item_wf_state_class python:'state-' + view.normalizeString(item_wf_state);
item_creator item/Creator;
item_has_image python:item.getIcon;
item_link python:item_type in view.use_view_action and item_url+'/view' or item_url;
">
<tr metal:define-macro="listitem"
Expand All @@ -63,14 +64,8 @@
<tal:block tal:replace="field_data/value" />
</td>
<td tal:condition="python:field == 'Title'">
<img tal:condition="python: item.getIcon"
tal:replace="structure python:image_scale.tag(item, 'image', scale='icon', css_class='image-icon')">
<img
tal:define="thumb_url python:item_url+'/@@images/image/'+thumb_size"
tal:condition="python: item.getIcon and not thumb_size=='none'"
tal:attributes="href item_url;
src string:$thumb_url;
class string:$img_class"
<img tal:condition="python: item_has_image and (thumb_size!='none')"
tal:replace="structure python:image_scale.tag(item, 'image', scale=thumb_size, css_class='pull-right image-'+thumb_size)" />
<a href="#"
tal:attributes="href item_link;
class string:$item_wf_state_class $item_type_class;
Expand Down

0 comments on commit 3ecb34c

Please sign in to comment.