Skip to content

Commit

Permalink
Merge branch 'main' into plone6_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Apr 24, 2024
2 parents 25689ad + 08b1607 commit 63cc82b
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 41 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ default_stages: [commit, push]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black
# args: ["--line-length=88", "--check", "--diff", "--force-exclude=migrations", "src/"]
Expand All @@ -31,7 +31,7 @@ repos:
types: [python]
args: ["--max-complexity=30", "--max-line-length=79", "--ignore=DJ01,DJ08,W503,ANN101", "--exclude=docs/*", "src/", "setup.py"]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
Expand All @@ -45,11 +45,11 @@ repos:
language: pygrep
types: [python]
- repo: https://github.com/collective/zpretty
rev: 2.4.1
rev: 3.1.0
hooks:
- id: zpretty
name: zpretty
- repo: https://github.com/regebro/pyroma
rev: "3.2"
rev: "4.2"
hooks:
- id: pyroma
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Changelog
3.0.2 (unreleased)
------------------

- Nothing changed yet.
- Added fields for customize header and footer logos in newsletter.
[eikichi18]


3.0.1 (2023-09-06)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@

<div style="margin-bottom: 2%;">
<span id="delete-message-sent">
<span tal:define="plone_6 context/@@plone_version/is_plone_6_or_above"
tal:attributes="class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary'"
<span tal:define="
plone_6 context/@@plone_version/is_plone_6_or_above;
"
tal:attributes="
class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary';
"
i18n:translate="delete_message_sent"
>
Cancella messaggio inviato
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div id="manage-channel"
tal:define="
plone_6 context/@@plone_version/is_plone_6_or_above;
"
i18n:domain="rer.newsletter"
tal:define="plone_6 context/@@plone_version/is_plone_6_or_above"
>
<div style="margin-bottom: 2%;">
<span id="users-manage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,19 @@
>
<span tal:replace="structure header"></span>
<tr>
<td align="left" colspan="2">
<td align="left"
colspan="2"
>
<div class="newsletterTitle">
<h1>${title}</h1>
</div>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<p class="message_core"
>Per confermare la tua richiesta di iscrizione a Newsletter ${title}, &egrave; necessario collegarsi entro 48 ore al seguente link:
<td align="left"
colspan="2"
>
<p class="message_core">Per confermare la tua richiesta di iscrizione a Newsletter ${title}, &egrave; necessario collegarsi entro 48 ore al seguente link:
<br />
<a href="${activationUrl}">${activationUrl}</a>
<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@
>
<span tal:replace="structure header"></span>
<tr>
<td align="left" colspan="2">
<td align="left"
colspan="2"
>
<div class="newsletterTitle">
<h1>${channel_name}</h1>
</div>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<td align="left"
colspan="2"
>
<p class="message_core">
La tua iscrizione alla newsletter ${channel_name} &egrave; stata effettuata con successo.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,20 @@
>
<span tal:replace="structure header"></span>
<tr>
<td align="left" colspan="2">
<td align="left"
colspan="2"
>
<div class="newsletterTitle">
<h1>${title}</h1>
</div>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<p class="message_core"
>Clicca per confermare la cancellazione
<a href="${activationUrl}">${activationUrl}</a
></p>
<td align="left"
colspan="2"
>
<p class="message_core">Clicca per confermare la cancellazione
<a href="${activationUrl}">${activationUrl}</a></p>
<br />
</td>
</tr>
Expand Down
24 changes: 17 additions & 7 deletions src/rer/newsletter/browser/channel/templates/manageusers.pt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
</a>

<div id="content-core"
tal:define="plone_6 context/@@plone_version/is_plone_6_or_above"
tal:define="
plone_6 context/@@plone_version/is_plone_6_or_above;
"
>
<div class="portalMessage"
style="display:none;"
Expand All @@ -50,35 +52,43 @@

<div style="margin-bottom: 2%;">
<span id="users-import">
<a tal:attributes="class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary'"
id="button-import-users"
<a id="button-import-users"
href="users_import"
tal:attributes="
class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary';
"
i18n:translate="import_user_list"
>
Import Users List
</a>
</span>

