Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
erp5
Commits
7bf59d6f
Commit
7bf59d6f
authored
Mar 25, 2020
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: get latest Letter Post for the Letter's preview
parent
74e43c89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
3 deletions
+99
-3
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_renderForPreview.py
..._skins/erp5_corporate_identity/Letter_renderForPreview.py
+10
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_renderForPreview.xml
...skins/erp5_corporate_identity/Letter_renderForPreview.xml
+62
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_viewPreview/content.xml
...ns/erp5_corporate_identity/Letter_viewPreview/content.xml
+27
-3
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_renderForPreview.py
0 → 100644
View file @
7bf59d6f
if
context
.
getSimulationState
()
in
(
'started'
,
'stop'
,
'delivered'
)
\
and
context
.
getAggregate
(
portal_type
=
'Letter Post'
)
is
not
None
:
# Get the latest Letter Post, in case the Letter was sent
# more than once. We can load objects into memory, as this case must be
# extremeley rare
return
sorted
(
context
.
getAggregateValueList
(
portal_type
=
'Letter Post'
),
key
=
lambda
x
:
x
.
getCreationDate
()
)[
-
1
].
absolute_url
()
+
"/getData"
return
context
.
getTextContent
()
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_renderForPreview.xml
0 → 100644
View file @
7bf59d6f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Letter_renderForPreview
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Letter_viewPreview/content.xml
View file @
7bf59d6f
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<value>
<value>
<list>
<list>
<string>
default
</string>
<string>
default
</string>
<string>
enabled
</string>
<string>
renderjs_extra
</string>
<string>
renderjs_extra
</string>
<string>
title
</string>
<string>
title
</string>
</list>
</list>
...
@@ -56,6 +57,12 @@
...
@@ -56,6 +57,12 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
field_id
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
...
@@ -67,7 +74,7 @@
...
@@ -67,7 +74,7 @@
<item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -85,6 +92,10 @@
...
@@ -85,6 +92,10 @@
<key>
<string>
default
</string>
</key>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<item>
<key>
<string>
field_id
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_text_content
</string>
</value>
<value>
<string>
my_view_mode_text_content
</string>
</value>
...
@@ -117,7 +128,7 @@
...
@@ -117,7 +128,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
context.Letter_getPredecessor(context_url=context.getRelativeUrl()).absolute_url()+\'/getData\'
</string>
</value>
<value>
<string>
python:
here.Letter_renderForPreview()
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
@@ -130,7 +141,20 @@
...
@@ -130,7 +141,20 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.Letter_getRenderJSExtraPreviewParameterList(context_url=context.getRelativeUrl())
</string>
</value>
<value>
<string>
python: here.getAggregate(portal_type="Letter Post")
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(\'editor\', here.getAggregateValue(portal_type=\'Letter Post\', default=context).Base_getEditorFieldPreferredTextEditor()), (\'maximize\', True)]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment