Skip to content

Commit c46ae65

Browse files
authored
add seo behavior to file (#286)
1 parent 0c22b13 commit c46ae65

File tree

10 files changed

+50
-19
lines changed

10 files changed

+50
-19
lines changed

.github/workflows/flake8.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
python-version: [3.8]
9+
python-version: [3.11]
1010

1111
steps:
1212
# git checkout
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
# python setup
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

2121
# python cache
22-
- uses: actions/cache@v1
22+
- uses: actions/cache@v4
2323
with:
2424
path: ~/.cache/pip
2525
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

.github/workflows/pyroma.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
python-version: [3.8]
9+
python-version: [3.11]
1010

1111
steps:
1212
# git checkout
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
# python setup
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

2121
# python cache
22-
- uses: actions/cache@v1
22+
- uses: actions/cache@v4
2323
with:
2424
path: ~/.cache/pip
2525
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
# [Python version, tox env]
1616
# - ["2.7", "py27-plone52"]
1717
# - ["3.7", "py37-plone52"]
18-
- ["3.8", "py38-plone60"]
18+
# - ["3.8", "py38-plone60"]
1919
- ["3.9", "py39-plone60"]
2020
- ["3.10", "py310-plone60"]
2121
- ["3.11", "py311-plone60"]
2222
name: ${{ matrix.config[1] }}
2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
- name: Set up Python
26-
uses: actions/setup-python@v3
26+
uses: actions/setup-python@v5
2727
with:
2828
python-version: ${{ matrix.config[0] }}
2929
- name: Pip cache
30-
uses: actions/cache@v3
30+
uses: actions/cache@v4
3131
with:
3232
path: |
3333
~/.cache/pip

.github/workflows/zpretty.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
python-version: [3.8]
9+
python-version: [3.11]
1010

1111
steps:
1212
# git checkout
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
# python setup
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

2121
# python cache
22-
- uses: actions/cache@v1
22+
- uses: actions/cache@v4
2323
with:
2424
path: ~/.cache/pip
2525
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Changelog
66

77
- Added the metadata preview_caption and image_caption. An upgrade step is not necessary because the metadata will primarily be used for new content.
88
[mamico]
9+
- add SEO behavior to File
10+
[mamico]
911

1012
6.3.1 (2024-12-12)
1113
------------------

src/design/plone/contenttypes/profiles/default/metadata.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<metadata>
3-
<version>7309</version>
3+
<version>7310</version>
44
<dependencies>
55
<dependency>profile-redturtle.bandi:default</dependency>
66
<dependency>profile-collective.venue:default</dependency>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
3+
meta_type="Dexterity FTI"
4+
name="File"
5+
i18n:domain="plone"
6+
>
7+
<property name="behaviors" purge="False">
8+
<element value="kitconcept.seo" />
9+
</property>
10+
</object>

src/design/plone/contenttypes/upgrades/configure.zcml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,5 +920,11 @@
920920
destination="7309"
921921
handler=".to_730x.to_7309"
922922
/>
923-
923+
<genericsetup:upgradeStep
924+
title="add kitconcept.seo to File"
925+
profile="design.plone.contenttypes:default"
926+
source="7309"
927+
destination="7310"
928+
handler=".to_730x.to_7310"
929+
/>
924930
</configure>

src/design/plone/contenttypes/upgrades/to_730x.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,16 @@ def to_7309(context):
170170
ps.unsetLastVersionForProfile("eea.api.taxonomy:default")
171171
logger.info("Install blocksfield")
172172
installOrReinstallProduct(api.portal.get(), "collective.volto.blocksfield")
173+
174+
175+
def to_7310(context):
176+
logger.info("Enable kitconcept.seo behavior to File")
177+
portal_types = api.portal.get_tool(name="portal_types")
178+
behavior = "kitconcept.seo"
179+
for ct in ["File"]:
180+
portal_type = portal_types.get(ct, None)
181+
if portal_type:
182+
behaviors = list(portal_type.behaviors)
183+
if behavior not in behaviors:
184+
behaviors.append(behavior)
185+
portal_type.behaviors = tuple(behaviors)

test-6.0.x.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ extends =
77

88
[versions]
99
collective.volto.blocksfield = 2.2.0
10-
collective.taxonomy = 3.1.5
10+
collective.taxonomy = 3.1.5

0 commit comments

Comments
 (0)