aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Dent <dentm42@dm42.net>2018-08-26 23:26:10 -0400
committerM.Dent <dentm42@dm42.net>2018-08-26 23:26:10 -0400
commita0c2bbac9d96a5461b65b5e0ff733a2fcd193dd4 (patch)
treec5317df08f71ac099c49a6e538d4d9a35f8ae097
parent2893f7d4810de99a989f7d36d041a120fafac029 (diff)
downloadvolse-hubzilla-a0c2bbac9d96a5461b65b5e0ff733a2fcd193dd4.tar.gz
volse-hubzilla-a0c2bbac9d96a5461b65b5e0ff733a2fcd193dd4.tar.bz2
volse-hubzilla-a0c2bbac9d96a5461b65b5e0ff733a2fcd193dd4.zip
Add hook to extend conv_item cog dropdown menu
-rw-r--r--Zotlabs/Lib/ThreadItem.php5
-rwxr-xr-xview/tpl/conv_item.tpl4
2 files changed, 9 insertions, 0 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index ed78ae00b..f8a7366f8 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -325,6 +325,10 @@ class ThreadItem {
$has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false);
+ $dropdown_extras_arr = [ 'item' => $item , 'dropdown_extras' => '' ];
+ call_hooks('dropdown_extras',$dropdown_extras_arr);
+ $dropdown_extras = $dropdown_extras_arr['dropdown_extras'];
+
$tmp_item = array(
'template' => $this->get_template(),
'mode' => $mode,
@@ -404,6 +408,7 @@ class ThreadItem {
'addtocal' => (($has_event) ? t('Add to Calendar') : ''),
'drop' => $drop,
'multidrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $multidrop : ''),
+ 'dropdown_extras' => $dropdown_extras,
// end toolbar buttons
'unseen_comments' => $unseen_comments,
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index ac6af40e9..05c3d7ae0 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -175,6 +175,10 @@
{{if $item.drop.dropping}}
<a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
{{/if}}
+ {{if $item.dropdown_extras}}
+ <div class="dropdown-divider"></div>
+ {{$item.dropdown_extras}}
+ {{/if}}
{{if $item.edpost && $item.dreport}}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>