editable_metadata_fields.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
57
58
59
60
61
62
63
64
{literal}
<style>
.kt_treenodes {
list-style: none;
margin: 0;
padding: 0;
border: 0;
text-align: left !important;
}
.leafnode {font-weight: bold; }
.kt_treenodes ul {
list-style: none;
text-align: left;
}
.kt_treenodes li.treenode > a.pathnode {
background: transparent url(/graphics/plus.png) center left no-repeat;
padding-left: 15px;
}
.kt_treenodes li.treenode.active > a.pathnode {
background: transparent url(/graphics/minus.png) center left no-repeat;
}
.kt_treenodes li.active > ul {
display: block;
}
.kt_treenodes li ul {
display: none;
}
</style>
{/literal}
<table class="prettysw" cellpadding="0" cellspacing="0">
{if !$metadata_prefix}
{assign var="metadata_prefix" value="emd"}
{/if}
{if $caption}
<caption colspan="2">{$caption}</caption>
{/if}
{if $fields}
{ foreach item=oField from=$fields }
<tr>
<th>{$oField->getName()}</th>
<td>
{php}
$oField = $this->_tpl_vars['oField'];
$sPrefix = $this->_tpl_vars['metadata_prefix'];
$sValue = $this->_tpl_vars['values'][$oField->getID()];
$this->assign('pattern',
new PatternMetadata($oField->getName(), $sPrefix . $oField->getID(), $sValue));
{/php}
{$pattern->render()}
</td>
</tr>
{ /foreach }
{else}
<tr><td>No fields found</td></tr>
{/if}
</table>