From f13b7ea307a3596608f45f57c18c8b4a95fe90fe Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 6 Oct 2011 16:27:58 +0200 Subject: [PATCH] appy.gen: various bugfixes and minor improvements. --- gen/__init__.py | 6 +++--- gen/plone25/mixins/__init__.py | 5 +++-- gen/plone25/skin/appy.css | 20 ++++++++++++++------ gen/plone25/skin/nextPhase.png | Bin 201 -> 211 bytes gen/plone25/skin/portlet.pt | 18 +++++++++++------- 5 files changed, 31 insertions(+), 18 deletions(-) diff --git a/gen/__init__.py b/gen/__init__.py index 4cefd86..22c4eb9 100644 --- a/gen/__init__.py +++ b/gen/__init__.py @@ -1179,7 +1179,7 @@ class String(Type): '''Returns the default layouts for this type. Default layouts can vary acccording to format or multiplicity.''' if self.format in (String.TEXT, String.XHTML): - return {'view': 'l-d-f', 'edit': 'lrv-d-f'} + return {'view': 'l-f', 'edit': 'lrv-d-f'} elif self.isMultiValued(): return {'view': 'l-f', 'edit': 'lrv-f'} @@ -2237,7 +2237,7 @@ class Role: # Authenticated roles, automatically attributed to a user. class State: - def __init__(self, permissions, initial=False, phase='main', show=True): + def __init__(self, permissions, initial=False, phase=None, show=True): self.usedRoles = {} # The following dict ~{s_permissionName:[s_roleName|Role_role]}~ # gives, for every permission managed by a workflow, the list of roles @@ -2648,7 +2648,7 @@ class Config: # People having one of these roles will be able to create instances # of classes defined in your application. self.defaultCreators = ['Manager', 'Owner'] - # If you want to replace the Plone front page with a page coming from + # If you want to replace the default front page with a page coming from # your application, use the following parameter. Setting # frontPage = True will replace the Plone front page with a page # whose content will come fron i18n label "front_page_text". diff --git a/gen/plone25/mixins/__init__.py b/gen/plone25/mixins/__init__.py index 8421701..4f4b963 100644 --- a/gen/plone25/mixins/__init__.py +++ b/gen/plone25/mixins/__init__.py @@ -64,14 +64,15 @@ class BaseMixin: fieldName = splitted[2].split(':')[0] initiator.appy().link(fieldName, obj) + # Manage "add" permissions and reindex the object + obj._appy_managePermissions() + # Call the custom "onEdit" if available msg = None # The message to display to the user. It can be set by onEdit if obj.wrapperClass: appyObject = obj.appy() if hasattr(appyObject, 'onEdit'): msg = appyObject.onEdit(created) - # Manage "add" permissions and reindex the object - obj._appy_managePermissions() obj.reindexObject() return obj, msg diff --git a/gen/plone25/skin/appy.css b/gen/plone25/skin/appy.css index db079b5..413d905 100644 --- a/gen/plone25/skin/appy.css +++ b/gen/plone25/skin/appy.css @@ -11,6 +11,8 @@ acronym {cursor: help;} input[type=image] { border: 0; background: none; } input[type=checkbox] { border: 0; background: none; cursor: pointer;} input[type=radio] { border: 0; background: none; cursor: pointer;} +input[type=file] { border: 0px solid #cccccc; background-color: #f8f8f8; + cursor: pointer;} input[type=button] { border: 1px solid #cccccc; background-color: #f8f8f8; cursor: pointer;} input[type=submit] { border: 1px solid #cccccc; background-color: #f8f8f8; @@ -44,10 +46,14 @@ img {border: 0;} .discreet { font-size: 90%; } .portlet { width: 150px; padding: 12px 9px 9px 9px; border-right: 1px solid #9b0000;} +.portletTitle { font-weight: bold; font-size: 110%; margin-bottom: 4px;} .portletCurrent { font-weight: bold; } .portletSep { border-top: 1px solid grey; margin-top: 9px; padding-top: 9px;} .portletPage { font-style: italic; } -.phase { border-style: dashed; border-width: thin; padding: 0 0.6em 0 1em; } +.portletGroup { font-variant: small-caps; font-weight: bold; font-style: normal; + margin: 0.4em 0 0.2em 0; } +.phase { border-style: dashed; border-width: thin; padding: 0 0.6em 5px 1em;} +.phaseSelected { background-color: #EDEDED; } .content { padding: 14px 3px 9px 15px;} .grey { display: none; position: absolute; left: 0px; top: 0px; background:grey; opacity:0.5; -moz-opacity:0.5; -khtml-opacity:0.5; @@ -66,7 +72,7 @@ img {border: 0;} .section1 { font-size: 120%; margin: 0.45em 0em 0.1em 0; padding: 0.3em 0em 0.2em 0.1em; background-color: #eef3f5; border-top: 1px solid #8CACBB;border-bottom: 1px solid #8CACBB; } -.section2 { font-size: 110%; font-style: italic; margin: 0.45em 0em 0.1em 0; +.section2 { font-size: 110%; font-style: italic; margin: 0.45em 0em 0.2em 0; border-bottom: 2px solid grey; } .section3 { font-size: 100%; font-style: italic; margin: 0.45em 0em 0.1em 0; background-color: #efeae8; text-align: center; color: grey; } @@ -80,8 +86,10 @@ img {border: 0;} background-color: #f8f8f8;} .underTitle { background-color: #ededed;} .objectNavigate { margin-top: 3px;} -.underline {border-bottom: 1px dotted grey;} -.state {font-weight: bold; border-bottom: 1px dashed grey;} +.underline { border-bottom: 1px dotted grey;} +.state { font-weight: bold; border-bottom: 1px dashed grey;} .historyLabel { font-variant: small-caps; font-weight: bold;} -.history td {border-top: 1px solid grey;} -.history th {font-style: italic; text-align; left;} +.history td { border-top: 1px solid grey;} +.history th { font-style: italic; text-align; left;} +.topSpace { margin-top: 15px;} +.discreet { color: grey} diff --git a/gen/plone25/skin/nextPhase.png b/gen/plone25/skin/nextPhase.png index 24c76486bd30664a1088945e41a6a72e30b1095a..4dcc14587547ee53c24e75b6be47e9a1e9e92980 100644 GIT binary patch delta 143 zcmX@fc$sm6xG5hCGXnzy|1Ry>K#H+A$lZxy-8q?;K#ov=Pl)UP8>{|r3H4B6$YEgc zU|{%vBQzxD^z?~N7XG)n*mxO~*!(WH0oCeyx;Tb#Tu)9oz#0=H)39Xm0wy6&k-|a| t7B34fE+$KzrY0qWLN+nM4Q2|$3|k6V4Ff8^+2E+d?p&lv>|8K0yVPNoJ05U?~ihkcQ z(Z|C7CbK-ZlwtJD^Kn4sx}GkMAsp9}6F7Kz6A}_QL_!>t8kH6{HaT=UI65k{hXw?Q isGU2&m1JbVFq7fN8a7LR=RjMaMg~t;KbLh*2~7Y$cq%IZ diff --git a/gen/plone25/skin/portlet.pt b/gen/plone25/skin/portlet.pt index e4f84d8..a31bfa7 100644 --- a/gen/plone25/skin/portlet.pt +++ b/gen/plone25/skin/portlet.pt @@ -10,7 +10,7 @@ rootClasses tool/getRootClasses"> - +
@@ -95,16 +95,21 @@ The box containing phase-related information
-
+ singlePage python: len(phase['pages']) == 1; + status phase/phaseStatus; + phaseCss python: (status == 'Current') and ' phaseSelected' or ''; + underCreation python: '/portal_factory' in context.absolute_url(); + displayLink python: (status != 'Future') and not underCreation and singlePage" + tal:attributes="class python: not singlePhase and 'phase%s' % phaseCss or ''"> +
A single page in the phase @@ -124,8 +129,7 @@
-
+