<span id="users-export">
<span tal:attributes="class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary'"
<span tal:attributes="
class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary';
"
i18n:translate="export_user_list"
>
Export Users List
</span>
</span>

<span id="add-user">
<a tal:attributes="class python: plone_6 and 'btn btn-large btn-primary' or 'plone-btn plone-btn-large plone-btn-primary'"
id="button-add-user"
<a id="button-add-user"
href="adduser_channel"
tal:attributes="
class python: plone_6 and 'btn btn-large btn-primary' or 'plone-btn plone-btn-large plone-btn-primary';
"
i18n:translate="add_user"
>
Add User
</a>
</span>

<span id="delete-user">
<span tal:attributes="class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary'"
<span tal:attributes="
class python: plone_6 and 'btn btn-primary' or 'plone-btn plone-btn-primary';
"
i18n:translate="delete_user"
>
Delete User
Expand Down
10 changes: 7 additions & 3 deletions src/rer/newsletter/browser/channel/templates/subscribechannel.pt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
<metal:main-macro define-macro="main">

<div id="content">
<button tal:define="plone_6 context/@@plone_version/is_plone_6_or_above"
tal:attributes="class python: plone_6 and 'button-plone-modal-close btn' or 'button-plone-modal-close plone-btn'"
title="chiudi"
<button title="chiudi"
type="button"
tal:define="
plone_6 context/@@plone_version/is_plone_6_or_above;
"
tal:attributes="
class python: plone_6 and 'button-plone-modal-close btn' or 'button-plone-modal-close plone-btn';
"
>Chiudi</button>

<div class="content_container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
tal:condition="view/form_instance/isVisible"
tal:content="structure view/contents"
></div>
<button tal:define="plone_6 context/@@plone_version/is_plone_6_or_above"
tal:attributes="class python: plone_6 and 'button-plone-modal-close btn' or 'button-plone-modal-close plone-btn'"
title="chiudi"
<button title="chiudi"
type="button"
tal:define="
plone_6 context/@@plone_version/is_plone_6_or_above;
"
tal:attributes="
class python: plone_6 and 'button-plone-modal-close btn' or 'button-plone-modal-close plone-btn';
"
>Chiudi</button>
<div class="filter">
<div class="portalMessage error"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div id="manage-message"
tal:define="
plone_6 context/@@plone_version/is_plone_6_or_above;
"
i18n:domain="rer.newsletter"
tal:define="plone_6 context/@@plone_version/is_plone_6_or_above"
>
<div style="margin-bottom: 2%;">
<span id="message-preview">
Expand Down
23 changes: 23 additions & 0 deletions src/rer/newsletter/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from collective.volto.blocksfield.field import BlocksField
from plone import schema
from plone.app.contenttypes.interfaces import ICollection
from plone.namedfile import field as namedfile
from plone.supermodel import model
from rer.newsletter import _
from zope.interface import Interface
Expand Down Expand Up @@ -117,6 +118,28 @@ class IChannelSchema(model.Schema):
required=False,
)

logo_header_mail = namedfile.NamedBlobImage(
title=_("logo_header_mail", default="Logo per l'header delle e-mail"),
description=_(
"description_logo_header_mail",
default="Aggiungi il logo da inserire nell'header della mail, "
"copia il link e inseriscilo a mano nel campo HTML "
"dell'header",
),
required=False,
)

logo_footer_mail = namedfile.NamedBlobImage(
title=_("logo_footer_mail", default="Logo per il footer delle e-mail"),
description=_(
"description_logo_footer_mail",
default="Aggiungi il logo da inserire nel footer della mail, "
"copia il link e inseriscilo a mano nel campo HTML "
"del footer",
),
required=False,
)


class IMessage(Interface):
"""Marker interface that define a message"""
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5467,14 +5467,14 @@ interpret@^3.1.1:
integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==

ip@^1.1.8:
version "1.1.8"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
version "1.1.9"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396"
integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==

ip@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
version "2.0.1"
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==

[email protected]:
version "1.9.1"
Expand Down

0 comments on commit 63cc82b

Please sign in to comment.