11<?php
22/**
3- * @copyright 2016 City of Bloomington, Indiana
4- * @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt
3+ * @copyright 2016-2020 City of Bloomington, Indiana
4+ * @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE
55 * @param Zend\Db\Result $this->applications
66 * @param Committee $this->committee (optional)
77 * @param Applicant $this->applicant (optional)
@@ -26,6 +26,7 @@ use Application\Models\Person;
2626 $ userCanViewApplications = Person::isAllowed ('committees ' , 'applications ' );
2727 $ userCanViewApplicant = Person::isAllowed ('applicants ' , 'view ' );
2828 $ userCanArchive = Person::isAllowed ('applications ' , 'archive ' );
29+ $ userCanUnArchive = Person::isAllowed ('applications ' , 'unarchive ' );
2930 $ userCanDelete = Person::isAllowed ('applications ' , 'delete ' );
3031
3132 $ helper = $ this ->template ->getHelper ('buttonLink ' );
@@ -62,7 +63,14 @@ use Application\Models\Person;
6263
6364 if ($ this ->type === 'archived ' ) {
6465 $ archived = $ a ->getArchived (DATE_FORMAT );
65- echo "<td> $ archived</td> " ;
66+ $ button = '' ;
67+ if ($ userCanUnArchive ) {
68+ $ button = $ helper ->buttonLink (
69+ BASE_URI .'/applications/unarchive?application_id= ' .$ a ->getId (),
70+ $ this ->_ ('application_unarchive ' )
71+ );
72+ }
73+ echo "<td> $ archived $ button</td> " ;
6674 }
6775 else {
6876 $ expires = $ a ->getExpires (DATE_FORMAT );
0 commit comments