[Zope-CVS] CVS: Products/PageDesign/www - addElementDialog.pt:1.1.2.1 object_list_rows.pt:1.1.2.1 sorted_down.gif:1.1.2.1 sorted_up.gif:1.1.2.1
Shane Hathaway
shane@cvs.zope.org
Wed, 7 Aug 2002 23:57:07 -0400
Update of /cvs-repository/Products/PageDesign/www
In directory cvs.zope.org:/tmp/cvs-serv3999/www
Added Files:
Tag: page-redesign-branch
addElementDialog.pt object_list_rows.pt sorted_down.gif
sorted_up.gif
Log Message:
- "Acquire" palettes. This might be a good way to work.
- Added various security offerings
=== Added File Products/PageDesign/www/addElementDialog.pt ===
<html>
<head>
<title>Add page element</title>
</head>
<body tal:define="palette_id python:
request.get('palette_id') or here.getDefaultPaletteId()">
<form action="addElementDialog" method="GET">
<input type="hidden" name="target_path"
tal:attributes="value request/target_path" />
Palette:
<select name="palette_id">
<option></option>
<option tal:repeat="id here/getPaletteIds" tal:content="id"
tal:attributes="value id; selected python: id == palette_id">Default</option>
</select>
<input type="submit" value="Change palette" name="submit" />
</form>
<hr />
<div tal:define="items python: palette_id and
here.getPaletteContents(palette_id, request) or ()">
<form action="addElements" tal:condition="items">
<table>
<tbody metal:use-macro="here/object_list_rows/macros/tbody" />
</table>
<input type="hidden" name="target_path"
tal:attributes="value request/target_path" />
<input type="submit" value="Add elements" name="submit"
onclick="" />
</form>
<em tal:condition="not:palette_id">
Please choose a palette.
</em>
<em tal:condition="python: palette_id and not items">
No page elements are in this palette.
</em>
</div>
</body>
</html>
=== Added File Products/PageDesign/www/object_list_rows.pt ===
<!-- Invoke this macro with "items" in the namespace. -->
<table>
<tbody metal:define-macro="tbody"
tal:define="my_url python: request['URL'] + '?';
mq python: modules['ZTUtils'].make_query;
sort_on sort_on | python: request.get('sort_on', 'Title');
sort_order sort_order | python: request.get('sort_order', 'normal');">
<tr>
<th nowrap="nowrap" width="5%"></th>
<th tal:repeat="column python: ['Title', 'Type']"
tal:attributes="width python:
column == 'Title' and '50%' or default"
align="left">
<a href="" tal:omit-tag="python: sort_on == column"
tal:attributes="href python: my_url +
mq(request.form, sort_on=column, sort_order='normal')"
tal:content="column">Title</a>
<a href="" tal:condition="python: sort_on == column"
tal:attributes="href python: my_url + mq(request.form,
sort_on=column, sort_order=(sort_order == 'normal'
and 'reverse' or 'normal'))"><img border="0" tal:attributes="src
python: here.absolute_url() + '/' + (
sort_order == 'normal' and 'sorted_down' or
'sorted_up')" /></a>
</th>
</tr>
<tr tal:repeat="item items">
<td><input type="checkbox" name="source_paths:list"
tal:attributes="value python: '/'.join(item.getPhysicalPath())" />
</td>
<td>
<img src="document_icon.gif" border="0"
tal:attributes="src item/getIcon | item/icon"
tal:on-error="string:" />
<span tal:define="title python: item.title or item.id" tal:content="title">TITLE or ID</span>
</td>
<td tal:content="item/Type | item/meta_type" nowrap="nowrap"
tal:on-error="string:(unknown)">
Type
</td>
</tr>
</tbody>
</table>
=== Added File Products/PageDesign/www/sorted_down.gif ===
<Binary-ish file>
=== Added File Products/PageDesign/www/sorted_up.gif ===
<Binary-ish file>