listFieldsets.smarty
2.19 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<h2>{i18n}Document Fieldsets{/i18n}</h2>
<p class="descriptiveText">{i18n}Collections of fields are associated into fieldsets. These represent a set of related information which can be associated with a document and thus comprise part of the document's metadata.{/i18n}</p>
{ if $fieldsets}
<h3>{i18n}Existing document fieldsets{/i18n}</h3>
<table class="kt_collection narrow" cellpadding="1.5em" cellspacing="0">
<thead>
<tr>
<th>{i18n}Name{/i18n}</th>
<th class="centered">{i18n}Generic{/i18n}</th>
<th class="centered">{i18n}System{/i18n}</th>
<th>{i18n}Fields{/i18n}</th>
<th>{i18n}Document Types{/i18n}</th>
<th>{i18n}Edit{/i18n}</th>
<th>{i18n}Delete{/i18n}</th>
</tr>
</thead>
<tbody>
{foreach from=$fieldsets item=oFieldset}
<tr>
<td>
{ $oFieldset->getName() }
</a>
</td>
<td class="centered">
{if ($oFieldset->getIsGeneric())}
<span>{i18n}Yes{/i18n}</span>
{else}
<span>{i18n}No{/i18n}</span>
{/if}
</td>
<td class="centered">
{if ($oFieldset->getIsSystem())}
<span>{i18n}Yes{/i18n}</span>
{else}
<span>{i18n}No{/i18n}</span>
{/if}
</td>
<td>
{assign var="aFields" value=$oFieldset->getFields()}
{if $aFields}
{foreach from=$aFields item=oField name=fields}
{$oField->getName()}{if (!$smarty.foreach.fields.last)}<br/> {/if}
{/foreach}
{else}
—
{/if}
</td>
<td>
<span class="descriptiveText">{$context->getTypesForFieldset($oFieldset)}</span>
</td>
<td>
<a href="{addQS}action=edit&fFieldsetId={$oFieldset->getId()}{/addQS}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a>
</td>
<td>
<a href="{addQS}action=delete&fFieldsetId={$oFieldset->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a>
</td>
</tr>
</tbody>
{/foreach}
</table>
{/if}
<form method="POST" action="{$smarty.server.PHP_SELF}">
<fieldset><legend>{i18n}Create a new document fieldset{/i18n}</legend>
<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="{i18n}Create{/i18n}" />
</div>
</fieldset>
</form>