[Checkins] SVN: z3c.multiform/Sandbox/src/z3c/multiform/ worked on
container stuff
Bernd Dorn
bernd.dorn at fhv.at
Thu Apr 27 14:44:49 EDT 2006
Log message for revision 67658:
worked on container stuff
Changed:
U z3c.multiform/Sandbox/src/z3c/multiform/container/grid.pt
U z3c.multiform/Sandbox/src/z3c/multiform/container/griditem.pt
U z3c.multiform/Sandbox/src/z3c/multiform/container/interfaces.py
U z3c.multiform/Sandbox/src/z3c/multiform/container/views.py
U z3c.multiform/Sandbox/src/z3c/multiform/multiform.py
U z3c.multiform/Sandbox/src/z3c/multiform/selection.py
-=-
Modified: z3c.multiform/Sandbox/src/z3c/multiform/container/grid.pt
===================================================================
--- z3c.multiform/Sandbox/src/z3c/multiform/container/grid.pt 2006-04-27 18:23:30 UTC (rev 67657)
+++ z3c.multiform/Sandbox/src/z3c/multiform/container/grid.pt 2006-04-27 18:44:49 UTC (rev 67658)
@@ -135,50 +135,49 @@
summary="Content listing">
<thead>
<tr>
- <th tal:repeat="field view/itemFormFactory/form_fields"
- tal:content="field/field/title" i18n:translate="">
- </th>
- </tr>
+ <metal:block tal:repeat="field view/itemFormFactory/form_fields">
+ <th tal:define="isSelection python:field.field.__name__=='selected'"
+ tal:attributes="style python:isSelection and 'width:1%;;' or default">
+ <span tal:replace="field/field/title" tal:condition="not:isSelection" i18n:translate=""/>
+ </th>
+ </metal:block>
+ </tr>
</thead>
<tbody>
<tr tal:repeat="subForm view/getForms"
- tal:attributes="class python:repeat['subForm'].even and 'even' or 'odd'"
+ tal:attributes="class python:repeat['subForm'].even and 'even' or 'odd';"
tal:content="structure subForm"/>
</tbody>
</table>
<!-- end: subforms -->
- <!-- start: parentActions -->
-
+ <metal:block define-slot="above_buttons" />
+
+ <!-- start: Actions -->
<div id="parentActionsView"
- metal:define-macro="form_parent_actions">
+ metal:define-macro="form_actions">
+
<span class="actionButtons"
tal:condition="view/availableSubActions"
- metal:define-slot="bottom_buttons">
+ metal:define-slot="parent_bottom_buttons">
<input tal:repeat="action view/availableSubActions"
tal:replace="structure action/render"
/>
- </span>
-</div>
-
- <!-- end: parentActions -->
-
-
-
- <metal:block define-slot="above_buttons" />
-</div>
-<div id="actionsView"
- metal:define-macro="form_actions">
- <span class="actionButtons"
- tal:condition="view/availableActions"
- metal:define-slot="bottom_buttons">
+ </span>
+ <span class="actionButtons"
+ tal:condition="view/availableActions"
+ metal:define-slot="bottom_buttons">
<input tal:repeat="action view/actions"
tal:replace="structure action/render"
/>
- </span>
-</div>
+ </span>
+ </div>
+ <!-- end: Actions -->
+
+ </div>
+
</form>
<div tal:content="view/request/form"/>
Modified: z3c.multiform/Sandbox/src/z3c/multiform/container/griditem.pt
===================================================================
--- z3c.multiform/Sandbox/src/z3c/multiform/container/griditem.pt 2006-04-27 18:23:30 UTC (rev 67657)
+++ z3c.multiform/Sandbox/src/z3c/multiform/container/griditem.pt 2006-04-27 18:44:49 UTC (rev 67658)
@@ -1,2 +1,5 @@
-<td tal:repeat="widget view/widgets"
- tal:content="structure widget"/>
+<td tal:attributes="title: python:widget.error() or default;
+ style: python:widget.error() and 'background: red;;' or default;"
+ tal:repeat="widget view/widgets"
+ tal:content="structure widget"/>
+
Modified: z3c.multiform/Sandbox/src/z3c/multiform/container/interfaces.py
===================================================================
--- z3c.multiform/Sandbox/src/z3c/multiform/container/interfaces.py 2006-04-27 18:23:30 UTC (rev 67657)
+++ z3c.multiform/Sandbox/src/z3c/multiform/container/interfaces.py 2006-04-27 18:44:49 UTC (rev 67658)
@@ -9,7 +9,7 @@
itself"""
__name__ = schema.TextLine(
- title=u"The name within the parent",
+ title=u"Name",
description=u"Traverse the parent with this name to get the object.",
required=False,
default=None)
Modified: z3c.multiform/Sandbox/src/z3c/multiform/container/views.py
===================================================================
--- z3c.multiform/Sandbox/src/z3c/multiform/container/views.py 2006-04-27 18:23:30 UTC (rev 67657)
+++ z3c.multiform/Sandbox/src/z3c/multiform/container/views.py 2006-04-27 18:44:49 UTC (rev 67658)
@@ -104,8 +104,13 @@
form_fields = form.Fields(ISelection['selected'],
IMovableLocation['__name__'],
IWriteZopeDublinCore['title'],
+ IWriteZopeDublinCore['created'],
+ IWriteZopeDublinCore['modified'],
omit_readonly=False,render_context=True)
+ form_fields['created'].for_display=True
+ form_fields['modified'].for_display=True
+
@multiform.parentAction('Edit',
condition=multiform.allSubFormsDisplayMode)
def handle_edit_action(self, action, data):
Modified: z3c.multiform/Sandbox/src/z3c/multiform/multiform.py
===================================================================
--- z3c.multiform/Sandbox/src/z3c/multiform/multiform.py 2006-04-27 18:23:30 UTC (rev 67657)
+++ z3c.multiform/Sandbox/src/z3c/multiform/multiform.py 2006-04-27 18:44:49 UTC (rev 67658)
@@ -80,7 +80,7 @@
if IBoundAction.providedBy(self) and not self.available():
return ''
label = self.label
- if isinstance(label, (zope.i18n.Message, zope.i18n.MessageID)):
+ if isinstance(label, zope.i18n.Message):
label = zope.i18n.translate(self.label, context=self.form.request)
return ('<input type="submit" id="%s" name="%s" value="%s"'
' class="button" />' %
Modified: z3c.multiform/Sandbox/src/z3c/multiform/selection.py
===================================================================
--- z3c.multiform/Sandbox/src/z3c/multiform/selection.py 2006-04-27 18:23:30 UTC (rev 67657)
+++ z3c.multiform/Sandbox/src/z3c/multiform/selection.py 2006-04-27 18:44:49 UTC (rev 67658)
@@ -11,10 +11,10 @@
class FormLocationSelection(object):
- __doc__ = """Form Location-object proxy
+ __doc__ = """
- This is a non-picklable proxy that can be put around objects that
- implement `ILocation`.
+ FormLocation to Selection adapter
+
>>> from zope.publisher.browser import TestRequest
>>> from zope import interface
>>> class L(object):
More information about the Checkins
mailing list