Skip to content

Commit

Permalink
Merge branch 'zmi-bootstrap' of https://github.com/zopefoundation/Zope
Browse files Browse the repository at this point in the history
…into zmi-bootstrap
  • Loading branch information
drfho committed Jun 5, 2018
2 parents b3a0885 + d3243fb commit f4d1206
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 120 deletions.
2 changes: 1 addition & 1 deletion src/Products/PageTemplates/www/ptAdd.zpt
@@ -1,6 +1,6 @@
<h1 tal:replace="structure here/manage_page_header">Header</h1>

<main>
<main class="container-fluid">

<h2 tal:define="form_title string:Add Page Template"
tal:replace="structure here/manage_form_title">Form Title</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/Products/PageTemplates/www/ptEdit.zpt
Expand Up @@ -2,7 +2,7 @@
<h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
tal:replace="structure context/manage_tabs">Tabs</h2>

<main>
<main class="container-fluid">

<tal:block define="global body request/other/text | request/form/text
| context/read" />
Expand Down
209 changes: 91 additions & 118 deletions src/Shared/DC/Scripts/dtml/scriptBindings.dtml
@@ -1,136 +1,109 @@
<dtml-var manage_page_header>
<dtml-var manage_tabs>

<main class="container-fluid">

<p class="form-help">
Each of the following items describes a piece of information about
this script's calling environment. If you supply a variable name for
an item, or accept the recommended name, the information will
Each of the following items describes a piece of information about
this script's calling environment. If you supply a variable name for
an item, or accept the recommended name, the information will
automatically be provided under that name when the script is called.
</p>

<form action="ZBindingsHTML_editAction" method="POST">
<form action="ZBindingsHTML_editAction" method="POST" class="zmi-bindings">

<dtml-with getBindingAssignments>
<table cellpadding="2" cellspacing="0" border="0">
<tr class="section-bar">
<td align="left" valign="top" colspan="2">
<div class="form-label">
Context
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-text">
This is the object on which the script is being called, also known as the
&quot;acquisition parent&quot; of the script. This <em>may</em> be the
container, but varies according to the path through which the script is
accessed.
<br /><br />
Recommended value: <code>context</code>
</div>
</td>
<td align="left" valign="top">
<input type="text" name="name_context" value="<dtml-var expr="getAssignedName('name_context', '')" html_quote>">
</td>
</tr>
<div class="form-group">
<label for="context" class="form-label">
Context
</label>
<div class="row">
<div class="col-lg-6 col-md-8 col-sm-12">
<input class="form-control" type="text" name="name_context" value="<dtml-var expr="getAssignedName('name_context', '')" html_quote>"/>
<small class="form-text text-muted">Recommended value: context</small>
</div>
<div class="form-text col-lg-6 col-md-8 col-sm-12">
This is the object on which the script is being called, also known as the
&quot;acquisition parent&quot; of the script. This <em>may</em> be the
container, but varies according to the path through which the script is
accessed.
</div>
</div>
</div>

<div class="form-group">
<label for="container" class="form-label">
Container
</label>
<div class="row">
<div class="col-lg-6 col-md-8 col-sm-12">
<input class="form-control" type="text" name="name_container" value="<dtml-var expr="getAssignedName('name_container', '')" html_quote>"/>
<small class="form-text text-muted">Recommended value: container</small>
</div>
<div class="form-text col-lg-6 col-md-8 col-sm-12">
This is the <dtml-with expr="aq_inner.aq_parent">&dtml-meta_type;
"&dtml.missing.html_quote-title_or_id;"</dtml-with>, in which this
script is located. This doesn't change unless you move the script.
</div>
</div>
</div>

