Subversion-Projekte lars-tiefland.content-management

Revision

Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<!-- $Id: auspraegung.tpl 4034 2011-10-25 07:04:23Z tiefland $ -->
2
 
3
    <form action="{$SCRIPT_NAME}" method="post" name="auspraegung" onsubmit="return check_form();">
4
        <input type="hidden" name="id" value="{$id}">
5
        <input type="hidden" name="a_id" value="{$a_id}">
6
        <input type="hidden" name="mode" value="{$mode}">
7
        <table width="100%" cellpadding="0" cellspacing="0">
8
            <tr>
9
                <td class="links" colspan="2" align="center">
10
                    Ausprägung ändern / hinzufügen
11
                </td>
12
            <tr id="name">
13
                <td class="links">Ausprägungsname</td>
14
                <td class="rechts">
15
                    {if !$sub_type}
16
                    <input type="text" value="{$val}" name="value">
17
                    {else}
18
                    <input type="text" value="{$val}" name="value" disabled="disabled">
19
                    <input type="hidden" value="{$val}" name="value">
20
                    {/if}
21
                </td>
22
            </tr>
23
            <tr id="suche">
24
                <td class="links">Suchkriterium?</td>
25
                <td class="rechts">
26
                    <input type="hidden" name="suchkriterium" value="0">
27
                    <input type="checkbox" name="suchkriterium" value="1" {if $suchkriterium==1}checked="checked"{/if}>
28
                </td>
29
            </tr>
30
            {if $auspr_vererbung==1}
31
            <tr id="vererbung">
32
                <td class="links">auf alle Unterordner vererben?</td>
33
                <td class="rechts">
34
                    <input type="hidden" name="vererbung" value="0">
35
                    <input type="checkbox" name="vererbung" value="1" {if $vererbung==1}checked="checked"{/if}>
36
                </td>
37
            </tr>
38
            {/if}
39
            <tr>
40
                <td class="links" style="width:30%">Typ der Ausprägung</td>
41
                <td class="rechts">
42
                    {if !$sub_type && $mode!="edit"}
43
                    {html_options options=$options selected=$type name="type" id="type"}
44
                    {else}
45
                        {html_options options=$options selected=$type name="type" id="type" disabled="disabled"}
46
                        <input type="hidden" name="type" value="{$type}">
47
                    {/if}
48
                </td>
49
            </tr>
50
 
51
 
52
 
53
            {if $type==1}
54
            <tr>
55
                <td class="links">Richtung für bessere Werte</td>
56
                <td class="rechts">
57
                    {html_options name="richtung" options=$richtungen selected=$richtung}
58
                </td>
59
            </tr>
60
            {/if}
61
            <tr id="extra">
62
                <td class="links" style="width:30%">Einheit</td>
63
                <td class="rechts">
64
                    {if !$sub_type && $mode!="edit"}
65
                    <input type="text" name="einheit" value="{$einheit}">
66
                    {else}
67
                    <input type="text" value="{$einheit}" disabled="disabled">
68
                    <input type="hidden" name="einheit" value="{$einheit}">
69
                    {/if}
70
                </td>
71
            </tr>
72
            <tr id="wertebereiche">
73
                <td class="links" id="caption_wb">Wertebereiche ({$einheit})</td>
74
                <td class="rechts">
75
                    <input type="text" name="wert[0]" value="{$werte[0]}" size="2">
76
                    {section loop=$werte start=1 name=w_ind}
77
                    bis <input type="text" name="wert[]" value="{$werte[w_ind]}" size="2">
78
                    {/section}
79
                </td>
80
            </tr>
81
            <tr id="preisbereiche">
82
                <td class="links" id="caption_pb">Preisbereiche (EUR)</td>
83
                <td class="rechts">
84
 
85
                    <input type="hidden" name="preis[0]" value="0">
86
                    {section loop=$preise start=1 name=p_ind}
87
                    bis <input type="text" name="preis[]" value="{$preise[p_ind]}" size="2">
