Commit 3edf01e2 authored by Raph El's avatar Raph El
Browse files
parents b41b8503 5016dd82
......@@ -2699,23 +2699,22 @@ var directory = {
str += '<hr>';
str += '<span class="col-xs-12 no-padding text-dark descMD">'+params.shortDescription+'</span>';
}
voteCount = "";
if(params.votes){
var vc = 0;
if(params.votes.up)
vc += Object.keys(params.votes.up).length;
if(params.votes.down)
vc += Object.keys(params.votes.down).length;
if(params.votes.uncomplet)
vc += Object.keys(params.votes.uncomplet).length;
if(params.votes.white)
vc += Object.keys(params.votes.white).length;
voteCount = " ("+vc+")";
}
//SHOW HIDE VOTE BTNs
if(typeof userId != "undefined" && userId != null && userId != ""){
var btnSize = (params.status == "amendementAndVote") ? "6" : "12";
voteCount = "";
if(params.votes){
var vc = 0;
if(params.votes.up)
vc += Object.keys(params.votes.up).length;
if(params.votes.down)
vc += Object.keys(params.votes.down).length;
if(params.votes.uncomplet)
vc += Object.keys(params.votes.uncomplet).length;
if(params.votes.white)
vc += Object.keys(params.votes.white).length;
voteCount = " ("+vc+")";
}
if( (params.status == "tovote" || params.status == "amendementAndVote") && params.hasVote ===false )
str += '<a href="javascript:;" '+ linkParams + ' data-coop-section="vote" class="bg-green openCoopPanelHtml btn col-sm-'+btnSize+' "><i class="fa fa-gavel"></i> '+trad.Vote+voteCount+'</a>';
//str += '<a href="javascript:" '+ linkParams + ' class="btn-openVoteDetail bg-green btn col-sm-'+btnSize+' "><i class="fa fa-gavel"></i> '+trad.Vote+'</a>';
......@@ -2735,13 +2734,13 @@ var directory = {
if(params.votes ){
str += "<div class='col-sm-12 padding-10'>";
if(params.votes.up)
str += "<div class='col-sm-3 text-green'><i class='fa fa-thumbs-up'></i> "+Object.keys(params.votes.up).length+"</div>";
str += "<div class='col-sm-3 text-green tooltips text-center' data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad.Agree+"'><i class='fa fa-thumbs-up'></i> "+Object.keys(params.votes.up).length+"</div>";
if(params.votes.down)
str += "<div class='col-sm-3 text-red'><i class='fa fa-thumbs-down'></i> "+Object.keys(params.votes.down).length+"</div>";
str += "<div class='col-sm-3 text-red tooltips text-center' data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad.Disagree+"'><i class='fa fa-thumbs-down'></i> "+Object.keys(params.votes.down).length+"</div>";
if(params.votes.uncomplet)
str += "<div class='col-sm-3 text-dark'><i class='fa fa-hand-grab-o'></i> "+Object.keys(params.votes.uncomplet).length+"</div>";
str += "<div class='col-sm-3 text-orange tooltips text-center' data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad.Uncomplet+"'><i class='fa fa-hand-grab-o'></i> "+Object.keys(params.votes.uncomplet).length+"</div>";
if(params.votes.white)
str += "<div class='col-sm-3 text-orange'><i class='fa fa-circle-o'></i> "+Object.keys(params.votes.white).length+"</div>";
str += "<div class='col-sm-3 text-dark tooltips text-center' data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad.Abstain+"'><i class='fa fa-circle-o'></i> "+Object.keys(params.votes.white).length+"</div>";
str += "</div>";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment