Skip to content

Commit

Permalink
Merge r27112 from trunk:
Browse files Browse the repository at this point in the history
  Acquire the standard_macros view using TALES view
  traversal (context/@@standard_macros) instead of
  through views
  • Loading branch information
philikon committed Aug 13, 2004
1 parent 47782eb commit c94a3c7
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 1 deletion.
35 changes: 35 additions & 0 deletions browser/display.pt
@@ -0,0 +1,35 @@
<html metal:use-macro="context/@@standard_macros/page">
<body>
<div metal:fill-slot="body">
<div metal:define-macro="body">

<div metal:define-macro="formbody">

<h3 tal:condition="view/label"
tal:content="view/label"
metal:define-slot="heading"
>Display something</h3>

<div metal:define-slot="extra_info" tal:replace="nothing">
</div>

<div class="row"
metal:define-slot="extra_top" tal:replace="nothing">
<div class="label">Extra top</div>
<div class="field"><input type="text" style="width:100%" /></div>
</div>

<div metal:use-macro="context/@@form_macros/widget_rows" />

<div class="row"
metal:define-slot="extra_bottom" tal:replace="nothing">
<div class="label">Extra bottom</div>
<div class="field"><input type="text" style="width:100%" /></div>
</div>

</div>

</div>
</div>
</body>
</html>
68 changes: 68 additions & 0 deletions browser/edit.pt
@@ -0,0 +1,68 @@
<tal:tag condition="view/update"/>
<html metal:use-macro="context/@@standard_macros/view">
<body>
<div metal:fill-slot="body">

<div metal:define-macro="body">

<form action="." tal:attributes="action request/URL" method="POST"
enctype="multipart/form-data">

<div metal:define-macro="formbody">

<h3 tal:condition="view/label"
tal:content="view/label"
metal:define-slot="heading"
>Edit something</h3>

<p tal:define="status view/update"
tal:condition="status"
tal:content="status" />

<p tal:condition="view/errors" i18n:translate="">
There are <strong tal:content="python:len(view.errors)"
i18n:name="num_errors">6</strong> input errors.
</p>

<div metal:define-slot="extra_info" tal:replace="nothing">
</div>

<div class="row"
metal:define-slot="extra_top" tal:replace="nothing">
<div class="label">Extra top</div>
<div class="field"><input type="text" style="width:100%" /></div>
</div>

<div metal:use-macro="context/@@form_macros/widget_rows" />

<div class="separator"></div>

<div class="row"
metal:define-slot="extra_bottom" tal:replace="nothing">
<div class="label">Extra bottom</div>
<div class="field"><input type="text" style="width:100%" /></div>
</div>
<div class="separator"></div>
</div>

<div class="row">
<div class="controls">
<input type="submit" value="Refresh"
i18n:attributes="value refresh-button" />
<input type="submit" name="UPDATE_SUBMIT" value="Change"
i18n:attributes="value submit-button"/>
</div>
</div>
<div class="row" metal:define-slot="extra_buttons" tal:replace="nothing">
</div>

<div class="separator"></div>

</form>

</div>

</div>
</body>

</html>
2 changes: 1 addition & 1 deletion browser/editwizard.pt
@@ -1,4 +1,4 @@
<tal:tag condition="view/update" /><html metal:use-macro="views/standard_macros/page">
<tal:tag condition="view/update" /><html metal:use-macro="context/@@standard_macros/page">
<body>
<div metal:fill-slot="body">

Expand Down

0 comments on commit c94a3c7

Please sign in to comment.