listFieldsets.smarty
1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<h2>Document Fieldsets</h2>
<p class="descriptiveText"><strong>FIXME</strong> add documentation about what fieldsets are, and how to use them.</p>
{ if $fieldsets}
<h3>Existing document fieldsets</h3>
<table class="listing" cellpadding="1.5em" cellspacing="0">
<thead>
<tr>
<th colspan="2">Name</th>
<th>Generic</th>
<th>Fields</th>
</tr>
</thead>
<tbody>
{foreach from=$fieldsets item=oFieldset}
<tr>
<td>
<a href="?action=delete&fFieldsetId={$oFieldset->getId()}"class="ktAction ktDelete">Delete</a>
</td>
<td>
<a href="?action=edit&fFieldsetId={$oFieldset->getId()}"> { $oFieldset->getName() }
</a>
</td>
<td>
{if $oFieldset->getIsGeneric()}
Yes
{else}
No
{/if}
</td>
<td>
{assign var="aFields" value=$oFieldset->getFields()}
{if $aFields}
<ul>
{foreach from=$aFields item=oField}
<li>{$oField->getName()}</li>
{/foreach}
</ul>
{else}
{/if}
</td>
</tr>
</tbody>
{/foreach}
</table>
{/if}
<form method="POST" action="{$smarty.server.PHP_SELF}">
<fieldset><legend>Create a new document fieldset</legend>
<p class="descriptiveText"><strong>FIXME</strong> add documentation about what fieldsets are, and how to use them.</p>
<input type="hidden" name="action" value="new">
{foreach item=oWidget from=$creation_fields}
{$oWidget->render()}
{/foreach}
<div class="form_actions"
<input type="submit" name="submit" value="Create" />
</div>
</fieldset>
</form>