aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-07 18:29:38 -0800
committerzotlabs <mike@macgirvin.com>2016-11-07 18:29:38 -0800
commitc427fe94dae41a6c2899d426cfd0945f93347b56 (patch)
tree73cea7d3ee105dc0800173ddf816b141bc3951b3
parent66f74379659be970bb28d1d2e8efcdbce13637f3 (diff)
downloadvolse-hubzilla-c427fe94dae41a6c2899d426cfd0945f93347b56.tar.gz
volse-hubzilla-c427fe94dae41a6c2899d426cfd0945f93347b56.tar.bz2
volse-hubzilla-c427fe94dae41a6c2899d426cfd0945f93347b56.zip
cleanup and re-organise the voting and attendance buttons
-rw-r--r--Zotlabs/Lib/ThreadItem.php4
-rw-r--r--view/css/conversation.css4
-rwxr-xr-xview/tpl/conv_item.tpl51
3 files changed, 40 insertions, 19 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index a3e871810..48b50b295 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -355,6 +355,10 @@ class ThreadItem {
'unverified' => $unverified,
'forged' => $forged,
'location' => $location,
+ 'attend_label' => t('Attend'),
+ 'attend_title' => t('Attendance Options'),
+ 'vote_label' => t('Vote'),
+ 'vote_title' => t('Voting Options'),
'indent' => $indent,
'owner_url' => $this->get_owner_url(),
'owner_photo' => $this->get_owner_photo(),
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 9272ed3f6..0b6674b15 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -203,6 +203,10 @@ a.wall-item-name-link {
filter:alpha(opacity=100);
}
+.item-act-list {
+ width: 20px;
+}
+
.shared_header {
margin-bottom: 20px;
}
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 79c22b4c1..4f59dccec 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -103,27 +103,40 @@
</button>
{{/if}}
{{if $item.isevent}}
- <button type="button" title="{{$item.attend.0}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
- <i class="fa fa-check{{if $item.my_responses.attend}} ivoted{{/if}}" ></i>
- </button>
- <button type="button" title="{{$item.attend.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'attendno'); return false;">
- <i class="fa fa-times{{if $item.my_responses.attendno}} ivoted{{/if}}" ></i>
- </button>
- <button type="button" title="{{$item.attend.2}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
- <i class="fa fa-question{{if $item.my_responses.attendmaybe}} ivoted{{/if}}" ></i>
- </button>
+ <div class="btn-group dropdown">
+ <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-attend-menu-{{$item.id}}" title="{{$item.attend_title}}">
+ <i class="fa fa-check-square-o"></i>
+ </button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-attend-menu-{{$item.id}}">
+ <li role="presentation"><a class="menuitem" href="#" title="{{$item.attend.0}}" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
+ <i class="item-act-list fa fa-check{{if $item.my_responses.attend}} ivoted{{/if}}" ></i> {{$item.attend.0}}</a>
+ </li>
+ <li role="presentation"><a class="menuitem" href="#" title="{{$item.attend.1}}" onclick="itemAddToCal({{$item.id}}), dolike({{$item.id}},'attendno'); return false;">
+ <i class="item-act-list fa fa-times{{if $item.my_responses.attendno}} ivoted{{/if}}" ></i> {{$item.attend.1}}</a>
+ </li>
+ <li role="presentation"><a class="menuitem" href="#" title="{{$item.attend.2}}" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
+ <i class="item-act-list fa fa-question{{if $item.my_responses.attendmaybe}} ivoted{{/if}}" ></i> {{$item.attend.2}}</a>
+ </li>
+ </ul>
+ </div>
{{/if}}
-
{{if $item.canvote}}
- <button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
- <i class="fa fa-check{{if $item.my_responses.agree}} ivoted{{/if}}" ></i>
- </button>
- <button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
- <i class="fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i>
- </button>
- <button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
- <i class="fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i>
- </button>
+ <div class="btn-group dropdown">
+ <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-consensus-menu-{{$item.id}}" title="{{$item.vote_title}}">
+ <i class="fa fa-check-square-o"></i>
+ </button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-consensus-menu-{{$item.id}}">
+ <li role="presentation"><a class="menuitem" href="#" title="{{$item.conlabels.0}}" onclick="dolike({{$item.id}},'agree'); return false;">
+ <i class="item-act-list fa fa-check{{if $item.my_responses.agree}} ivoted{{/if}}" ></i> {{$item.conlabels.0}}</a>
+ </li>
+ <li role="presentation"><a class="menuitem" href="#" title="{{$item.conlabels.1}}" onclick="dolike({{$item.id}},'disagree'); return false;">
+ <i class="item-act-list fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i> {{$item.conlabels.1}}</a>
+ </li>
+ <li role="presentation"><a class="menuitem" href="#" title="{{$item.conlabels.2}}" onclick="dolike({{$item.id}},'abstain'); return false;">
+ <i class="item-act-list fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i> {{$item.conlabels.2}}</a>
+ </li>
+ </ul>
+ </div>
{{/if}}
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<i class="fa fa-caret-down"></i>