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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
d5a12352
Commit
d5a12352
authored
Jun 16, 2008
by
Mayoro Diagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
https://svn.erp5.org/repos/public/erp5/trunk@21608
20353a03-c40f-0410-a6d1-a30d3c3de9de
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):
...
@@ -265,9 +265,9 @@ class DCWorkflowDocumentationHelper(DocumentationHelper):
if
variables
is
not
None
:
if
variables
is
not
None
:
for
variable
in
variables
.
objectValues
():
for
variable
in
variables
.
objectValues
():
variable_list
.
append
((
variable
.
getId
(),
variable_list
.
append
((
variable
.
getId
(),
getattr
(
variable
,
"title"
,
""
),
getattr
(
variable
,
"title"
,
""
),
getattr
(
variable
,
"description"
,
""
)
getattr
(
variable
,
"description"
,
""
)
))
))
return
variable_list
return
variable_list
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getVariableURIList'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getVariableURIList'
)
...
@@ -388,8 +388,8 @@ class DCWorkflowDocumentationHelper(DocumentationHelper):
...
@@ -388,8 +388,8 @@ class DCWorkflowDocumentationHelper(DocumentationHelper):
if
scripts
is
not
None
:
if
scripts
is
not
None
:
for
script
in
scripts
.
objectValues
():
for
script
in
scripts
.
objectValues
():
script_list
.
append
((
getattr
(
script
,
"__name__"
,
''
),
script_list
.
append
((
getattr
(
script
,
"__name__"
,
''
),
getattr
(
script
,
"title"
,
''
)
getattr
(
script
,
"title"
,
''
)
))
))
return
script_list
return
script_list
...
...
product/ERP5Type/DocumentationHelper/DCWorkflowScriptDocumentationHelper.py
View file @
d5a12352
...
@@ -93,10 +93,10 @@ class DCWorkflowScriptDocumentationHelper(DocumentationHelper):
...
@@ -93,10 +93,10 @@ class DCWorkflowScriptDocumentationHelper(DocumentationHelper):
REQUEST
=
getattr
(
self
,
'REQUEST'
,
None
)
REQUEST
=
getattr
(
self
,
'REQUEST'
,
None
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
if
REQUEST
.
get
(
'portal_skin'
,
'View'
)
!=
'View'
:
if
REQUEST
.
get
(
'portal_skin'
,
'View'
)
!=
'View'
:
return
source_code
return
source_code
else
:
else
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
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
return
source_code
src_mimetype
=
'text/x-python'
src_mimetype
=
'text/x-python'
mime_type
=
'text/html'
mime_type
=
'text/html'
...
...
product/ERP5Type/DocumentationHelper/DCWorkflowTransitionDocumentationHelper.py
View file @
d5a12352
...
@@ -121,7 +121,7 @@ class DCWorkflowTransitionDocumentationHelper(DocumentationHelper):
...
@@ -121,7 +121,7 @@ class DCWorkflowTransitionDocumentationHelper(DocumentationHelper):
if
hasattr
(
self
.
getDocumentedObject
(),
'guard'
):
if
hasattr
(
self
.
getDocumentedObject
(),
'guard'
):
dir
(
self
.
getDocumentedObject
().
guard
)
dir
(
self
.
getDocumentedObject
().
guard
)
if
hasattr
(
self
.
getDocumentedObject
().
guard
,
'__dict__'
):
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'
]
role_list
=
self
.
getDocumentedObject
().
guard
.
__dict__
[
'roles'
]
return
', '
.
join
(
role
for
role
in
role_list
)
return
', '
.
join
(
role
for
role
in
role_list
)
...
...
product/ERP5Type/DocumentationHelper/DocumentationHelper.py
View file @
d5a12352
...
@@ -121,11 +121,11 @@ class DocumentationHelper(Implicit):
...
@@ -121,11 +121,11 @@ class DocumentationHelper(Implicit):
zope_property_sheet
=
instance_home
+
'/PropertySheet'
zope_property_sheet
=
instance_home
+
'/PropertySheet'
list_propertysheets
=
[
zope_property_sheet
,]
list_propertysheets
=
[
zope_property_sheet
,]
for
path
in
list_path
:
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'
):
if
os
.
path
.
isdir
(
full_path
)
and
os
.
path
.
exists
(
full_path
+
'/PropertySheet'
):
list_propertysheets
.
append
(
full_path
+
'/PropertySheet'
)
list_propertysheets
.
append
(
full_path
+
'/PropertySheet'
)
for
propertysheet_directory
in
list_propertysheets
:
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
file_url
=
propertysheet_directory
+
'/'
+
file_name
documented_object
=
open
(
file_url
)
documented_object
=
open
(
file_url
)
elif
'/'
in
self
.
uri
and
'#'
not
in
self
.
uri
:
elif
'/'
in
self
.
uri
and
'#'
not
in
self
.
uri
:
...
@@ -134,20 +134,20 @@ class DocumentationHelper(Implicit):
...
@@ -134,20 +134,20 @@ class DocumentationHelper(Implicit):
try
:
try
:
documented_object
=
self
.
getPortalObject
().
portal_categories
.
resolveCategory
(
self
.
uri
)
documented_object
=
self
.
getPortalObject
().
portal_categories
.
resolveCategory
(
self
.
uri
)
except
:
except
:
documented_object
=
None
documented_object
=
None
if
documented_object
is
None
:
if
documented_object
is
None
:
documented_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
self
.
uri
)
documented_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
self
.
uri
)
elif
'/'
in
self
.
uri
and
'#'
in
self
.
uri
:
elif
'/'
in
self
.
uri
and
'#'
in
self
.
uri
:
if
'?'
in
self
.
uri
:
if
'?'
in
self
.
uri
:
base_url
,
url
=
self
.
uri
.
split
(
'?'
)
base_url
,
url
=
self
.
uri
.
split
(
'?'
)
type
,
name
=
url
.
split
(
'#'
)
type
,
name
=
url
.
split
(
'#'
)
parent_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
base_url
)
parent_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
base_url
)
object_list
=
getattr
(
parent_object
,
type
,
None
)
object_list
=
getattr
(
parent_object
,
type
,
None
)
documented_object
=
None
documented_object
=
None
if
object_list
is
not
None
:
if
object_list
is
not
None
:
for
obj
in
object_list
:
for
obj
in
object_list
:
if
obj
.
__name__
==
name
:
if
obj
.
__name__
==
name
:
documented_object
=
obj
documented_object
=
obj
else
:
else
:
url
,
method
=
self
.
uri
.
split
(
'#'
)
url
,
method
=
self
.
uri
.
split
(
'#'
)
documented_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
url
)
documented_object
=
self
.
getPortalObject
().
unrestrictedTraverse
(
url
)
...
@@ -171,7 +171,7 @@ class DocumentationHelper(Implicit):
...
@@ -171,7 +171,7 @@ class DocumentationHelper(Implicit):
for
key
in
module_list
[
1
:]:
for
key
in
module_list
[
1
:]:
documented_object
=
getattr
(
documented_object
,
key
)
documented_object
=
getattr
(
documented_object
,
key
)
else
:
else
:
raise
NotImplemented
raise
NotImplemented
#fp, pathname, description = imp.find_module(base_module)
#fp, pathname, description = imp.find_module(base_module)
#documented_object = imp.load_module(fp, pathname, description)
#documented_object = imp.load_module(fp, pathname, description)
return
documented_object
return
documented_object
...
...
product/ERP5Type/DocumentationHelper/ERP5SiteDocumentationHelper.py
View file @
d5a12352
...
@@ -88,7 +88,7 @@ class ERP5SiteDocumentationHelper(DocumentationHelper):
...
@@ -88,7 +88,7 @@ class ERP5SiteDocumentationHelper(DocumentationHelper):
for
bt
in
self
.
getDocumentedObject
().
portal_templates
.
objectValues
():
for
bt
in
self
.
getDocumentedObject
().
portal_templates
.
objectValues
():
current_state
=
''
current_state
=
''
for
wh
in
bt
.
workflow_history
[
'business_template_installation_workflow'
]:
for
wh
in
bt
.
workflow_history
[
'business_template_installation_workflow'
]:
current_state
=
wh
[
'installation_state'
]
current_state
=
wh
[
'installation_state'
]
if
current_state
==
'installed'
:
if
current_state
==
'installed'
:
bt_list
.
append
(
bt
.
getId
())
bt_list
.
append
(
bt
.
getId
())
return
bt_list
return
bt_list
...
@@ -106,11 +106,11 @@ class ERP5SiteDocumentationHelper(DocumentationHelper):
...
@@ -106,11 +106,11 @@ class ERP5SiteDocumentationHelper(DocumentationHelper):
current_state
=
wh
[
'installation_state'
]
current_state
=
wh
[
'installation_state'
]
if
current_state
==
'installed'
:
if
current_state
==
'installed'
:
bt_list
.
append
((
bt
.
getId
(),
bt_list
.
append
((
bt
.
getId
(),
getattr
(
bt
,
"title"
,
''
),
getattr
(
bt
,
"title"
,
''
),
getattr
(
bt
,
"description"
,
''
),
getattr
(
bt
,
"description"
,
''
),
getattr
(
bt
,
"version"
,
''
),
getattr
(
bt
,
"version"
,
''
),
getattr
(
bt
,
"revision"
,
''
)
getattr
(
bt
,
"revision"
,
''
)
))
))
return
bt_list
return
bt_list
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getBusinessTemplateURIList'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getBusinessTemplateURIList'
)
...
...
product/ERP5Type/DocumentationHelper/PageTemplateDocumentationHelper.py
View file @
d5a12352
...
@@ -74,7 +74,7 @@ class PageTemplateDocumentationHelper(DocumentationHelper):
...
@@ -74,7 +74,7 @@ class PageTemplateDocumentationHelper(DocumentationHelper):
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
if
portal_transforms
is
None
:
if
portal_transforms
is
None
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
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
return
source_code
src_mimetype
=
'text/plain'
src_mimetype
=
'text/plain'
mime_type
=
'text/html'
mime_type
=
'text/html'
...
...
product/ERP5Type/DocumentationHelper/PortalTypePropertySheetDocumentationHelper.py
View file @
d5a12352
...
@@ -78,7 +78,7 @@ class PortalTypePropertySheetDocumentationHelper(DocumentationHelper):
...
@@ -78,7 +78,7 @@ class PortalTypePropertySheetDocumentationHelper(DocumentationHelper):
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
if
portal_transforms
is
None
:
if
portal_transforms
is
None
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
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
return
source_code
src_mimetype
=
'text/x-python'
src_mimetype
=
'text/x-python'
mime_type
=
'text/html'
mime_type
=
'text/html'
...
...
product/ERP5Type/DocumentationHelper/ScriptPythonDocumentationHelper.py
View file @
d5a12352
...
@@ -73,7 +73,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
...
@@ -73,7 +73,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
portal_transforms
=
getattr
(
self
,
'portal_transforms'
,
None
)
if
portal_transforms
is
None
:
if
portal_transforms
is
None
:
LOG
(
'DCWorkflowScriptDocumentationHelper'
,
INFO
,
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
return
source_code
src_mimetype
=
'text/x-python'
src_mimetype
=
'text/x-python'
mime_type
=
'text/html'
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