Revision 8cce015e
Von Moritz Bunkus vor fast 10 Jahren hinzugefügt
templates/webpages/common/render_cvar_value_readonly.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE HTML %] |
|
3 |
[%- USE L %] |
|
4 |
[%- USE LxERP %] |
|
5 |
|
|
6 |
[%- IF ( var.config .type == 'bool' ) %] |
|
7 |
[% IF var.value %] |
|
8 |
[% LxERP.t8("Yes") %] |
|
9 |
[% ELSE %] |
|
10 |
[% LxERP.t8("No") %] |
|
11 |
[% END %] |
|
12 |
[%- ELSIF ( var.config .type == 'textfield' ) %] |
|
13 |
<pre>[% HTML.escape(var.value) %]</pre> |
|
14 |
[%- ELSIF ( var.config.type == 'number' ) %] |
|
15 |
[%- LxERP.format_amount(var.value, -2) %] |
|
16 |
[%- ELSE %] |
|
17 |
[% HTML.escape(var.value) %] |
|
18 |
[%- END %] |
templates/webpages/requirement_spec/_show_basic_settings.html | ||
---|---|---|
41 | 41 |
[% FOREACH var = cvars %] |
42 | 42 |
<tr class="listrow"> |
43 | 43 |
<td>[% HTML.escape(var.config.description) %]</td> |
44 |
<td>[% INCLUDE 'common/render_cvar_value_readonly.html' %]</td>
|
|
44 |
<td>[% HTML.escape(var.value_as_text) %]</td>
|
|
45 | 45 |
</tr> |
46 | 46 |
[% END %] |
47 | 47 |
|
Auch abrufbar als: Unified diff
Pflichtenhefte: Anzeige von CVars über value_as_text()
$cvar->value_as_text() macht bereits die richtige Fallunterscheidung,
sodass wir hierfür kein eigenes Template benötigen.