Skip to content

Commit

Permalink
feat(category): show category comment in service catalog
Browse files Browse the repository at this point in the history
closes #394
  • Loading branch information
btry committed Apr 14, 2023
1 parent 1b28968 commit 0972714
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions inc/category.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public static function getCategoryTree(): array {
'SELECT' => [
'id',
'name',
'comment',
"$categoryFk as parent",
'level',
new QueryExpression(
Expand Down
1 change: 1 addition & 0 deletions inc/knowbase.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public static function getCategoryTree() {
'SELECT' => [
KnowbaseItemCategory::getTableField('id'),
KnowbaseItemCategory::getTableField('name'),
KnowbaseItemCategory::getTableField('comment'),
KnowbaseItemCategory::getTableField($cat_fk),
$items_subquery,
],
Expand Down
5 changes: 3 additions & 2 deletions js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ function buildKbCategoryList(tree) {
if (tree.id != 0) {
html += '<a href="#" data-parent-category-id="' + tree.parent +'"'
+ ' data-category-id="' + tree.id + '"'
+ ' onclick="plugin_formcreator.updateKbitemsView(this)">'
+ ' onclick="plugin_formcreator.updateKbitemsView(this)"'
+ ' title="' + tree.comment + '">'
+ tree.name
+ '</a>';
}
Expand All @@ -364,7 +365,7 @@ function buildCategoryList(tree) {
html = '<a href="#" data-parent-category-id="' + tree.parent +'"'
+ ' data-category-id="' + tree.id + '"'
+ ' onclick="plugin_formcreator.updateWizardFormsView(this)"'
+ 'title="' + tree.name + '">'
+ ' title="' + tree.comment + '">'
+ tree.name
+ '</a>';
}
Expand Down

0 comments on commit 0972714

Please sign in to comment.