Skip to content

Commit

Permalink
[fc] Repository: Products.Archetypes
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2016-11-12T22:37:34-08:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: plone/Products.Archetypes@0730de3

move show_id.py from CMFPlone to Archetypes

Files changed:
A Products/Archetypes/skins/archetypes/show_id.py
M CHANGES.rst
Repository: Products.Archetypes
Branch: refs/heads/master
Date: 2016-11-13T09:48:43+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/Products.Archetypes@39cfa06

Merge pull request #70 from plone/davisagli-cleanup-scripts

move show_id.py from CMFPlone to Archetypes

Files changed:
A Products/Archetypes/skins/archetypes/show_id.py
M CHANGES.rst
  • Loading branch information
gforcada committed Nov 13, 2016
1 parent 09af332 commit dca016d
Showing 1 changed file with 87 additions and 54 deletions.
141 changes: 87 additions & 54 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,79 +1,112 @@
Repository: Products.CMFPlone
Repository: Products.Archetypes


Branch: refs/heads/master
Date: 2016-11-13T00:21:16+01:00
Author: Gil Forcada (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/Products.CMFPlone/commit/fa8a06db834b0cb88da3db6ab1d09a8c0f7e0c37
Date: 2016-11-12T22:37:34-08:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: https://github.com/plone/Products.Archetypes/commit/0730de3ca05fc778881a7c28e2c86b679e25caf9

Remove metadata file

The matching python code was removed in
f066230157c74e3e6399298ad1abe054ef08a494
move show_id.py from CMFPlone to Archetypes

Files changed:
A Products/Archetypes/skins/archetypes/show_id.py
M CHANGES.rst
D Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata

diff --git a/CHANGES.rst b/CHANGES.rst
index 403ef56..5344cf3 100644
index 4c32fba..599cf9a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -31,7 +31,7 @@ Breaking changes:
- ``getGlobalPortalRoles.py``
- ``getNotAddableTypes.py``
- ``getPopupScript.py``
- - ``getPortalTypeList.py``
+ - ``getPortalTypeList.py`` and metadata
- ``getPortalTypes.py``
- ``getSelectableViews.py`` with tests
- ``hasIndexHtml.py`` with tests
diff --git a/Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata b/Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata
deleted file mode 100644
index f24df46..0000000
--- a/Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata
+++ /dev/null
@@ -1,2 +0,0 @@
-[default]
-title=Get list of portal type icons


Repository: Products.CMFPlone
@@ -14,9 +14,11 @@ New features:
Make AnnotationStorage awareness of it optional.
[jensens]

-- moved script ``date_components_support.py`` from CMFPlone over here,
- hence its only used here.
- [jensens]
+- Moved scripts that are only used by Archetypes from CMFPlone
+ to Products.Archetypes:
+ - ``date_components_support.py``
+ - ``show_id.py``
+ [jensens, davisagli]

Bug fixes:

diff --git a/Products/Archetypes/skins/archetypes/show_id.py b/Products/Archetypes/skins/archetypes/show_id.py
new file mode 100644
index 0000000..70f84fe
--- /dev/null
+++ b/Products/Archetypes/skins/archetypes/show_id.py
@@ -0,0 +1,14 @@
+## Script (Python) "show_id"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=Determine whether to show an id in an edit form
+
+if context.plone_utils.isIDAutoGenerated(context.REQUEST.get('id', None) \
+ or context.getId()):
+ return not (context.portal_factory.isTemporary(context)
+ or context.CreationDate() == context.ModificationDate())
+return 1


Repository: Products.Archetypes


Branch: refs/heads/master
Date: 2016-11-12T22:32:54-08:00
Author: David Glick (davisagli) <david.glick@plone.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/a9b90b25cb8963526063447d7d237847705e143a
Date: 2016-11-13T09:48:43+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/Products.Archetypes/commit/39cfa06aa272229724e5eac58031317b4a31bf79

Merge pull request #1834 from plone/gforcada-remove-metadata
Merge pull request #70 from plone/davisagli-cleanup-scripts

Remove metadata file
move show_id.py from CMFPlone to Archetypes

Files changed:
A Products/Archetypes/skins/archetypes/show_id.py
M CHANGES.rst
D Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata

diff --git a/CHANGES.rst b/CHANGES.rst
index 90fbcc4..207371b 100644
index 4c32fba..599cf9a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -32,7 +32,7 @@ Breaking changes:
- ``getGlobalPortalRoles.py``
- ``getNotAddableTypes.py``
- ``getPopupScript.py``
- - ``getPortalTypeList.py``
+ - ``getPortalTypeList.py`` and metadata
- ``getPortalTypes.py``
- ``getSelectableViews.py`` with tests
- ``hasIndexHtml.py`` with tests
diff --git a/Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata b/Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata
deleted file mode 100644
index f24df46..0000000
--- a/Products/CMFPlone/skins/plone_scripts/getPortalTypeList.py.metadata
+++ /dev/null
@@ -1,2 +0,0 @@
-[default]
-title=Get list of portal type icons
@@ -14,9 +14,11 @@ New features:
Make AnnotationStorage awareness of it optional.
[jensens]

-- moved script ``date_components_support.py`` from CMFPlone over here,
- hence its only used here.
- [jensens]
+- Moved scripts that are only used by Archetypes from CMFPlone
+ to Products.Archetypes:
+ - ``date_components_support.py``
+ - ``show_id.py``
+ [jensens, davisagli]

Bug fixes:

diff --git a/Products/Archetypes/skins/archetypes/show_id.py b/Products/Archetypes/skins/archetypes/show_id.py
new file mode 100644
index 0000000..70f84fe
--- /dev/null
+++ b/Products/Archetypes/skins/archetypes/show_id.py
@@ -0,0 +1,14 @@
+## Script (Python) "show_id"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=Determine whether to show an id in an edit form
+
+if context.plone_utils.isIDAutoGenerated(context.REQUEST.get('id', None) \
+ or context.getId()):
+ return not (context.portal_factory.isTemporary(context)
+ or context.CreationDate() == context.ModificationDate())
+return 1


0 comments on commit dca016d

Please sign in to comment.