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

remove deprecated icons ... #1152

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ Fixes:
[timitos]

- Fixed issue where clicking tabs would cause odd scroll movement.
- remove deprecated icons ...
https://github.com/plone/Products.CMFPlone/issues/1151
[fgrcon]

- fix issue where clicking tabs would cause odd scroll movement
[vangheem]

- upgrade to patternslib 2.0.11
[vangheem]

- When migration fails, do not upgrade addons or recatalog or update
Expand Down
7 changes: 0 additions & 7 deletions Products/CMFPlone/browser/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,6 @@ def displayContentsTab():
page of a folder, and checks if the user has relevant permissions.
"""

def getIcon(item):
"""Returns an object which implements the IContentIcon interface and
provides the informations necessary to render an icon.
The item parameter needs to be adaptable to IContentIcon.
Icons can be disabled globally or just for anonymous users with
the icon_visibility property in site_properties."""

def cropText(text, length, ellipsis):
""" Crop text on a word boundary """

Expand Down
1 change: 0 additions & 1 deletion Products/CMFPlone/browser/navtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def decoratorFactory(self, node):
newNode['absolute_url'] = itemUrl
newNode['getURL'] = itemUrl
newNode['path'] = item.getPath()
newNode['item_icon'] = layout_view.getIcon(item)
newNode['Creator'] = getattr(item, 'Creator', None)
newNode['creation_date'] = getattr(item, 'CreationDate', None)
newNode['portal_type'] = portalType
Expand Down
19 changes: 9 additions & 10 deletions Products/CMFPlone/browser/templates/sitemap-item.pt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<tal:item define="node options/node;
item_url node/getURL;
item_remote_url node/getRemoteUrl;
use_remote_url node/useRemoteUrl | nothing;
item_icon nocall:node/item_icon;
is_current node/currentItem;
item_class string:state-${node/normalized_review_state} contenttype-${node/normalized_portal_type};
item_class python:is_current and item_class + ' navTreeCurrentItem' or item_class">
<tal:item define="node options/node;
item_url node/getURL;
item_remote_url node/getRemoteUrl;
use_remote_url node/useRemoteUrl | nothing;
is_current node/currentItem;
item_state_class string:state-${node/normalized_review_state};
item_type_class string:contenttype-${node/normalized_portal_type};
item_class python:is_current and item_state_class + ' navTreeCurrentItem' or item_state_class">

<a tal:attributes="href python:use_remote_url and item_remote_url or item_url;
title node/Description;
class string:$item_class">
<img tal:replace="structure item_icon/html_tag" />
class string:$item_class $item_type_class">
<span tal:content="node/Title">Selected Item Title</span>
</a>

Expand Down
5 changes: 2 additions & 3 deletions Products/CMFPlone/skins/plone_content/folder_listing.pt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
item_type_title item/Type;
item_modified item/ModificationDate;
item_created item/CreationDate;
item_icon python:layout_view.getIcon(item);
item_type_class python:'contenttype-' + normalizeString(item_type);
item_wf_state item/review_state|python: context.portal_workflow.getInfoFor(item, 'review_state', '');
item_wf_state_class python:'state-' + normalizeString(item_wf_state);
Expand All @@ -67,7 +66,7 @@
tal:attributes="class python:test(item_type == 'Event', 'vevent', '')">

<span class="summary">
<img tal:replace="structure item_icon/html_tag" />

<a href="#"
tal:attributes="href python:test(item_type in use_view_action, item_url+'/view', item_url);
class string:$item_type_class $item_wf_state_class url"
Expand All @@ -77,7 +76,7 @@
</span>

<span class="documentByLine">
<span tal:condition="python: item_type == 'Event' and item_sametime"
<span tal:condition="python: item_type == 'Event' and item_sametime"
i18n:translate="label_event_byline_onlyfrom">
<abbr class="dtstart"
tal:attributes="title python:item_start"
Expand Down
21 changes: 10 additions & 11 deletions Products/CMFPlone/skins/plone_templates/recently_modified.pt
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,17 @@
<tal:results tal:repeat="result batch">

<li tal:define="description result/Description">
<header tal:define="item_icon python:plone_view.getIcon(result);
item_wf_state result/review_state;
item_wf_state_class python:'state-' + normalizeString(item_wf_state);">
<span tal:attributes="class python:'contenttype-' + normalizeString(result.portal_type)">
<img tal:replace="structure item_icon/html_tag" />
<a href="/view"
tal:content="result/pretty_title_or_id"
tal:attributes="href result/getURL;
class string:$item_wf_state_class">
Title
<header tal:define="item_wf_state result/review_state;
item_wf_state_class python:'state-' + normalizeString(item_wf_state);
item_type_class python:'contenttype-' + normalizeString(result.portal_type)">
<a tal:attributes="href result/getURL">
<img class = "image-tile"
tal:condition="python:result.getIcon"
tal:attributes="src python:result.getURL()+'/@@images/image/tile'">
<span tal:content="result/pretty_title_or_id"
tal:attributes="class string:$item_type_class $item_wf_state_class" >
Title</span>
</a>
</span>

<span class="discreet" i18n:translate="text_creator_date" tal:condition="show_about">
by
Expand Down
25 changes: 14 additions & 11 deletions Products/CMFPlone/skins/plone_templates/recently_published.pt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
Batch python:modules['Products.CMFPlone'].Batch;
DateTime python:modules['DateTime'].DateTime;
b_start python:request.get('b_start',0);
toLocalizedTime nocall:context/@@plone/toLocalizedTime;">
toLocalizedTime nocall:context/@@plone/toLocalizedTime;
normalize nocall:context/@@plone/normalizeString;">

<h1 class="documentFirstHeading"
i18n:translate="heading_recently_published">
Expand All @@ -37,15 +38,17 @@
<tal:results tal:repeat="result batch">

<article>
<header>
<img src="" alt="" style="border: 0"
tal:attributes="src result/getIcon;
alt result/Type" />

<a href="/view"
tal:content="result/pretty_title_or_id"
tal:attributes="href result/getURL">
Title
<header
tal:define="item_class python:'contenttype-' + normalize(result.portal_type);
item_wf_state result/review_state;
item_wf_state_class python:'state-' + normalize(item_wf_state);">
<a tal:attributes="href result/getURL">
<img class = "image-tile"
tal:condition="python:result.getIcon"
tal:attributes="src python:result.getURL()+'/@@images/image/tile'">
<span tal:content="result/pretty_title_or_id"
tal:attributes="class string:$item_class $item_wf_state_class">
Title</span>
</a>

<span class="discreet" i18n:translate="text_creator_date" tal:condition="show_about">
Expand All @@ -62,7 +65,7 @@
</span>
</header>

<p class="link">
<p class="discreet">
<a href="/view"
tal:content="result/Description"
tal:attributes="href result/getURL">
Expand Down
2 changes: 1 addition & 1 deletion Products/CMFPlone/static/resourceregistry-compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -32748,5 +32748,5 @@ require([
'use strict';
});

define("/Users/nathan/code/coredev5/src/Products.CMFPlone/Products/CMFPlone/static/resourceregistry.js", function(){});
define("/usr/local/p5dev/buildout.coredev/src/Products.CMFPlone/Products/CMFPlone/static/resourceregistry.js", function(){});

36 changes: 14 additions & 22 deletions Products/CMFPlone/static/resourceregistry-compiled.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Products/CMFPlone/tests/testCatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,11 +1083,11 @@ def test_provided(self):
self.assertTrue(IIndexableObjectWrapper.providedBy(w))
self.assertTrue(IContentish.providedBy(w))

def test_getIcon(self):
doc = self.doc
iconname = doc.getIcon(relative_to_portal=1)
wrapped = IndexableObjectWrapper(doc, self.portal.portal_catalog)
self.assertEqual(wrapped.getIcon, iconname)
# def test_getIcon(self):
# doc = self.doc
# iconname = doc.getIcon(relative_to_portal=1)
# wrapped = IndexableObjectWrapper(doc, self.portal.portal_catalog)
# self.assertEqual(wrapped.getIcon, iconname)

def test_getObjSize(self):
from Products.CMFPlone.CatalogTool import getObjSize
Expand Down