-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show staff names, but not citizen names
Only show people's names if the user is logged in, or if the person to display is a city staff member. Updates #363
- Loading branch information
Showing
7 changed files
with
72 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,48 @@ | ||
<?php | ||
/** | ||
* @copyright 2011-2020 City of Bloomington, Indiana | ||
* @copyright 2011-2021 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE | ||
* @param array $this->history | ||
* @param Ticket $this->ticket (optional) | ||
* @param bool $this->disableComments (optional) | ||
*/ | ||
use Application\Models\Action; | ||
use Application\Models\Person; | ||
?> | ||
<section class="history"> | ||
<header> | ||
<h1><?= $this->_('history'); ?></h1> | ||
</header> | ||
<?php | ||
if (Person::isAllowed('people', 'view')) { | ||
$this->_include('ticketHistory/partials/personalInfo.inc'); | ||
} | ||
else { | ||
$this->_include('ticketHistory/partials/genericInfo.inc'); | ||
$canViewPeople = Person::isAllowed('people', 'view'); | ||
|
||
foreach ($this->history as $event) { | ||
$description = $event->getDescription($this->template); | ||
echo " | ||
<article class=\"historyItem\"> | ||
<header> | ||
<h1>{$event->getActionDate(DATETIME_FORMAT)} $description</h1> | ||
</header> | ||
"; | ||
|
||
if (!$this->disableComments) { | ||
$notes = self::escape($event->getNotes()); | ||
if ($notes) { | ||
echo "<p>$notes</p>"; | ||
} | ||
} | ||
switch ($event->getAction()->getName()) { | ||
case Action::UPDATED: | ||
if ($event->getData()) { echo json_encode($event->getData()); } | ||
break; | ||
} | ||
|
||
$notification = $event->getSentNotifications(); | ||
if ($notification) { | ||
$this->notification = $notification; | ||
$this->_include('ticketHistory/sentNotification.inc'); | ||
} | ||
echo "</article>"; | ||
} | ||
?> | ||
</section> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters