View packaging in progress

This commit is contained in:
Claude Brisson
2023-06-12 19:58:03 +02:00
parent 453d6d6570
commit 82bb0115ae
64 changed files with 81333 additions and 119 deletions

View File

@@ -0,0 +1,44 @@
#macro(forward $url)
## $log.debug("forwarding towards $url")
$request.session.servletContext.getRequestDispatcher($url).forward($request,$response)
#end
#macro(redirect $url)
$log.debug("redirecting towards $url")
$response.sendRedirect($url)
#end
#macro(seterror $msg)##
$log.error($msg)##
$session.setAttribute('error',$msg)##
#end
#macro(clearerror)##
$session.removeAttribute('error')##
#end
#macro(setmessage $msg)##
$log.info($msg)##
#if($message)##
$session.setAttribute('message',"$message<br/>$msg")##
#else##
$session.setAttribute('message',$msg)##
#end##
#end
#macro(clearmessage)##
$session.removeAttribute('message')##
#end
#macro(api_error $message)
$api.exception($message)
#end
#macro(euro $amount)
$number.format('#0.00 €', $amount)##
#end
#macro(ttc $amount)
#set($ttc = $amount * 1.2)##
$number.format('#0.00 €', $ttc)##
#end