mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add hooks showDocumentKeywords and showDocumentCategory
This commit is contained in:
parent
969c9daba4
commit
a17a190da1
|
@ -3,8 +3,9 @@
|
|||
--------------------------------------------------------------------------------
|
||||
- add hooks showDocumentAttribute and showDocumentContentAttribute in Search view
|
||||
- fix layout problems of select2 menu, add option for adding an icon to each option
|
||||
- better import for users from csv file
|
||||
- better import of users from csv file
|
||||
- fix various methods in restapi (Closes: #481)
|
||||
- add hooks showDocumentKeywords and showDocumentCategories
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.18
|
||||
|
|
|
@ -284,6 +284,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
}
|
||||
if($document->getKeywords()) {
|
||||
$arr = $this->callHook('showDocumentKeywords', $document);
|
||||
if(is_array($arr)) {
|
||||
echo "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1]."</td>";
|
||||
echo "</tr>";
|
||||
} elseif(is_string($arr)) {
|
||||
echo $arr;
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php printMLText("keywords");?>:</td>
|
||||
|
@ -291,21 +300,32 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if($cats = $document->getCategories()) {
|
||||
$arr = $this->callHook('showDocumentCategories', $document);
|
||||
if(is_array($arr)) {
|
||||
echo "<tr>";
|
||||
echo "<td>".$arr[0].":</td>";
|
||||
echo "<td>".$arr[1]."</td>";
|
||||
echo "</tr>";
|
||||
} elseif(is_string($arr)) {
|
||||
echo $arr;
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php printMLText("categories");?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
<?php
|
||||
$ct = array();
|
||||
foreach($cats as $cat)
|
||||
$ct[] = htmlspecialchars($cat->getName());
|
||||
echo implode(', ', $ct);
|
||||
?>
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$attributes = $document->getAttributes();
|
||||
|
|
Loading…
Reference in New Issue
Block a user