Skip to content

Commit

Permalink
Merge pull request #165 from eea/case_study_layout
Browse files Browse the repository at this point in the history
Update case study - refs #277447
  • Loading branch information
kreafox authored Sep 26, 2024
2 parents b48b112 + 9971a1f commit 9a849ff
Show file tree
Hide file tree
Showing 9 changed files with 522 additions and 452 deletions.
9 changes: 5 additions & 4 deletions eea/climateadapt/behaviors/acemeasure.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class IAceMeasure(form.Schema, IImageScaleTraversable):
fields=[
"publication_date",
"title",
"long_description",
"description",
"long_description",
"climate_impacts",
"keywords",
"sectors",
Expand Down Expand Up @@ -161,6 +161,7 @@ class IAceMeasure(form.Schema, IImageScaleTraversable):

directives.widget("keywords", vocabulary="eea.climateadapt.keywords")
keywords = Tuple(
title=_(u"Keywords"),
description=_(
"Describe and tag this item with relevant keywords. "
"Press Enter after writing your keyword. "
Expand Down Expand Up @@ -236,7 +237,7 @@ class IAceMeasure(form.Schema, IImageScaleTraversable):

dexteritytextindexer.searchable("success_limitations")
success_limitations = RichText(
title=_("Success / limitations"),
title=_("Success and limiting factors"),
required=False,
default=unicode(""),
description=_(
Expand All @@ -249,7 +250,7 @@ class IAceMeasure(form.Schema, IImageScaleTraversable):

dexteritytextindexer.searchable("cost_benefit")
cost_benefit = RichText(
title=_("Cost / Benefit"),
title=_("Costs and benefits"),
required=False,
default=unicode(""),
description=_(
Expand Down Expand Up @@ -282,7 +283,7 @@ class IAceMeasure(form.Schema, IImageScaleTraversable):

dexteritytextindexer.searchable("implementation_time")
implementation_time = RichText(
title=_("Implementation Time"),
title=_("Implementation time"),
required=False,
default=None,
description=_(
Expand Down
6 changes: 3 additions & 3 deletions eea/climateadapt/behaviors/adaptationoption.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ class IAdaptationOption(IAceMeasure, IBlocks):
"@id": "8b66f602-4098-4083-ae4e-0d45a6061c41",
"field": {
"id": "success_limitations",
"title": "Success / limitations",
"title": "Success and limiting factors",
"widget": "richtext",
},
},
{
"@id": "07bf6b42-bdef-4505-8a80-369d4f096d34",
"field": {
"id": "cost_benefit",
"title": "Cost / Benefit",
"title": "Costs and benefits",
"widget": "richtext",
},
},
Expand All @@ -297,7 +297,7 @@ class IAdaptationOption(IAceMeasure, IBlocks):
"@id": "6f100215-d407-4049-be3e-8c15c45f48b9",
"field": {
"id": "implementation_time",
"title": "Implementation Time",
"title": "Implementation time",
"widget": "richtext",
},
},
Expand Down
488 changes: 46 additions & 442 deletions eea/climateadapt/behaviors/casestudy.py

Large diffs are not rendered by default.

435 changes: 435 additions & 0 deletions eea/climateadapt/behaviors/volto_layout.py

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions eea/climateadapt/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@
component=".vocabulary.ObjectProvidesVocabulary"
/>

<utility
name="updating_notes_vocabulary"
component=".vocabulary.UpdatingNotesVocabularyFactory"
/>

<utility
name="eea.climateadapt.faceted_elements_voc"
component=".vocabulary.faceted_elements"
Expand Down
8 changes: 8 additions & 0 deletions eea/climateadapt/profiles.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,12 @@
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="eeaclimateadapt_to_76"
title="Upgrade profile for eea.climateadapt v76"
description=""
directory="profiles/upgrades/to_76"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

</configure>
6 changes: 6 additions & 0 deletions eea/climateadapt/profiles/upgrades/to_76/catalog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<object name="portal_catalog">
<index name="updating_notes" meta_type="KeywordIndex">
<indexed_attr value="updating_notes"/>
</index>
</object>
10 changes: 10 additions & 0 deletions eea/climateadapt/upgrades/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="eea.climateadapt">

<genericsetup:upgradeSteps
source="75"
destination="76"
profile="eea.climateadapt:default">
<genericsetup:upgradeDepends
title="Update profile eeaclimate to v76"
import_profile="eea.climateadapt:eeaclimateadapt_to_76"
/>
</genericsetup:upgradeSteps>

<genericsetup:upgradeSteps
source="74"
destination="75"
Expand Down
7 changes: 4 additions & 3 deletions eea/climateadapt/vocabulary.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,18 +392,18 @@ def __call__(self, context, query=None):
_relevance = [
(
"IMPL_AS_CCA",
_("Case developed and implemented as a Climate Change Adaptation Measure."),
_("Case developed and implemented as a climate change adaptation measure."),
),
(
"PARTFUND_AS_CCA",
_(
"Case developed and implemented and partially funded as a Climate Change Adaptation measure."
"Case partially developed, implemented and funded as a climate change adaptation measure."
),
),
(
"OTHER_POL_OBJ",
_(
"Case mainly developed and implemented because of other policy objectives, but with significant consideration of Climate Change Adaptation aspects"
"Case mainly developed and implemented because of other policy objectives, but with significant consideration of climate change adaptation aspects."
),
),
]
Expand Down Expand Up @@ -703,6 +703,7 @@ def __call__(self, context, query=None):
SpecialTagsVocabularyFactory = KeywordsVocabulary("special_tags")
KeywordsVocabularyFactory = KeywordsVocabulary("keywords")
ObjectProvidesVocabulary = KeywordsVocabulary("object_provides")
UpdatingNotesVocabularyFactory = KeywordsVocabulary("updating_notes")

_governance = [
("TRANS", "Transnational region (stretching across country borders)"),
Expand Down

0 comments on commit 9a849ff

Please sign in to comment.