aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-18 16:26:00 -0800
committerzotlabs <mike@macgirvin.com>2016-12-18 16:26:00 -0800
commit92f3d863fa4a8a96d4f882a91a81d888a58230e5 (patch)
tree40798d2b1c46e869932d2780ce22e49fc2456749 /view
parente1819a874f334185e379db9390d493d12273704b (diff)
downloadvolse-hubzilla-92f3d863fa4a8a96d4f882a91a81d888a58230e5.tar.gz
volse-hubzilla-92f3d863fa4a8a96d4f882a91a81d888a58230e5.tar.bz2
volse-hubzilla-92f3d863fa4a8a96d4f882a91a81d888a58230e5.zip
re-factor item_photo_menu - there is some room for future development, currently it was made compatible with minimal template changes
Diffstat (limited to 'view')
-rwxr-xr-xview/tpl/conv_item.tpl17
-rwxr-xr-xview/tpl/search_item.tpl13
2 files changed, 23 insertions, 7 deletions
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 35c3d18e7..b5ff475b2 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -166,18 +166,27 @@
{{if $item.star}}
<li role="presentation"><a role="menuitem" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="fa fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i> {{$item.star.toggle}}</a></li>
{{/if}}
+
+ {{if $item.thread_action_menu}}
+ {{foreach $item.thread_action_menu as $mitem}}
+ <li role="presentation"><a role="menuitem" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="fa fa-{{$mitem.icon}}"></i> {{$mitem.title}}</a></li>
+ {{/foreach}}
+ {{/if}}
+
{{if $item.drop.dropping}}
<li role="presentation"><a role="menuitem" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="fa fa-trash-o"></i> {{$item.drop.delete}}</a></li>
{{/if}}
- {{if $item.item_photo_menu}}
+
+ {{if $item.thread_author_menu}}
<li role="presentation" class="divider"></li>
- {{$item.item_photo_menu}}
+ {{foreach $item.thread_author_menu as $mitem}}
+ <li role="presentation"><a role="menuitem" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a></li>
+ {{/foreach}}
+ {{/if}}
{{if $item.edpost && $item.dreport}}
<li role="presentation"><a role="menuitem" href="dreport/{{$item.mid}}">{{$item.dreport}}</a></li>
{{/if}}
-
- {{/if}}
</ul>
</div>
</div>
diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl
index 51fa8b8dc..a490cb473 100755
--- a/view/tpl/search_item.tpl
+++ b/view/tpl/search_item.tpl
@@ -74,13 +74,20 @@
<i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu">
- {{if $item.item_photo_menu}}
- {{$item.item_photo_menu}}
+ {{if $item.thread_action_menu}}
+ {{foreach $item.thread_action_menu as $mitem}}
+ <li role="presentation"><a role="menuitem" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="fa fa-{{$mitem.icon}}"></i> {{$mitem.title}}</a></li>
+ {{/foreach}}
{{/if}}
{{if $item.drop.dropping}}
- <li role="presentation" class="divider"></li>
<li><a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" ><i class="fa fa-trash-o"></i> {{$item.drop.delete}}</a></li>
{{/if}}
+ {{if $item.thread_author_menu}}
+ <li role="presentation" class="divider"></li>
+ {{foreach $item.thread_author_menu as $mitem}}
+ <li role="presentation"><a role="menuitem" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a></li>
+ {{/foreach}}
+ {{/if}}
</ul>
</div>
{{if $item.attachments}}