Skip to content

Commit

Permalink
Merge pull request #92 from seantis/issue_91
Browse files Browse the repository at this point in the history
Issue 91
  • Loading branch information
msom committed Oct 22, 2015
2 parents 638bb6d + 7033128 commit 35e6818
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Changelog
1.6 (unreleased)
~~~~~~~~~~~~~~~~

- Limit the range of different guidle categories. Implements #91.
[msom]

- Change layout of event list and detail for visual redesign.
[msom]

Expand Down
9 changes: 9 additions & 0 deletions seantis/dir/events/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,15 @@
handler=".upgrades.upgrade_1017_to_1018">
</genericsetup:upgradeStep>

<genericsetup:upgradeStep
title="Change guidle classifier"
description=""
source="1018"
destination="1019"
profile="seantis.dir.events:default"
handler=".upgrades.upgrade_1018_to_1019">
</genericsetup:upgradeStep>

<!-- Advanced Theme Adjustments through Diazo -->
<plone:static name="seantis.dir.events.izug-theme"
directory="themes/izug-theme" type="theme"
Expand Down
2 changes: 1 addition & 1 deletion seantis/dir/events/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<metadata>
<version>1018</version>
<version>1019</version>
<dependencies>
<dependency>profile-plone.app.dexterity:default</dependency>
<dependency>profile-plone.app.event:default</dependency>
Expand Down
3 changes: 2 additions & 1 deletion seantis/dir/events/sources/guidle.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def classify(self, classifications):
continue

categories = set([
tag.attrib.get('name') for tag in classification.iterchildren()
tag.attrib.get('subcategoryName')
for tag in classification.iterchildren()
])

return categories
Expand Down
5 changes: 5 additions & 0 deletions seantis/dir/events/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,8 @@ def upgrade_1016_to_1017(context):
def upgrade_1017_to_1018(context):
# Enable jquerytools.dateinput.js
enable_jquerytools_dateinput_js(context)


def upgrade_1018_to_1019(context):
# Delete imported guidle events if the default classifier is used
upgrade_1016_to_1017(context)

0 comments on commit 35e6818

Please sign in to comment.