Merge commit 'v7.10.19' into WebGUI8
This commit is contained in:
commit
4fea10a1f5
52 changed files with 490 additions and 77 deletions
|
|
@ -23,7 +23,7 @@ Package WebGUI::Macro::RenderThingData
|
|||
|
||||
Macro that allows users to render thing data.
|
||||
|
||||
=head2 process ( thingURL, templateHint )
|
||||
=head2 process ( thingURL, templateHint, callerAssetId )
|
||||
|
||||
=head3 thingHint
|
||||
|
||||
|
|
@ -33,12 +33,17 @@ The URL from which to pull the thingId and thingDataId
|
|||
|
||||
Optional. Specifies the templateId or template url to use. If omitted, the default thingy view template will be used.
|
||||
|
||||
=head3 callerAssetId
|
||||
|
||||
Optional. Passes an assetId to the template (as a template var named callerAssetId) so that the the assetId of of
|
||||
the caller can be known by the called template. Generally you should pass <tmpl_var assetId>.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($session, $thingDataUrl, $templateHint ) = @_;
|
||||
my ($session, $thingDataUrl, $templateHint, $callerAssetId ) = @_;
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_RenderThingData');
|
||||
return $i18n->get('no template') if !$templateHint;
|
||||
|
||||
|
|
@ -57,7 +62,7 @@ sub process {
|
|||
return ( $i18n->get('bad url') . $thingDataUrl ) if !$thing || !$thingId || !$thingDataId;
|
||||
|
||||
# Render
|
||||
my $output = $thing->www_viewThingData( $thingId, $thingDataId, $templateHint );
|
||||
my $output = $thing->www_viewThingData( $thingId, $thingDataId, $templateHint, $callerAssetId );
|
||||
|
||||
# FIX: Temporary solution (broken map due to template rendering <script> tags)
|
||||
return $i18n->get('bad tags') if $output =~ /script>/;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue