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

PR: Cleanup and rework: contenttype-icons and ... #11

Merged
merged 1 commit into from
Nov 11, 2015
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ Fixes:
- Used registry lookup for types_use_view_action_in_listings.
[esteele]


- Cleanup and rework: contenttype-icons and showing thumbnails
for images/leadimages in listings
https://github.com/plone/Products.CMFPlone/issues/1226
[fgrcon]

3.0.4 (2015-09-07)
------------------

Expand Down
18 changes: 13 additions & 5 deletions plone/portlet/collection/collection.pt
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,26 @@
<ul class="portletContent">
<tal:events tal:repeat="obj view/results">
<li class="portletItem"
tal:define="oddrow repeat/obj/odd;
tal:define="plone_view context/@@plone;
oddrow repeat/obj/odd;
useView python:obj.portal_type in viewActions;
itemUrl python:useView and obj.getURL() + '/view' or obj.getURL();
normalizeString nocall:plone_view/normalizeString;"
item_wf_state obj/review_state;
item_wf_state_class python:'state-' + plone_view.normalizeString(item_wf_state);
item_type obj/portal_type;
item_type_class python:'contenttype-' + plone_view.normalizeString(item_type);"
tal:attributes="class python:oddrow and 'portletItem even' or 'portletItem odd'">
<a href="#"
tal:attributes="href itemUrl;
class python:'tile contenttype-' + normalizeString(obj.portal_type);
class string:tile $item_type_class $item_wf_state_class;
title obj/Description">
<img class="image-icon"
tal:define="thumb python:obj.getURL()+'/@@images/image/icon'"
tal:condition=" obj/getIcon"
tal:attributes="href obj/getURL;
src string:$thumb;">
<span tal:replace="obj/Title">
Title
</span>
Title </span>
<span class="portletItemDetails"
tal:condition="view/data/show_dates"
tal:define="obj_date obj/Date"
Expand Down
2 changes: 1 addition & 1 deletion plone/portlet/collection/tests/functional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Go to the home page and see if the portlet looks OK.
</header>
<ul class="portletContent">
<li class="portletItem odd">
<a href="http://nohost/plone/test-document" class="tile contenttype-document" title="">
<a href="http://nohost/plone/test-document" class="tile contenttype-document state-private" title="">
Test Document
</a>
</li>
Expand Down