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
Papa Tamsir Kane
erp5
Commits
ac9bbe6b
Commit
ac9bbe6b
authored
Aug 25, 2017
by
Papa Tamsir Kane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_curation_request: Change reference getter
parent
2994c68f
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
93 additions
and
219 deletions
+93
-219
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_getAggregateLabel.py
...curation_request/CurationRequestLine_getAggregateLabel.py
+5
-0
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_getAggregateLabel.xml
...uration_request/CurationRequestLine_getAggregateLabel.xml
+62
-0
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view.xml
..._skins/erp5_curation_request/CurationRequestLine_view.xml
+1
-1
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view/my_aggregate_title.xml
...n_request/CurationRequestLine_view/my_aggregate_title.xml
+1
-1
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view/my_reference.xml
...uration_request/CurationRequestLine_view/my_reference.xml
+1
-1
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view/my_title.xml
...p5_curation_request/CurationRequestLine_view/my_title.xml
+18
-202
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequest_init.py
...ortal_skins/erp5_curation_request/CurationRequest_init.py
+3
-7
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequest_view/my_reference.xml
...p5_curation_request/CurationRequest_view/my_reference.xml
+1
-1
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/Object_getIncrementalReference.py
...s/erp5_curation_request/Object_getIncrementalReference.py
+0
-5
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/Object_getIncrementalReference.xml
.../erp5_curation_request/Object_getIncrementalReference.xml
+1
-1
No files found.
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_getAggregateLabel.py
0 → 100644
View file @
ac9bbe6b
aggregate
=
context
.
getAggregateValue
()
if
aggregate
is
not
None
:
return
context
.
Base_translateString
(
aggregate
.
getPortalType
())
else
:
return
'Curation Record(s) / Url(s)'
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_getAggregateLabel.xml
0 → 100644
View file @
ac9bbe6b
<?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>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
CurationRequestLine_getAggregateLabel
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view.xml
View file @
ac9bbe6b
...
@@ -73,8 +73,8 @@
...
@@ -73,8 +73,8 @@
<value>
<value>
<list>
<list>
<string>
my_reference
</string>
<string>
my_reference
</string>
<string>
my_title
</string>
<string>
my_aggregate_title
</string>
<string>
my_aggregate_title
</string>
<string>
my_title
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view/my_aggregate_title.xml
View file @
ac9bbe6b
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
here.Base_translateString(here.getAggregateValue().getPortalType()
)
</string>
</value>
<value>
<string>
python:
context.CurationRequestLine_getAggregateLabel(
)
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view/my_reference.xml
View file @
ac9bbe6b
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.
CurationRequest_get
Reference(generator_id_group=\'curation_request_line_reference\')
</string>
</value>
<value>
<string>
python: context.
Object_getIncremental
Reference(generator_id_group=\'curation_request_line_reference\')
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequestLine_view/my_title.xml
View file @
ac9bbe6b
This diff is collapsed.
Click to expand it.
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequest_init.py
View file @
ac9bbe6b
portal
=
context
.
getPortalObject
()
translate
=
portal
.
Base_translateString
assignment_dict
=
portal
.
ERP5Site_getPersonAssignmentDict
()
#new_curation_record_title = 'curation_record_for_{}'.format(curation_request.getTitle())
curation_record
=
context
.
curation_record_module
.
newContent
(
portal_type
=
'Curation Record'
)
curation_record
=
context
.
curation_record_module
.
newContent
(
portal_type
=
'Curation Record'
)
curation_record_line
=
context
.
newContent
(
portal_type
=
'Curation Request Line'
,
curation_record_line
=
context
.
newContent
(
portal_type
=
'Curation Request Line'
,
aggregate_value
=
curation_record
,
aggregate_value
=
curation_record
,
quantity
=
1
,)
quantity
=
1
)
# set reference
curation_record_line
.
Object_getIncrementalReference
(
generator_id_group
=
'curation_request_line_reference'
)
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/CurationRequest_view/my_reference.xml
View file @
ac9bbe6b
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: context.
CurationRequest_get
Reference(generator_id_group=\'curation_request_reference\')
</string>
</value>
<value>
<string>
python: context.
Object_getIncremental
Reference(generator_id_group=\'curation_request_reference\')
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/
CurationRequest_get
Reference.py
→
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/
Object_getIncremental
Reference.py
View file @
ac9bbe6b
reference
=
context
.
getReference
()
reference
=
context
.
getReference
()
from
DateTime
import
DateTime
from
DateTime
import
DateTime
'''
class MyException(Exception):
pass
raise MyException()
'''
if
reference
:
if
reference
:
return
reference
return
reference
else
:
else
:
...
...
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/
CurationRequest_get
Reference.xml
→
bt5/erp5_curation_request/SkinTemplateItem/portal_skins/erp5_curation_request/
Object_getIncremental
Reference.xml
View file @
ac9bbe6b
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
CurationRequest_get
Reference
</string>
</value>
<value>
<string>
Object_getIncremental
Reference
</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