<tr class="section-bar">
<td align="left" valign="top" colspan="2">
<div class="form-label">
Container
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-text">
This is the <dtml-with expr="aq_inner.aq_parent">&dtml-meta_type;
"&dtml.missing.html_quote-title_or_id;"</dtml-with>, in which this
script is located. This doesn't change unless you move the script.
<br /><br />
Recommended value: <code>container</code>
</div>
</td>
<td align="left" valign="top">
<input type="text" name="name_container" value="<dtml-var expr="getAssignedName('name_container', '')" html_quote>">
</td>
</tr>
<div class="form-group">
<label for="script" class="form-label">
Script
</label>
<div class="row">
<div class="col-lg-6 col-md-8 col-sm-12">
<input class="form-control" type="text" name="name_m_self" value="<dtml-var expr="getAssignedName('name_m_self', '')" html_quote>"/>
<small class="form-text text-muted">Recommended value: script</small>
</div>
<div class="form-text col-lg-6 col-md-8 col-sm-12">
This is the script object &quot;&dtml-title_or_id;&quot; itself.
</div>
</div>
</div>

<tr class="section-bar">
<td align="left" valign="top" colspan="2">
<div class="form-label">
Script
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-text">
This is the script object &quot;&dtml-title_or_id;&quot; itself.
<br /><br />
Recommended value: <code>script</code>
</div>
</td>
<td align="left" valign="top">
<input type="text" name="name_m_self" value="<dtml-var expr="getAssignedName('name_m_self', '')" html_quote>">
</td>
</tr>
<div class="form-group">
<label for="namespace" class="form-label">
Namespace
</label>
<div class="row">
<div class="col-lg-6 col-md-8 col-sm-12">
<input class="form-control" type="text" name="name_ns" value="<dtml-var expr="getAssignedName('name_ns', '')" html_quote>"/>
<small class="form-text text-muted">Recommended value: _ (underscore character)</small>
</div>
<div class="form-text col-lg-6 col-md-8 col-sm-12">
When the script is called from DTML, this is the caller's DTML namespace,
otherwise it is an empty namespace.
</div>
</div>
</div>

<tr class="section-bar">
<td align="left" valign="top" colspan="2">
<div class="form-label">
Namespace
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-text">
When the script is called from DTML, this is the caller's DTML namespace,
otherwise it is an empty namespace.
<br /><br />
Recommended value: <code>_</code> (underscore character)
</div>
</td>
<td align="left" valign="top">
<input type="text" name="name_ns" value="<dtml-var expr="getAssignedName('name_ns', '')" html_quote>">
</td>
</tr>
<div class="form-group">
<label for="subpath" class="form-label">
Subpath
</label>
<div class="row">
<div class="col-lg-6 col-md-8 col-sm-12">
<input class="form-control" type="text" name="name_subpath" value="<dtml-var expr="getAssignedName('name_subpath', '')" html_quote>"/>
<small class="form-text text-muted">Recommended value: traverse_subpath</small>
</div>
<div class="form-text col-lg-6 col-md-8 col-sm-12">
When the script is published directly from a URL, this is the
portion of the URL path after the script's name, split at slash separators
into a list of strings. Otherwise, it is an empty list.
</div>
</div>
</div>

<tr class="section-bar">
<td align="left" valign="top" colspan="2">
<div class="form-label">
Subpath
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-text">
When the script is published directly from a URL, this is the
portion of the URL path after the script's name, split at slash separators
into a list of strings. Otherwise, it is an empty list.
<br /><br />
Recommended value: <code>traverse_subpath</code>
</div>
</td>
<td align="left" valign="top">
<input type="text" name="name_subpath" value="<dtml-var expr="getAssignedName('name_subpath', '')" html_quote>">
</td>
</tr>
<div class="controls">
<input class="btn btn-primary" type="submit" name="submit"
value="Save Changes" />
</div>

<tr>
<td align="left" valign="top" colspan="2">
<div class="form-element">
<br />
<input class="form-element" type="submit" name="submit"
value="Save Changes" />
</div>
</td>
</tr>
</table>
</form>
</dtml-with>

</main>

<dtml-var manage_page_footer>

0 comments on commit f4d1206

Please sign in to comment.