conditional_overview.smarty
3.02 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
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Base.js')}
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Async.js')}
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Iter.js')}
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/DateTime.js')}
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/DOM.js')}
{$context->oPage->requireJSResource('resources/js/taillog.js')}
{$context->oPage->requireJSResource('resources/js/conditional_usage.js')}
<h2>{i18n}Conditional Metadata Overview{/i18n}</h2>
<p class="descriptiveText">{i18n}Conditional Metadata is made up of fields, values
and behaviours. For a given behaviour, various values in other fields can be
selected. Depending on both the behaviour and the newly selected value, additional
fields and values may be selected, which cause a new behaviour to be "active".{/i18n}</p>
<fieldset class="conditional_metadata"><legend>{i18n}Test Instance{/i18n}</legend>
<p class="descriptiveText">{i18n}For the majority of conditional cases, simply walking
through a test is sufficient. You can do that below for the fieldset you have selected.{/i18n}</p>
<input type="hidden" class="fixed" name="fieldset" value="{$fieldset_id}" />
<p class="descriptiveText">
{$description}
</p>
<div class="conditional_target">
{i18n}conditional data.{/i18n}
</div>
</fieldset>
<p class="descriptiveText">{i18n}These behaviours and the fields and values they allow
are shown below for the active field.{/i18n}</p>
<h3>Behaviours</h3>
<p class="descriptiveText">{i18n}Clicking on a given behaviour below will show you
which fields and values can be selected when the clicked behaviour is active.{/i18n}</p>
<ul>
<li><a href="#behaviour-null">No Active Behaviour (initial values)</a></li>
{foreach from=$behaviours item=oBehaviour}
<li><a href="#behaviour-{$oBehaviour->getId()}">{$oBehaviour->getName()}</a></li>
{/foreach}
</ul>
<h4><a name="behaviour-null"></a>No Active Behaviour (initial values)</h4>
{* this is a list of field rows ... see db. *}
{foreach from=$context->getSetsForBehaviour(null, $fieldset_id) item=row}
<span class="descriptiveText">Field:</span> {$row.field_name} » <span class="descriptiveText">Option:</span> {$row.lookup_name} »
{if empty($row.behaviour_id)}
<span class="descriptiveText">no additional behaviours</span>
{else}
<a href="#behaviour-{$row.behaviour_id}">{$row.behaviour_name}</a>
{/if}
<br />
{/foreach}
{foreach from=$behaviours item=oBehaviour}
<h4><a name="behaviour-{$oBehaviour->getId()}"></a>{$oBehaviour->getName()}</h4>
{* this is a list of field rows ... see db. *}
{foreach from=$context->getSetsForBehaviour($oBehaviour, $fieldset_id) item=row}
<span class="descriptiveText">Field:</span> {$row.field_name} » <span class="descriptiveText">Option:</span> {$row.lookup_name} »
{if empty($row.behaviour_id)}
<span class="descriptiveText">no additional behaviours</span>
{else}
<a href="#behaviour-{$row.behaviour_id}">{$row.behaviour_name}</a>
{/if}
<br />
{/foreach}
{/foreach}