88
                    {/section}
89
                </td>
90
            </tr>
91
            <tr id="auswahl">
92
                <td class="links" id="caption_auswahl">Auswahlwerte</td>
93
                <td class="rechts">
94
                    {for $i=0;$i<50;$i++}
95
                        <input type="text" name="auswahl[{$i}]" value="{$auswahl[$i]}">
96
                    {/for}
97
                </td>
98
            </tr>
99
            <tr id="abh_auspr">
100
                <td class="links">Abh&auml;ngige Auspr&auml;gung: </td>
101
                <td class="rechts">
102
                    <input type="" name="abh_auspr" value="{$abh_auspr}" />
103
                </td>
104
            </tr>
105
 
106
            <tr id="unterauswahl">
107
                <td class="links" id="caption_unterauswahl">Auswahlwerte</td>
108
                <td class="rechts">
109
 
110
                    {for $i=0;$i<50;$i++}
111
                        <input type="text" id="unterauswahl_{$i}" name="unterauswahl[{$i}][ebene1]" value="{$unterauswahl[$i].ebene1}" />
112
                        <a style="cursor:pointer;" onclick="return toggle_div('unterauswahl2_{$i}');" title="Unterauswahl anlegen">[+]</a>
113
 
114
                        <div class="unterauswahl2" id="unterauswahl2_{$i}" style="display:none;">
115
                        <hr /> 2. Ebene f&uuml;r <span id="ebene2_{$i}"></span><br />
116
 
117
                        {for $k=0;$k<20;$k++}
118
 
119
                            <input type="text" name="unterauswahl[{$i}][{$k}]" value="{$unterauswahl[$i][$k]}" />
120
 
121
                        {/for}
122
                        <hr />
123
                        </div>
124
                    {/for}
125
                </td>
126
            </tr>
127
            <tr id="eu_label">
128
                <td class="links">Eu-Label</td>
129
                <td class="rechts">
130
                    {if $type!=7 && $mode!="edit"}
131
                    {html_options name="eu_label" options=$labels selected=$sub_type}
132
                    {else}
133
                    {html_options name="eu_label" options=$labels selected=$sub_type disabled="disabled"}
134
                    {/if}
135
                </td>
136
            </tr>
137
            {if $type==7}
138
                {section loop=$sub_ausp name=sa_ind}
139
                    <tr>
140
                        <td class="links">{$sub_ausp[sa_ind].name}</td>
141
                        <td class="rechts">
142
                            <input type="hidden" name="auspraegung[{$sub_ausp[sa_ind].ID}][suchkriterium]" value="0">
143
                            <input type="checkbox" name="auspraegung[{$sub_ausp[sa_ind].ID}][suchkriterium]" value="1" {if $sub_ausp[sa_ind].suchkriterium}checked="checked"{/if}> Suchkriterium
144
                        </td>
145
                    </tr>
146
                {/section}
147
            {/if}
148
            <tr>
149
                <td class="links">Erklärung</td>
150
                <td class="rechts">
151
                    <input type="text" name="erklaerung" value="{$erklaerung}">
152
                </td>
153
            </tr>
154
            <tr>
155
                <td class="links" colspan="2" align="center">
156
                    <input type="submit" value="speichern">
157
                </td>
158
            </tr>
159
        </table>
160
    </form>
161
 
162
    <script>
163
        function toggle_div(id) {
164
            for(i=0;i<50;i++) {
165
                document.getElementById('unterauswahl2_' + i).style.display = "none";
166
            }
167
 
168
            var divstatus = document.getElementById(id).style.display;
169
 
170
            if(divstatus=='none') {
171
                var e_id = id.substr(14);
172
                document.getElementById('ebene2_'+e_id).innerHTML = document.getElementById('unterauswahl_'+ e_id).value;
173
                document.getElementById(id).style.display = 'block';
174
            }else{
175
                document.getElementById(id).style.display = 'none';
176
            }
177
 
178
        }
179
    </script>
180