Przeglądaj źródła

Add location to document page

Alan Lam 3 lat temu
rodzic
commit
b8752c7969
1 zmienionych plików z 11 dodań i 1 usunięć
  1. 11 1
      views/document.php

+ 11 - 1
views/document.php

@@ -15,10 +15,11 @@ use App\Helpers\HtmlHelper;
 $core = Core::getInstance();
 $user = $core->getUser();
 
-$company = $document->getCompany();
 $sale = $document->getSale();
 $related_document = $document->getRelatedDocument();
 
+$location = $document->getLocation();
+
 ?>
 <section class="mb-4">
 	<h3>
@@ -286,6 +287,15 @@ $related_document = $document->getRelatedDocument();
 					<dd><?=htmlspecialchars($user->formatDateTime($document->getDateTimeCreated()))?></dd>
 
 					<?php
+					if($location) {
+						?>
+						<dt><?=htmlspecialchars(__("Location"))?></dt>
+						<dd>
+							<a href="<?=htmlspecialchars($location->getUrl())?>"><?=htmlspecialchars($location->getDisplayName())?></a>
+						</dd>
+						<?php
+					}
+
 					if($sale) {
 						?>
 						<dt><?=htmlspecialchars(__("Related Sale"))?></dt>