SM2Gen/Templates/html_controls.html.ep.xml

120 lines
2.7 KiB
XML

<root>
<Text><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}'), class => 'label'
</span><span class=data>
%= ${Value}, class => 'data'
</span></p>
]]></Text>
<Selection><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
% my @${Name}_options = ${Value};
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%= select_field '${Name}' => @${Name}_options, class => 'input'
<br></span> </p>
]]></Selection>
<Textarea><![CDATA[
<span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%= text_area '${Name}', cols=>${cols | 40}, rows=>${rows | 10}
</span><br>
]]></Textarea>
<Date><![CDATA[
<span class=label>
%=$%=l('${prefix}_${Label}')
</span><span class=data>
%=date_field '${Name}' =>$$${Name}, pattern=>${regexp | .*}
</span><br>
]]></Date>
<Textinput><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
% param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}';
%= text_field '${Name}', size => '${size | 50}', class => 'input' , pattern=>'${regexp | ".*"}' , placeholder=>'${placeholder | Name}'
<br></span></p>
]]></Textinput>
<SubHeader><![CDATA[<h2>${value}</h2>]]></SubHeader>
<Paragraph><![CDATA[
<p>
%= l('${prefix}_${value}')
</p>
]]></Paragraph>
<Submit><![CDATA[
<span class='data'>
%= submit_button l('${value}'), class => 'action'
</span>]]>
</Submit>
<search><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
</span>span></p>
]]>
</search>
<url><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
</span>span></p>
]]>
</url>
<tel><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
</span>span></p>
]]>
</tel>
<email><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
</span>span></p>
]]>
</email>
<password><![CDATA[
<p><span class=label>
%=l('${prefix}_${Label}')
</span><span class=data>
</span>span></p>
]]>
</password>
<Table><![CDATA[
<br /><table class="sme-border TableSort">
<thead>
<tr><tal:block tal:repeat="ColHead TopHeadings">
<th class='sme-border'>${ColHead}</th></tal:block>
</tr>
</thead>
<tbody>
% my $control_data = $self->stash('${TableControl}');
% foreach my $row (@$control_data) {
<tr><tal:block tal:repeat="ColContent Columns">
<td class='sme-border'><%=$row->{${ColContent}}%></td></tal:block>
</tr>
%}
</tbody>
</table>
]]>
</Table>
</root>