Conversions: Switching output to text template

master
Rob Emery 2016-01-12 21:22:05 +00:00
parent 637ce9525c
commit 8e902e39ff
1 changed files with 17 additions and 3 deletions

View File

@ -181,9 +181,23 @@ handle query_lc => sub {
return $factor . " $result->{'from_unit'} = $result->{'result'} $result->{'to_unit'}",
structured_answer => {
input => [$styler->with_html($factor) . ' ' . $result->{'from_unit'}],
operation => 'convert',
result => $styler->with_html($result->{'result'}) . ' ' . $result->{'to_unit'},
id => 'conversions',
name => 'conversions',
data => {
raw_input => $styler->for_computation($factor),
raw_answer => $styler->for_computation($result->{'result'}),
left_unit => $result->{'from_unit'},
right_unit => $result->{'to_unit'},
markup_input => $styler->with_html($factor),
styled_output => $styler->with_html($result->{'result'}),
physical_quantity => $result->{'type'}
},
templates => {
group => 'text',
options => {
content => 'DDH.conversions.converted'
}
}
};
};