Verified Commit 8bcecf09 authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Dynamic status filter according to the type of message

parent 2f9977ee
......@@ -94,6 +94,18 @@ trait archiveDeliveryTrait
$this->prepareMesageList($messages, true);
$this->initHistoryForm();
$statuses = [
'new' => $this->translator->getText('new'),
'sent' => $this->translator->getText('sent'),
'accepted' => $this->translator->getText('accepted'),
'rejected' => $this->translator->getText('rejected'),
'processing' => $this->translator->getText('processing'),
'processed' => $this->translator->getText('processed'),
'invalid' => $this->translator->getText('invalid'),
'error' => $this->translator->getText('error')
];
$this->view->setSource('statuses', $statuses);
$this->view->merge();
return $this->view->saveHtml();
......
......@@ -80,6 +80,18 @@ trait archiveDestructionTrait
$this->prepareMesageList($messages, true);
$this->initHistoryForm();
$statuses = [
'sent' => $this->translator->getText('sent'),
'validated' => $this->translator->getText('validated'),
'accepted' => $this->translator->getText('accepted'),
'rejected' => $this->translator->getText('rejected'),
'processing' => $this->translator->getText('processing'),
'processed' => $this->translator->getText('processed'),
'invalid' => $this->translator->getText('invalid'),
'error' => $this->translator->getText('error')
];
$this->view->setSource('statuses', $statuses);
$this->view->merge();
return $this->view->saveHtml();
......
......@@ -40,6 +40,12 @@ trait archiveNotificationTrait
$this->prepareMesageList($messages, true);
$this->initHistoryForm();
$statuses = [
'sent' => $this->translator->getText('sent'),
'error' => $this->translator->getText('error')
];
$this->view->setSource('statuses', $statuses);
$this->view->merge();
return $this->view->saveHtml();
......
......@@ -76,6 +76,22 @@ trait archiveOutgoingTransferTrait
$this->prepareMesageList($messages, true);
$this->initHistoryForm();
$statuses = [
'sent' => $this->translator->getText('sent'),
'transferable' => $this->translator->getText('transferable'),
'downloaded' => $this->translator->getText('downloaded'),
'validating' => $this->translator->getText('validating'),
'validated' => $this->translator->getText('validated'),
'accepted' => $this->translator->getText('accepted'),
'rejected' => $this->translator->getText('rejected'),
'acknowledge' => $this->translator->getText('acknowledge'),
'processing' => $this->translator->getText('processing'),
'processed' => $this->translator->getText('processed'),
'invalid' => $this->translator->getText('invalid'),
'error' => $this->translator->getText('error')
];
$this->view->setSource('statuses', $statuses);
$this->view->merge();
return $this->view->saveHtml();
......
......@@ -94,6 +94,20 @@ trait archiveRestitutionTrait
$this->prepareMesageList($messages, true);
$this->initHistoryForm();
$statuses = [
'sent' => $this->translator->getText('sent'),
'received' => $this->translator->getText('received'),
'acknowledge' => $this->translator->getText('acknowledge'),
'validated' => $this->translator->getText('valid'),
'accepted' => $this->translator->getText('accepted'),
'rejected' => $this->translator->getText('rejected'),
'processing' => $this->translator->getText('processing'),
'processed' => $this->translator->getText('processed'),
'invalid' => $this->translator->getText('invalid'),
'error' => $this->translator->getText('error')
];
$this->view->setSource('statuses', $statuses);
$this->view->merge();
return $this->view->saveHtml();
......
......@@ -93,6 +93,23 @@ trait archiveTransferTrait
$this->prepareMesageList($messages, true);
$this->initHistoryForm();
$statuses = [
'template' => $this->translator->getText('template'),
'draft' => $this->translator->getText('draft'),
'sent' => $this->translator->getText('sent'),
'received' => $this->translator->getText('received'),
'valid' => $this->translator->getText('valid'),
'accepted' => $this->translator->getText('accepted'),
'processing' => $this->translator->getText('processing'),
'processed' => $this->translator->getText('processed'),
'toBeModified' => $this->translator->getText('toBeModified'),
'modified' => $this->translator->getText('modified'),
'rejected' => $this->translator->getText('rejected'),
'invalid' => $this->translator->getText('invalid'),
'error' => $this->translator->getText('error')
];
$this->view->setSource('statuses', $statuses);
$this->view->merge();
return $this->view->saveHtml();
......
......@@ -84,16 +84,8 @@
<div class="col-sm-8">
<select class="form-control input-sm" name="status">
<option value=""></option>
<option value="sent">sent</option>
<option value="validated">validated</option>
<option value="accepted">accepted</option>
<option value="rejected">rejected</option>
<option value="processing">processing</option>
<option value="processed">processed</option>
<option value="error">error</option>
<option value="invalid">invalid</option>
<option value="toBeModified">To be modified</option>
<option value="Modified">Modifié</option>
<?merge statuses.array() ?>
<option value="[?merge statuses.key() ?]"><?merge . ?></option>
</select>
</div>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment