Changeset 1039 in products
- Timestamp:
- Apr 16, 2009 12:28:45 PM (17 years ago)
- Location:
- quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus
- Files:
-
- 3 edited
-
blog.py (modified) (2 diffs)
-
catalog.py (modified) (2 diffs)
-
cumulusportlet.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus/blog.py
r1036 r1039 10 10 implements(ITagsRetriever) 11 11 12 def __init__(self, context):13 self.context = context14 15 12 def getTags(self, number=None): 16 13 """ Get Quills blog's tags. … … 23 20 tags = [] 24 21 for topic in topics: 25 tags.append((topic.getTitle() , len(topic), topic.absolute_url()))22 tags.append((topic.getTitle().decode(self.default_charset), len(topic), topic.absolute_url())) 26 23 27 24 return tags -
quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus/catalog.py
r1036 r1039 9 9 def __init__(self, context): 10 10 self.context = context 11 portal_properties = getToolByName(self.context, 'portal_properties') 12 self.default_charset = portal_properties.site_properties.getProperty('default_charset', 'utf-8') 11 13 12 14 def getTags(self, number=None): … … 21 23 except TypeError: 22 24 number_of_entries = 1 23 tags.append((name , number_of_entries, '#'))25 tags.append((name.decode(self.default_charset), number_of_entries, '#')) 24 26 25 27 return tags -
quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus/cumulusportlet.py
r1038 r1039 145 145 portal_state = getMultiAdapter((context, request), name=u'plone_portal_state') 146 146 self.portal_url = portal_state.portal_url() 147 portal_properties = getMultiAdapter((context, request), name=u'plone_tools').properties() 148 self.default_charset = portal_properties.site_properties.getProperty('default_charset', 'utf-8') 147 149 148 150 @property … … 171 173 172 174 def getParams(self): 175 tagcloud = '<tags>%s</tags>' % self.getTagAnchors() 176 tagcloud = tagcloud.encode(self.default_charset) 177 tagcloud = urllib.quote(tagcloud) 173 178 params = { 174 179 'url': self.portal_url + '/++resource++tagcloud.swf', … … 183 188 'distr': self.data.distr and 'true' or 'false', 184 189 'mode': 'tags', 185 'tagcloud': urllib.quote('<tags>%s</tags>' % self.getTagAnchors()),190 'tagcloud': tagcloud, 186 191 } 187 192 flashvars = []
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/chrome/common/qtrac_logo.png)