diff --git a/Templates/AdminLTE_html_controls.html.ep.xml b/Templates/AdminLTE_html_controls.html.ep.xml new file mode 100644 index 0000000..4516fce --- /dev/null +++ b/Templates/AdminLTE_html_controls.html.ep.xml @@ -0,0 +1,298 @@ + + + + + + +
+ %=l('${prefix}_${Label}') +
+ % my @${Name}_options = ${structure:OptionsInPerl}; + % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %= select_field '${Name}' => @${Name}_options, class => 'input', id => '${Name}_select', multiple => 'multiple' +
+
]]>
+ + + + + + +
+ %=l('${prefix}_${Label}') +
+ %=date_field '${Name}' =>$$${Name}, pattern=>${regexp | .*}, title =>'Pattern regex mismatch' +
+
]]>
+ + + + + +
+ %=l('${prefix}_${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %= text_field '${Name}', size => '${size | 50}', class => 'textinput ${Name}' , pattern=>'${regexp | ".*"}' , placeholder=>'${placeholder | Name}', title =>'Pattern regex mismatch', id => '${Name}_text' +
+
]]>
+ + +
+ %=l('${prefix}_${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %= text_field '${Name}', size => '${size | 50}', class => 'textinput ${Name}' , pattern=>'${regexp | ".*"}' , placeholder=>'${placeholder | Name}', Readonly=>'true' , title =>'Pattern regex mismatch' +
+
]]>
+ + +

<%=l('${Value}')%>


]]> +
+ +
+

<%=l('${Value}')%>


]]> +
+ + +

+ %=l('${Value}') + +
]]> + + +

+ %= submit_button l('${Value}'), class => 'action subm${type_serial}' +

]]> + + + +
+ %=l('${prefix}_${Label}') +
+ %=Search field + % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=search_field '${Name}' , class => 'searc${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=URL_field '${Name}' , class => 'url${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=tel_field '${Name}', class => 'tel${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=email_field '${Name}', class => 'emai${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=password_field '${Name}', class => 'pass${type_serial} sme-password', autocomplete => 'off' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=timedate_field '${Name}', class => 'time${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=week_field '${Name}', class => 'week${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=month_field '${Name}', class => 'mont${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=range_field '${Name}', class => 'rang${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=radio_field '${Name}', class => 'radi${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=number_field '${Name}', class => 'numb${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=file_field '${Name}', class => 'file${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=color_field '${Name}', class => 'colo${type_serial}' +
+
]]> +
+ + +
+ %=l('${Label}') +
+ % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; + %=checkbox_field '${Name}', class => 'chec${type_serial}' +
+
]]> +
+ + +
+ + + + + + + % my $control_data = $c->stash('${TableControl}'); + % foreach my $row (@$control_data) { + + + + %} + +
<%=l('${ColHead}')%>
<%=$c->render_to_string(inline=>$row->{'${ColContent}'})%>
+
]]> + + + +
+			${Value}
+		
+
]]> +
+ + + + %= l('${title}') + + %#= link_to l('${title}'), '${structure:href}' , class=>'link link${type_serial}' +
]]> + + + + + %#= button_to l('${title}'), '${structure:href}' , class=>'buttonlink buttonlink${type_serial}' +
]]> +
+ + +
+ %= submit_button l('${Value}'), class => 'action back', onclick =>'history.back()' +
+
]]> +
+ + +
+

]]> +
+ + + +
]]> +
+ + + <%= $c->stash('title') %> not found, id => '${Name}_object +
]]> +
+ + +
\ No newline at end of file diff --git a/Templates/AdminLTE_layout.html.ep.tem b/Templates/AdminLTE_layout.html.ep.tem new file mode 100644 index 0000000..a6b9a27 --- /dev/null +++ b/Templates/AdminLTE_layout.html.ep.tem @@ -0,0 +1,53 @@ +%# +%# Generated by ${version} +%# +%# AdminLTE specific layout +%# +% layout 'default', title => "Sme server 2 - ${MenuDescription}", share_dir => './'; +%# css specific to this panel: +% content_for 'module' => begin +%= stylesheet '/css/${lcPackageName}.css' +%= javascript '/js/${lcPackageName}.js' +
+ + % if (config->{debug} == 1) { +
+		%= dumper $c->current_route
+		%= dumper $$${prefix}_data->{trt}
+	
+ % } + +

<%=$title%>

+ + % if ( stash('modul')) { + %= $c->render_to_string(inline => stash('modul') ); + % } + + %if ($c->stash('first')) { +
+ %=$c->render_to_string(inline =>$c->l($c->stash('first'))) +
+ + %} elsif ($c->stash('success')) { +
+ %= $c->l($c->stash('success')); +
+ + %} elsif ($c->stash('error')) { +
+ %= $c->l($c->stash('error')); +
+ %} + + %#Routing to partials according to trt parameter. + %#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement' + +
+ % if ($$${prefix}_data->{trt} eq "${condition}") { + %= include 'partials/_${prefix}_${condition}' + %} +
+
+ +
+%end \ No newline at end of file diff --git a/Templates/AdminLTE_partial.html.ep.tem b/Templates/AdminLTE_partial.html.ep.tem new file mode 100644 index 0000000..9e7e2da --- /dev/null +++ b/Templates/AdminLTE_partial.html.ep.tem @@ -0,0 +1,29 @@ +%# +%# Generated by ${version} +%# +%# Specific for AdminLTE theme +%# +
+%# + % if (config->{debug} == 1) { +
+			%= dumper $$${prefix}_data
+		
+ % } + % my $btn = l('SAVE'); + % $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table + + %= form_for "${lcPackageName}u" => (method => 'POST') => begin + % param 'trt' => $$${prefix}_data->{trt} unless param 'trt'; + %= hidden_field 'trt' => $$${prefix}_data->{trt} + %# Inputs etc in here. + %# .... + %# Probably finally by a submit. + %= submit_button $btn, class => 'action' + %end +
+
\ No newline at end of file