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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
erp5
Commits
d5a12352
Commit
d5a12352
authored
Jun 16, 2008
by
Mayoro Diagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
348e8bd5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
29 deletions
+29
-29
product/ERP5Type/DocumentationHelper/DCWorkflowDocumentationHelper.py
...Type/DocumentationHelper/DCWorkflowDocumentationHelper.py
+5
-5
product/ERP5Type/DocumentationHelper/DCWorkflowScriptDocumentationHelper.py
...ocumentationHelper/DCWorkflowScriptDocumentationHelper.py
+2
-2
product/ERP5Type/DocumentationHelper/DCWorkflowTransitionDocumentationHelper.py
...entationHelper/DCWorkflowTransitionDocumentationHelper.py
+1
-1
product/ERP5Type/DocumentationHelper/DocumentationHelper.py
product/ERP5Type/DocumentationHelper/DocumentationHelper.py
+12
-12
product/ERP5Type/DocumentationHelper/ERP5SiteDocumentationHelper.py
...P5Type/DocumentationHelper/ERP5SiteDocumentationHelper.py
+6
-6
product/ERP5Type/DocumentationHelper/PageTemplateDocumentationHelper.py
...pe/DocumentationHelper/PageTemplateDocumentationHelper.py
+1
-1
product/ERP5Type/DocumentationHelper/PortalTypePropertySheetDocumentationHelper.py
...ationHelper/PortalTypePropertySheetDocumentationHelper.py
+1
-1
product/ERP5Type/DocumentationHelper/ScriptPythonDocumentationHelper.py
...pe/DocumentationHelper/ScriptPythonDocumentationHelper.py
+1
-1
No files found.
product/ERP5Type/DocumentationHelper/DCWorkflowDocumentationHelper.py
View file @
d5a12352
...
...
@@ -265,9 +265,9 @@ class DCWorkflowDocumentationHelper(DocumentationHelper):
if
variables
is
not
None
:
for
variable
in
variables
.
objectValues
():
variable_list
.
append
((
variable
.
getId
(),
getattr
(
variable
,
"title"
,
""
),
getattr
(
variable
,
"description"
,
""
)
))
getattr
(
variable
,
"title"
,
""
),
getattr
(
variable
,
"description"
,
""
)
))
return
variable_list
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getVariableURIList'
)
...
...
@@ -388,8 +388,8 @@ class DCWorkflowDocumentationHelper(DocumentationHelper):
if
scripts
is
not
None
:
for
script
in
scripts
.
objectValues
():
script_list
.
append
((
getattr
(
script
,
"__name__"
,
''
),
getattr
(
script
,
"title"
,
''
)
))
getattr
(
script
,
"title"
,
''
)
))
return
script_list
...
...
product/ERP5Type/DocumentationHelper/DCWorkflowScriptDocumentationHelper.py
View file @
d5a12352
...
...
@@ -93,10 +93,10 @@ class DCWorkflowScriptDocumentationHelper(DocumentationHelper):
REQUEST
=
getattr
(
self
,
'REQUEST'
,
None
)
if
REQUEST
is
not
None
:
if
REQUEST
.
get
(
'portal_skin'
,
'View'
)
!=
'View'
:
return
source_code
return
source_code
else
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
'Transformation Tool is not installed. No convertion of python script to html'
)
'Transformation Tool is not installed. No convertion of python script to html'
)
return
source_code
src_mimetype
=
'text/x-python'
mime_type
=
'text/html'
...
...
product/ERP5Type/DocumentationHelper/DCWorkflowTransitionDocumentationHelper.py
View file @
d5a12352
...
...
@@ -121,7 +121,7 @@ class DCWorkflowTransitionDocumentationHelper(DocumentationHelper):
if
hasattr
(
self
.
getDocumentedObject
(),
'guard'
):
dir
(
self
.
getDocumentedObject
().
guard
)
if
hasattr
(
self
.
getDocumentedObject
().
guard
,
'__dict__'
):
if
'roles'
in
self
.
getDocumentedObject
().
guard
.
__dict__
.
keys
():
if
'roles'
in
self
.
getDocumentedObject
().
guard
.
__dict__
.
keys
():
role_list
=
self
.
getDocumentedObject
().
guard
.
__dict__
[
'roles'
]
return
', '
.
join
(
role
for
role
in
role_list
)
...
...
product/ERP5Type/DocumentationHelper/DocumentationHelper.py
View file @
d5a12352
...
...
@@ -121,11 +121,11 @@ class DocumentationHelper(Implicit):
zope_property_sheet
=
instance_home
+
'/PropertySheet'
list_propertysheets
=
[
zope_property_sheet
,]
for
path
in
list_path
:
full_path
=
instance_home
+
'/Products/'
+
path
full_path
=
instance_home
+
'/Products/'
+
path
if
os
.
path
.
isdir
(
full_path
)
and
os
.
path
.
exists
(
full_path
+
'/PropertySheet'
):
list_propertysheets
.
append
(
full_path
+
'/PropertySheet'
)
for
propertysheet_directory
in
list_propertysheets
:
if
os
.
path
.
exists
(
propertysheet_directory
+
'/'
+
file_name
):
if
os
.
path
.
exists
(
propertysheet_directory
+
'/'
+
file_name
):
file_url
=
propertysheet_directory
+
'/'
+
file_name
documented_object
=
open
(
file_url
)
elif
'/'
in
self
.
uri
and
'#'
not
in
self
.
uri
:
...
...
@@ -134,20 +134,20 @@ class DocumentationHelper(Implicit):
try
:
documented_object
=
self
.
getPortalObject
().
portal_categories
.
resolveCategory
(
self
.
uri
)
except
:
documented_object
=
None
documented_object
=
None
if
documented_object
is
None
:
documented_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
self
.
uri
)
elif
'/'
in
self
.
uri
and
'#'
in
self
.
uri
:
if
'?'
in
self
.
uri
:
base_url
,
url
=
self
.
uri
.
split
(
'?'
)
type
,
name
=
url
.
split
(
'#'
)
parent_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
base_url
)
object_list
=
getattr
(
parent_object
,
type
,
None
)
documented_object
=
None
if
object_list
is
not
None
:
base_url
,
url
=
self
.
uri
.
split
(
'?'
)
type
,
name
=
url
.
split
(
'#'
)
parent_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
base_url
)
object_list
=
getattr
(
parent_object
,
type
,
None
)
documented_object
=
None
if
object_list
is
not
None
:
for
obj
in
object_list
:
if
obj
.
__name__
==
name
:
documented_object
=
obj
if
obj
.
__name__
==
name
:
documented_object
=
obj
else
:
url
,
method
=
self
.
uri
.
split
(
'#'
)
documented_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
url
)
...
...
@@ -171,7 +171,7 @@ class DocumentationHelper(Implicit):
for
key
in
module_list
[
1
:]:
documented_object
=
getattr
(
documented_object
,
key
)
else
:
raise
NotImplemented
raise
NotImplemented
#fp, pathname, description = imp.find_module(base_module)
#documented_object = imp.load_module(fp, pathname, description)
return
documented_object
...
...
product/ERP5Type/DocumentationHelper/ERP5SiteDocumentationHelper.py
View file @
d5a12352
...
...
@@ -88,7 +88,7 @@ class ERP5SiteDocumentationHelper(DocumentationHelper):
for
bt
in
self
.
getDocumentedObject
().
portal_templates
.
objectValues
():
current_state
=
''
for
wh
in
bt
.
workflow_history
[
'business_template_installation_workflow'
]:
current_state
=
wh
[
'installation_state'
]
current_state
=
wh
[
'installation_state'
]
if
current_state
==
'installed'
:
bt_list
.
append
(
bt
.
getId
())
return
bt_list
...
...
@@ -106,11 +106,11 @@ class ERP5SiteDocumentationHelper(DocumentationHelper):
current_state
=
wh
[
'installation_state'
]
if
current_state
==
'installed'
:
bt_list
.
append
((
bt
.
getId
(),
getattr
(
bt
,
"title"
,
''
),
getattr
(
bt
,
"description"
,
''
),
getattr
(
bt
,
"version"
,
''
),
getattr
(
bt
,
"revision"
,
''
)
))
getattr
(
bt
,
"title"
,
''
),
getattr
(
bt
,
"description"
,
''
),
getattr
(
bt
,
"version"
,
''
),
getattr
(
bt
,
"revision"
,
''
)
))
return
bt_list
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getBusinessTemplateURIList'
)
...
...
product/ERP5Type/DocumentationHelper/PageTemplateDocumentationHelper.py
View file @
d5a12352
...
...
@@ -74,7 +74,7 @@ class PageTemplateDocumentationHelper(DocumentationHelper):
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
if
portal_transforms
is
None
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
'Transformation Tool is not installed. No convertion of python script to html'
)
'Transformation Tool is not installed. No convertion of python script to html'
)
return
source_code
src_mimetype
=
'text/plain'
mime_type
=
'text/html'
...
...
product/ERP5Type/DocumentationHelper/PortalTypePropertySheetDocumentationHelper.py
View file @
d5a12352
...
...
@@ -78,7 +78,7 @@ class PortalTypePropertySheetDocumentationHelper(DocumentationHelper):
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
if
portal_transforms
is
None
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
'Transformation Tool is not installed. No convertion of python script to html'
)
'Transformation Tool is not installed. No convertion of python script to html'
)
return
source_code
src_mimetype
=
'text/x-python'
mime_type
=
'text/html'
...
...
product/ERP5Type/DocumentationHelper/ScriptPythonDocumentationHelper.py
View file @
d5a12352
...
...
@@ -73,7 +73,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
if
portal_transforms
is
None
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
'Transformation Tool is not installed. No convertion of python script to html'
)
'Transformation Tool is not installed. No convertion of python script to html'
)
return
source_code
src_mimetype
=
'text/x-python'
mime_type
=
'text/html'
...
...
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