listFieldsets.smarty
1.24 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
<h1>Document Fields</h1>
{ if $fieldsets}
<h2>Existing generic document fields</h2>
<table class="pretty" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>Name</th>
<th>Generic</th>
<th>Fields</th>
</tr>
</thead>
<tbody>
{foreach from=$fieldsets item=oFieldset}
<tr>
<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}
<h2>Create a new document field set</h2>
<form method="POST" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="action" value="new">
<table class="prettysw" cellpadding="0" cellspacing="0">
<tr><th>Name</th><td><input type="textbox" name="name" /></td></tr>
<tr><th>Namespace</th><td><input type="textbox" name="namespace" /></td></tr>
<tr><th>Generic</th><td><input type="checkbox" name="generic" value="true" /></td></tr>
</table>
<input type="submit" name="submit" value="Create" />
</form>