#set( $apphome = "/${order.applicationid}")

[[Hello]],


#set( $ordertype = $order.get("ordertype") ) #set( $status = $order.get("checkoutstatus") ) #if( $ordertype == "checkout") #if( $status == "approved")

[[Your request has been approved, you can now download the following assets]]. #else

[[Your request has been rejected, review the below notes]]. #end #else

$userManager.getScreenName( $order.userid ) [[has shared some assets with you]]. #end #if($order.sharenote) [[Below is a note that was attached]]:

$order.sharenote

#else

#end #if( $status == "approved")

[[Please review the assets at this link]]: $context.siteRoot$home$apphome/views/modules/asset/activity/checkout/emailedassets.html?orderid=$order.id

#end #if( $order.expireson) [[Access to these files will expire on ]] #if( $expiresondate ) ##Use this since events do not have a locale $expiresformat.format($expiresondate) #else $context.getDateTime($order.expireson) #end #end

#set($orderitems = $mediaarchive.getSearcher("orderitem").query().exact("orderid", $order.id).search())
#if( $status == "rejected")

[[Below is a list of assets that has been rejected]]:

#else

[[Below is a list of assets available at the link above]]:

#end #foreach( $item in $orderitems ) #set( $asset = $mediaarchive.getAssetBySourcePath($item.assetsourcepath)) $context.putPageValue("asset", $asset) $context.putPageValue("item", $item) $context.setRequestParameter("sourcepath", $asset.sourcepath) #end
[[Title]] [[File Name]] [[Asset Type]] [[Format]]
$!asset.assettitle $!asset.name $!searcherManager.getData($catalogid,"assettype",$asset.assettype).getName($context.getLocale()) #set($val=$context.getRequestParameter("${item.id}.presetid.value")) #if( !$val) #set( $val = $item.get("presetid") ) #end #if( $val ) #set($preset = $searcherManager.getData($catalogid, "convertpreset",$val )) $!preset.getName($context.getLocale()) #else [[Online Preview]] #end