$action.getActionName($action.getClass().getName())

#rssautodiscovery($action.rssDescriptor) #applyDecorator("root") #decoratorParam("helper" $action.helper) #decoratorParam("context" "space-mails") #decoratorParam("mode" "view-mail-archive") $action.space.key #set( $contextPath = "viewmailarchive.action?key=${key}&" )

#if( $permissionCheckDispatcher.isPermitted("/spaces/fetchnewmail.action?key=$key") ) #if ($action.hasMailAccounts()) $action.getText("fetch.new.mail") #else $action.getText("mail.archive.notconfigured") #if($permissionCheckDispatcher.isPermitted("/spaces/addmailaccount.action?key=$key"))($action.getText("add.mail.account"))#end #end #end | #if ($action.paginationSupport.total > 0) #if( $permissionCheckDispatcher.isPermitted("/spaces/removemail.action?key=$key") ) $action.getText("delete.all.num", [$action.paginationSupport.total]) #end #end

#if ($action.polling) #if ($action.pollSuccessful)
$action.getText("mail.poll.success")
#else
$action.getText("mail.poll.error")
#end #if ($action.pollResults.size() == 0)

$action.getText("mail.poll.noservers")

#else

#foreach ($result in $action.pollResults) #if ($result.success) #if ($result.mailRetrieved == 0)
- $action.getText("mail.poll.server.nomail", [ $result.mailAccountDescription ])
#else
- $action.getText("mail.poll.server.success", [ $result.mailAccountDescription, $result.mailRetrieved ])
#end #else
- $action.getText("mail.poll.server.error", [ $result.mailAccountDescription, $result.errorMessage ])
#end #end

#end
#end #if ($action.paginationSupport.total > 0) #pagination($action.paginationSupport $contextPath)

$action.getText("column.sender") | $action.getText("column.subject") | $action.getText("column.date") #if( $permissionCheckDispatcher.isPermitted("/spaces/removemail.action?key=$key&id=$mail.id") ) | $action.getText("column.remove") #end
--- | --- | --- | ---
#set ($startIndex = $action.paginationSupport.startIndex) #set( $currentItems = $action.paginationSupport.items) #foreach( $mail in $currentItems )
$action.getSender($mail.getFrom()) | #contentLink($mail) | $dateFormatter.format( $mail.getCreationDate() ) #if( $permissionCheckDispatcher.isPermitted("/spaces/removemail.action?key=$key&id=$mail.id") ) | #end
#end

#pagination($action.paginationSupport $contextPath) #else

$action.getText("mail.archive.no.mails")

#end