aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-10 19:10:18 -0800
committerfriendica <info@friendica.com>2015-02-10 19:10:18 -0800
commit79223b6b3d38bfbfb3a6d9530f6ccc5b7bb096c8 (patch)
tree18ee5a91f1ce6e8d4c964174549ac10f4ab949be /view
parent79da33dafdac1427ac07b4414a5da5f9f3a2b03d (diff)
downloadvolse-hubzilla-79223b6b3d38bfbfb3a6d9530f6ccc5b7bb096c8.tar.gz
volse-hubzilla-79223b6b3d38bfbfb3a6d9530f6ccc5b7bb096c8.tar.bz2
volse-hubzilla-79223b6b3d38bfbfb3a6d9530f6ccc5b7bb096c8.zip
item voting tools
Diffstat (limited to 'view')
-rwxr-xr-xview/tpl/conv_item.tpl13
-rwxr-xr-xview/tpl/conv_list.tpl12
-rwxr-xr-xview/tpl/jot-header.tpl10
-rwxr-xr-xview/tpl/jot.tpl6
4 files changed, 41 insertions, 0 deletions
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index df20eadbb..a902e5bda 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -76,6 +76,19 @@
<i class="icon-question" ></i>
</button>
{{/if}}
+
+ {{if $item.consensus}}
+ <button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
+ <i class="icon-check" ></i>
+ </button>
+ <button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
+ <i class="icon-check-empty" ></i>
+ </button>
+ <button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
+ <i class="icon-question" ></i>
+ </button>
+ {{/if}}
+
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<i class="icon-caret-down"></i>
</button>
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index ad086ee0a..8d454f1eb 100755
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -78,6 +78,18 @@
</button>
{{/if}}
+ {{if $item.consensus}}
+ <button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
+ <i class="icon-plus" ></i>
+ </button>
+ <button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
+ <i class="icon-minus" ></i>
+ </button>
+ <button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
+ <i class="icon-question" ></i>
+ </button>
+ {{/if}}
+
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<i class="icon-caret-down"></i>
</button>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 678d16a71..8daf2ddb7 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -309,6 +309,16 @@ function enableOnUser(){
timer = setTimeout(NavUpdate,1000);
}
+ function toggleVoting() {
+ if($('#jot-consensus').val() > 0) {
+ $('#jot-consensus').val(0);
+ $('#profile-voting').removeClass('icon-check').addClass('icon-check-empty');
+ }
+ else {
+ $('#jot-consensus').val(1);
+ $('#profile-voting').removeClass('icon-check-empty').addClass('icon-check');
+ }
+ }
function jotClearLocation() {
$('#jot-coord').val('');
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index 00ef77d93..f32dba095 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -11,6 +11,7 @@
<input type="hidden" name="post_id" value="{{$post_id}}" />
<input type="hidden" name="webpage" value="{{$webpage}}" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
+ <input type="hidden" id="jot-consensus" name="consensus" value="{{if $consensus}}{{$consensus}}{{else}}0{{/if}}" />
{{if $showacl}}{{$acl}}{{/if}}
{{$mimeselect}}
{{$layoutselect}}
@@ -77,6 +78,11 @@
<i id="profile-encrypt" class="icon-key jot-icons"></i>
</button>
{{/if}}
+ {{if $feature_voting}}
+ <button id="profile-voting-wrapper" class="btn btn-default btn-sm" title="{{$voting}}" onclick="toggleVoting();return false;">
+ <i id="profile-voting" class="icon-check-empty jot-icons"></i>
+ </button>
+ {{/if}}
</div>
</div>
<div id="profile-rotator-wrapper">