loops/browser/relation_macros.pt
helmutm fc6946be95 Work in progress: indexing and searching
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1101 fd906abe-77d9-0310-91a1-e0d9ade77398
2006-02-26 18:14:21 +00:00

159 lines
5.8 KiB
XML

<html i18n:domain="loops">
<metal:assignments define-macro="listing">
<fieldset>
<legend tal:content="legend"
i18n:translate="">Listing</legend>
<metal:top define-slot="topActions" />
<form metal:define-macro="listing_form"
method="post" name="listing" action="."
tal:attributes="action request/URL"
tal:condition="items">
<input type="hidden" name="action" value="remove"
tal:attributes="value action" />
<input type="hidden" name="qualifier" value="parents"
tal:condition="qualifier"
tal:attributes="value qualifier" />
<table class="listing" summary="Currently assigned objects"
i18n:attributes="summary"
tal:attributes="summary summary">
<thead>
<tr>
<th>&nbsp;</th>
<th i18n:translate="label_title">Title</th>
<th i18n:translate="label_type">Type</th>
<th i18n:translate="label_predicate"
tal:condition="showPredicate">Predicate</th>
</tr>
</thead>
<tbody>
<tr tal:repeat="item items">
<td class="field">
<input class="formSelection"
type="checkbox" name="tokens:list" id="#" value=""
tal:attributes="value item/token" />
</td>
<td>
<a tal:content="item/title" href="#"
tal:attributes="href string:${item/url}/@@SelectedManagementView.html">
Title
</a>
</td>
<td>
<a tal:condition="item/typeTitle | nothing"
tal:content="item/typeTitle" href="#"
tal:attributes="href
string:${item/typeUrl}/@@SelectedManagementView.html">
Type
</a>
</td>
<td tal:condition="showPredicate">
<a tal:content="item/predicateTitle" href="#"
tal:attributes="href
string:${item/predicateUrl}/@@SelectedManagementView.html">
Predicate
</a>
</td>
</tr>
</tbody>
</table>
<div class="formControls">
<input class="context" type="submit" name="form.button.submit"
value="Remove Assignment(s)"
i18n:attributes="value"
tal:attributes="value buttonText" />
<metal:buttons define-slot="specialButtons" />
</div>
</form>
</fieldset>
</metal:assignments>
<metal:create define-macro="create">
<fieldset>
<legend tal:content="legend"
i18n:translate="">Create Object</legend>
<form method="post" name="listing" action="."
tal:attributes="action request/URL">
<input type="hidden" name="action" value="create" />
<div class="row">
<span i18n:translate="">Name</span>
<input name="create.name" size="15"
tal:attributes="value nothing" />&nbsp;
<span i18n:translate="">Title</span>
<input name="create.title" size="30"
tal:attributes="value nothing" />&nbsp;
<span i18n:translate="">Type</span>
<select name="create.type">
<tal:types repeat="type view/conceptTypes">
<option value=".loops/concepts/topic"
i18n:translate=""
tal:attributes="value type/token"
tal:content="type/title">Topic</option>
</tal:types>
<option>None</option>
</select>
</div><br />
<div class="formControls">
<input class="context" type="submit" name="form.button.submit"
value="Create Object"
i18n:attributes="value"
tal:attributes="value buttonText" />
and assign as
<select name="assignAs">
<option value="child" selected i18n:translate="">Child</option>
<option value="parent" i18n:translate="">Parent</option>
</select>
using Predicate
<select name="create.predicate">
<tal:types repeat="pred view/predicates">
<option value=".loops/concepts/hasType"
i18n:translate=""
tal:attributes="value pred/token"
tal:content="pred/title">Predicate</option>
</tal:types>
</select>
</div>
</form>
</fieldset>
</metal:create>
<metal:search define-macro="search">
<form method="post" name="listing" action="."
tal:attributes="action request/URL">
<input type="hidden" name="action" value="search" />
<div class="row"
tal:define="searchTerm request/searchTerm | nothing;
searchType request/searchType | nothing;">
<span i18n:translate="">Search Term</span>
<input name="searchTerm"
tal:attributes="value searchTerm" />
<span i18n:translate="">Type</span>
<select name="searchType">
<option value="loops:concept:*"
tal:attributes="selected python:
searchType == 'loops:concept:*'">Any</option>
<tal:types repeat="type view/conceptTypesForSearch">
<option value=".loops/concepts/topic"
i18n:translate=""
tal:attributes="value type/token;
selected python: type.token == searchType"
tal:content="type/title">Topic</option>
</tal:types>
<option value="none"
tal:attributes="selected python:
searchType == 'none'">None</option>
</select>
</div>
<div class="formControls">
<input class="context" type="submit" name="form.button.submit"
value="Search"
i18n:attributes="value" />
</div>
</form>
</metal:search>
</html>