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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
c8dee291
Commit
c8dee291
authored
Mar 18, 2015
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web: add uncommited work
parent
b73261e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
179 additions
and
3 deletions
+179
-3
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_generateSectionFromCategory.xml
...skins/erp5_web/WebSection_generateSectionFromCategory.xml
+10
-3
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_viewGenerateSectionFromCategoryDialog.xml
..._web/WebSection_viewGenerateSectionFromCategoryDialog.xml
+1
-0
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_viewGenerateSectionFromCategoryDialog/your_generate_nice_id.xml
...nerateSectionFromCategoryDialog/your_generate_nice_id.xml
+168
-0
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_generateSectionFromCategory.xml
View file @
c8dee291
...
...
@@ -60,13 +60,13 @@
category -- the category to use\n
"""\n
from ZODB.POSException import ConflictError\n
\n
portal = context.getPortalObject()
\n
translateString = context.Base_translateString\n
category_tool = context.portal_categories\n
global section_count\n
section_count = 0\n
failed_list = []\n
\n
portal_type_list = portal.getPortalDocumentTypeList()
\n
valid_char = "abcdefghijklmnopqrstuvwxyz0123456789-_"\n
\n
def getNiceID(s):\n
...
...
@@ -125,7 +125,9 @@ def createWebSectionFromCategoryValue(container, category, depth, section_id=Non
, visible = True\n
, membership_criterion_base_category = (base_category_id,)\n
, membership_criterion_category = (category_url,)\n
, criterion_property_list = [\'portal_type\']\n
)\n
new_section.setCriterion(\'portal_type\', identity=portal_type_list)\n
new_section.updateLocalRolesOnSecurityGroups()\n
except ConflictError:\n
raise\n
...
...
@@ -145,7 +147,9 @@ def createWebSectionFromCategoryValue(container, category, depth, section_id=Non
, visible = True\n
, membership_criterion_base_category = (base_category_id,)\n
, membership_criterion_category = (category_url,)\n
, criterion_property_list = [\'portal_type\']\n
)\n
new_section.setCriterion(\'portal_type\', identity=portal_type_list)\n
new_section.updateLocalRolesOnSecurityGroups()\n
# Call the function recursively\n
if new_section is not None:\n
...
...
@@ -173,7 +177,10 @@ if update_existing:\n
# use the base category as a category to select all\n
category_url = \'%s/%s\' % (category, category) \n
section_value.edit(membership_criterion_base_category = (base_category_id,),\n
membership_criterion_category = (category_url,))\n
membership_criterion_category = (category_url,),\n
criterion_property_list = [\'portal_type\'])\n
section_value.setCriterion(\'portal_type\', identity=portal_type_list)\n
\n
section_value.updateLocalRolesOnSecurityGroups()\n
\n
\n
...
...
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_viewGenerateSectionFromCategoryDialog.xml
View file @
c8dee291
...
...
@@ -88,6 +88,7 @@
<string>
your_depth
</string>
<string>
your_update_existing
</string>
<string>
your_remove_missing
</string>
<string>
your_generate_nice_id
</string>
</list>
</value>
</item>
...
...
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_viewGenerateSectionFromCategoryDialog/your_generate_nice_id.xml
0 → 100644
View file @
c8dee291
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"CheckBoxField"
module=
"Products.Formulator.StandardFields"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_generate_nice_id
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</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>
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>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</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>
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>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</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>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Generate a nice ID from the reference, the title or the short title instead of the category ID
</string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</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>
title
</string>
</key>
<value>
<string>
Generate Nice ID
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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