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
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
...
@@ -2,10 +2,18 @@
...
@@ -2,10 +2,18 @@
<ZopeData>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<pickle>
<global
name=
"
StringField"
module=
"Products.Formulator.StandardFields
"
/>
<global
name=
"
ProxyField"
module=
"Products.ERP5Form.ProxyField
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_title
</string>
</value>
<value>
<string>
my_title
</string>
</value>
...
@@ -18,14 +26,6 @@
...
@@ -18,14 +26,6 @@
<key>
<string>
external_validator_failed
</string>
</key>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</item>
<item>
<key>
<string>
required_not_found
</string>
</key>
<value>
<string>
Input is required but no input given.
</string>
</value>
</item>
<item>
<key>
<string>
too_long
</string>
</key>
<value>
<string>
Too much input was given.
</string>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -34,75 +34,11 @@
...
@@ -34,75 +34,11 @@
<value>
<value>
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
alternate_name
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
hidden
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
truncate
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -113,77 +49,17 @@
...
@@ -113,77 +49,17 @@
<value>
<value>
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
alternate_name
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
hidden
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<key>
<string>
truncate
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -192,76 +68,16 @@
...
@@ -192,76 +68,16 @@
<value>
<value>
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
alternate_name
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
my_title
</string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<int>
20
</int>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
enabled
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string>
text
</string>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Title AUTOGENERATED
</string>
</value>
<value>
<string>
Title Autogenerated
</string>
</value>
</item>
<item>
<key>
<string>
truncate
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</item>
</dictionary>
</dictionary>
</value>
</value>
...
...
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