Skip to content

Commit 6b913ec

Browse files
authored
Merge pull request #114 from VSEphpbb/voters
Use CSS-based thumbs-up/down ratings
2 parents c34d5fe + 8450a5c commit 6b913ec

13 files changed

Lines changed: 138 additions & 81 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535
],
3636
"require": {
37-
"php": ">=5.5",
37+
"php": ">=5.4",
3838
"composer/installers": "~1.0"
3939
},
4040
"extra": {

event/listener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ public function show_idea($event)
243243
'S_CAN_VOTE_UP' => $can_vote && !$s_voted_up,
244244
'S_CAN_VOTE_DOWN' => $can_vote && !$s_voted_down,
245245
'S_VOTED' => $s_voted_up || $s_voted_down,
246+
'S_VOTED_UP' => $s_voted_up,
247+
'S_VOTED_DOWN' => $s_voted_down,
246248

247249
'U_CHANGE_STATUS' => $this->link_helper->get_idea_link($idea['idea_id'], 'status', true),
248250
'U_EDIT_DUPLICATE' => $this->link_helper->get_idea_link($idea['idea_id'], 'duplicate', true),

ext.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ class ext extends \phpbb\extension\base
2626
* the minimum version required by this extension:
2727
*
2828
* Requires phpBB 3.2.1 due to use of $event->update_subarray()
29-
* and PHP 5.5.0 due to use of array_column()
3029
*
3130
* @return bool
3231
* @access public
3332
*/
3433
public function is_enableable()
3534
{
36-
return phpbb_version_compare(PHPBB_VERSION, '3.2.1', '>=')
37-
&& phpbb_version_compare(PHP_VERSION, '5.5.0', '>=');
35+
return phpbb_version_compare(PHPBB_VERSION, '3.2.1', '>=');
3836
}
3937
}

factory/ideas.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ public function get_ideas($number = 10, $sort = 'date', $sort_direction = 'DESC'
214214
$idea_ids = array_column($rows, 'idea_id');
215215

216216
$topic_tracking_info = get_complete_topic_tracking((int) $this->config['ideas_forum_id'], $topic_ids);
217-
$user_voting_info = $this->get_users_votes($this->user->id, $idea_ids);
217+
$user_voting_info = $this->get_users_votes($this->user->data['user_id'], $idea_ids);
218218

219219
foreach ($rows as &$row)
220220
{
221221
$row['read'] = !(isset($topic_tracking_info[$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$row['topic_id']]);
222-
$row['u_voted'] = isset($user_voting_info[$row['idea_id']]) ? (string) $user_voting_info[$row['idea_id']] : '';
222+
$row['u_voted'] = isset($user_voting_info[$row['idea_id']]) ? (int) $user_voting_info[$row['idea_id']] : '';
223223
}
224224
unset ($row);
225225
}

language/en/common.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@
9595

9696
'UPDATED_VOTE' => 'Successfully updated vote!',
9797

98+
'USER_ALREADY_VOTED' => [
99+
0 => 'You voted against this idea',
100+
1 => 'You voted for this idea',
101+
],
102+
98103
'VIEW_IDEA' => 'View Idea',
99104
'VIEW_IMPLEMENTED' => 'View all implemented ideas',
100105
'VIEW_LATEST' => 'View all open ideas',

styles/prosilver/template/idea_body.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,32 @@
1515
<dt class="idealabel">{{ lang('RATING') ~ lang('COLON') }}</dt>
1616
<dd>
1717
<div class="rating">
18-
<a {% if S_CAN_VOTE %}href="{{ U_IDEA_VOTE }}"{% endif %} class="minivoteup {{ S_CAN_VOTE_UP ? 'voteup' : 'dead' }}" title="{{ lang('VOTE_UP') }}" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('VOTE_ERROR') ~ lang('COLON') }}"><span>{{ IDEA_VOTES_UP }}</span></a> &nbsp;
19-
<a {% if S_CAN_VOTE %}href="{{ U_IDEA_VOTE }}"{% endif %} class="minivotedown {{ S_CAN_VOTE_DOWN ? 'votedown' : 'dead' }}" title="{{ lang('VOTE_DOWN') }}" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('VOTE_ERROR') ~ lang('COLON') }}"><span>{{ IDEA_VOTES_DOWN }}</span></a>
18+
<a {% if S_CAN_VOTE %}href="{{ U_IDEA_VOTE }}"{% endif %} class="minivote vote-up{{ not S_CAN_VOTE_UP ? ' vote-disabled' }}" title="{{ lang('VOTE_UP') }}" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('VOTE_ERROR') ~ lang('COLON') }}"><i class="icon fa-check-circle user-voted{{ not S_VOTED_UP ? ' hidden' }}" aria-hidden="true"></i><i class="icon fa-thumbs-up"></i><span class="vote-count">{{ IDEA_VOTES_UP }}</span></a> &nbsp;
19+
<a {% if S_CAN_VOTE %}href="{{ U_IDEA_VOTE }}"{% endif %} class="minivote vote-down{{ not S_CAN_VOTE_DOWN ? ' vote-disabled' }}" title="{{ lang('VOTE_DOWN') }}" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('VOTE_ERROR') ~ lang('COLON') }}"><i class="icon fa-check-circle user-voted{{ not S_VOTED_DOWN ? ' hidden' }}" aria-hidden="true"></i><i class="icon fa-thumbs-down"></i><span class="vote-count">{{ IDEA_VOTES_DOWN }}</span></a>
2020
<a href="#" class="votes bg3" data-l-msg="{{ lang('CLICK_TO_VIEW') }}">{{ lang('TOTAL_POINTS', IDEA_POINTS) }} {{ IDEA_VOTES ? lang('CLICK_TO_VIEW') }}</a> <span class="successvoted bg3" data-l-err="{{ lang('VOTE_FAIL') }}"></span>
2121
</div>
2222
<div class="clear"></div>
2323
<div class="voteslist bg3" data-display="{{ IDEA_VOTES ? 'true' : 'false' }}">
2424
<ul>
2525
<li id="up-voters"{% if votes_up is empty %} style="display:none;"{% endif %}>
26-
<i class="fa fa-fw fa-thumbs-up"></i>
26+
<i class="icon icon-tiny fa-fw fa-thumbs-up"></i>
2727
<span>
2828
{% for vote_up in votes_up %}
2929
{{ vote_up.USER }}{% if not vote_up.S_LAST_ROW %}, {% endif %}
3030
{% endfor %}
3131
</span>
3232
</li>
3333
<li id="down-voters"{% if votes_down is empty %} style="display:none;"{% endif %}>
34-
<i class="fa fa-fw fa-thumbs-down"></i>
34+
<i class="icon icon-tiny fa-fw fa-thumbs-down"></i>
3535
<span>
3636
{% for vote_down in votes_down %}
3737
{{ vote_down.USER }}{% if not vote_down.S_LAST_ROW %}, {% endif %}
3838
{% endfor %}
3939
</span>
4040
</li>
4141
{% if S_CAN_VOTE %}
42-
<li id="vote-remove"{% if S_VOTED == false %} style="display:none;"{% endif %}>
43-
<i class="fa fa-fw fa-times"></i> <a href="{{ U_REMOVE_VOTE }}" class="removevote" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('VOTE_ERROR') ~ lang('COLON') }}">{{ lang('REMOVE_VOTE') }}</a>
42+
<li id="vote-remove"{% if S_VOTED == false %} class="hidden"{% endif %}>
43+
<i class="icon icon-tiny fa-fw fa-times"></i> <a href="{{ U_REMOVE_VOTE }}" class="removevote" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('VOTE_ERROR') ~ lang('COLON') }}">{{ lang('REMOVE_VOTE') }}</a>
4444
</li>
4545
{% endif %}
4646
</ul>
@@ -59,7 +59,7 @@
5959
<dd>
6060
<a id="rfclink" class="ideamodbtn" href="{{ IDEA_RFC }}"{% if not IDEA_RFC %} style="display:none"{% endif %}>{{ IDEA_RFC }}</a>
6161
{% if S_CAN_EDIT %}
62-
<a href="{{ U_EDIT_RFC }}" id="rfcedit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_RFC %}<i class="fa fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="fa fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
62+
<a href="{{ U_EDIT_RFC }}" id="rfcedit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_RFC %}<i class="icon fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="icon fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
6363
<input type="text" id="rfceditinput" class="ideainput" value="{{ IDEA_RFC }}" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('RFC_ERROR') }}" />
6464
{% endif %}
6565
</dd>
@@ -69,7 +69,7 @@
6969
<dd>
7070
<a id="ticketlink" class="ideamodbtn" {% if IDEA_TICKET %}href="https://tracker.phpbb.com/browse/PHPBB3-{{ IDEA_TICKET }}">PHPBB3-{{ IDEA_TICKET }}{% else %}style="display:none">{% endif %}</a>
7171
{% if S_CAN_EDIT %}
72-
<a href="{{ U_EDIT_TICKET }}" id="ticketedit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_TICKET %}<i class="fa fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="fa fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
72+
<a href="{{ U_EDIT_TICKET }}" id="ticketedit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_TICKET %}<i class="icon fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="icon fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
7373
<input type="text" id="ticketeditinput" class="ideainput"{% if IDEA_TICKET %} value="PHPBB3-{{ IDEA_TICKET }}"{% endif %} placeholder="PHPBB3-#####" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('TICKET_ERROR') }}" />
7474
{% endif %}
7575
</dd>
@@ -79,7 +79,7 @@
7979
<dd class="duplicatetoggle" {% if IDEA_STATUS_ID != STATUS_ARY.DUPLICATE %}style="display:none"{% endif %}>
8080
<a id="duplicatelink" class="ideamodbtn" data-link="{{ U_IDEA_DUPLICATE }}" data-l-msg="{{ lang('IDEA_NUM') }}" {% if IDEA_DUPLICATE %}href="{{ U_IDEA_DUPLICATE }}">{{ lang('IDEA_NUM') ~ IDEA_DUPLICATE }}{% else %}style="display:none">{% endif %}</a>
8181
{% if S_IS_MOD %}
82-
<a href="{{ U_EDIT_DUPLICATE }}" id="duplicateedit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_DUPLICATE %}<i class="fa fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="fa fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
82+
<a href="{{ U_EDIT_DUPLICATE }}" id="duplicateedit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_DUPLICATE %}<i class="icon fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="icon fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
8383
<input type="text" id="duplicateeditinput" class="ideainput"{% if IDEA_DUPLICATE %} value="{{ IDEA_DUPLICATE }}"{% endif %} placeholder="###" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('TICKET_ERROR_DUP') }}" />
8484
{% endif %}
8585
</dd>
@@ -89,7 +89,7 @@
8989
<dd class="implementedtoggle" {% if IDEA_STATUS_ID != STATUS_ARY.IMPLEMENTED %}style="display:none"{% endif %}>
9090
<span id="implementedversion"{% if not IDEA_IMPLEMENTED %} style="display:none;"{% endif %}>{{ IDEA_IMPLEMENTED }}</span>
9191
{% if S_IS_MOD %}
92-
<a href="{{ U_EDIT_IMPLEMENTED }}" id="implementededit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_IMPLEMENTED %}<i class="fa fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="fa fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
92+
<a href="{{ U_EDIT_IMPLEMENTED }}" id="implementededit" data-l-add="{{ lang('ADD') }}" data-l-edit="{{ lang('EDIT') }}">{% if IDEA_IMPLEMENTED %}<i class="icon fa-fw fa-pencil"></i>{{ lang('EDIT') }}{% else %}<i class="icon fa-fw fa-plus-circle"></i>{{ lang('ADD') }}{% endif %}</a>
9393
<input type="text" id="implementededitinput" class="ideainput"{% if IDEA_IMPLEMENTED %} value="{{ IDEA_IMPLEMENTED }}"{% endif %} placeholder="3.x.x" data-l-err="{{ lang('ERROR') }}" data-l-msg="{{ lang('IMPLEMENTED_ERROR') }}" />
9494
{% endif %}
9595
</dd>

styles/prosilver/template/ideas.js

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,20 @@
2626
removeVote: $('.removevote'),
2727
status: $('#status'),
2828
successVoted: $('.successvoted'),
29+
userVoted: $('.user-voted'),
2930
votes: $('.votes'),
3031
votesList: $('.voteslist'),
31-
voteDown: $('.minivotedown'),
32-
voteUp: $('.minivoteup'),
32+
voteDown: $('.vote-down'),
33+
voteUp: $('.vote-up'),
3334
voteRemove: $('#vote-remove')
34-
};
35+
}, $loadingIndicator;
3536

3637
function voteSuccess(result, $this) {
3738
if (typeof result === 'string') {
3839
phpbb.alert($this.attr('data-l-err'), $this.attr('data-l-msg') + ' ' + result);
3940
} else {
40-
$obj.voteUp.first().html('<span>' + result.votes_up + '</span>');
41-
$obj.voteDown.first().html('<span>' + result.votes_down + '</span>');
41+
$obj.voteUp.find('.vote-count').text(result.votes_up);
42+
$obj.voteDown.find('.vote-count').text(result.votes_down);
4243
$obj.votes.hide().text(function() {
4344
return result.points + ' ' + $(this).attr('data-l-msg');
4445
});
@@ -69,17 +70,18 @@
6970

7071
var $this = $(this),
7172
url = $this.attr('href'),
72-
vote = $this.is('.voteup') ? 1 : 0;
73+
vote = $this.is($obj.voteUp) ? 1 : 0;
7374

74-
if ($this.is('.dead')) {
75+
if ($this.hasClass('vote-disabled')) {
7576
return false;
7677
}
7778

79+
showLoadingIndicator();
7880
$.get(url, {v: vote}, function(data) {
7981
voteSuccess(data, $this);
8082
resetVoteButtons($this);
8183
$obj.voteRemove.show();
82-
}).fail(voteFailure);
84+
}).fail(voteFailure).always(hideLoadingIndicator);
8385
});
8486

8587
$obj.votes.on('click', function(e) {
@@ -96,15 +98,16 @@
9698
var $this = $(this),
9799
url = $this.attr('href');
98100

99-
if ($this.is('.dead')) {
101+
if ($this.hasClass('vote-disabled')) {
100102
return false;
101103
}
102104

105+
showLoadingIndicator();
103106
$.get(url, function(data) {
104107
voteSuccess(data, $this);
105108
resetVoteButtons();
106109
$obj.voteRemove.hide();
107-
}).fail(voteFailure);
110+
}).fail(voteFailure).always(hideLoadingIndicator);
108111
});
109112

110113
$obj.status.on('change', function() {
@@ -118,6 +121,7 @@
118121
return;
119122
}
120123

124+
showLoadingIndicator();
121125
$.get($this.attr('data-url'), data, function(res) {
122126
if (res) {
123127
var anchor = $this.prev('a'),
@@ -133,7 +137,7 @@
133137
$obj.duplicateToggle.toggle(idea_is_duplicate());
134138
$obj.implementedToggle.toggle(idea_is_implemented());
135139
}
136-
});
140+
}).always(hideLoadingIndicator);
137141
});
138142

139143
$obj.rfcEdit.on('click', function(e) {
@@ -158,6 +162,7 @@
158162
return;
159163
}
160164

165+
showLoadingIndicator();
161166
$.get(url, {rfc: value}, function(res) {
162167
if (res) {
163168
$obj.rfcLink.text(value)
@@ -171,7 +176,7 @@
171176

172177
$obj.rfcEdit.toggleAddEdit(value);
173178
}
174-
});
179+
}).always(hideLoadingIndicator);
175180
} else if (e.keyCode === keymap.ESC) {
176181
e.preventDefault();
177182

@@ -212,6 +217,7 @@
212217
value = 'PHPBB3-' + info[1];
213218
}
214219

220+
showLoadingIndicator();
215221
$.get(url, {ticket: value && info[1]}, function(res) {
216222
if (res) {
217223
$obj.ticketLink.text(value)
@@ -226,7 +232,7 @@
226232
$obj.ticketEdit.toggleAddEdit(value);
227233
}
228234

229-
});
235+
}).always(hideLoadingIndicator);
230236
} else if (e.keyCode === keymap.ESC) {
231237
e.preventDefault();
232238

@@ -262,6 +268,7 @@
262268
return;
263269
}
264270

271+
showLoadingIndicator();
265272
$.get(url, {duplicate: Number(value)}, function(res) {
266273
if (res) {
267274
if (value) {
@@ -282,7 +289,7 @@
282289

283290
$obj.duplicateEdit.toggleAddEdit(value);
284291
}
285-
});
292+
}).always(hideLoadingIndicator);
286293
} else if (e.keyCode === keymap.ESC) {
287294
e.preventDefault();
288295

@@ -319,6 +326,7 @@
319326
return;
320327
}
321328

329+
showLoadingIndicator();
322330
$.get(url, {implemented: value}, function(res) {
323331
if (res) {
324332
$obj.implementedVersion.text(value);
@@ -331,7 +339,7 @@
331339

332340
$obj.implementedEdit.toggleAddEdit(value);
333341
}
334-
});
342+
}).always(hideLoadingIndicator);
335343
} else if (e.keyCode === keymap.ESC) {
336344
e.preventDefault();
337345

@@ -347,7 +355,7 @@
347355
$.fn.toggleAddEdit = function(value) {
348356
$(this).text(function() {
349357
return value ? $(this).attr('data-l-edit') : $(this).attr('data-l-add');
350-
}).prepend($('<i class="fa fa-fw"></i>').addClass(function() {
358+
}).prepend($('<i class="icon fa-fw"></i>').addClass(function() {
351359
return value ? 'fa-pencil' : 'fa-plus-circle';
352360
})).show();
353361
};
@@ -399,9 +407,21 @@
399407
}
400408

401409
function resetVoteButtons($this) {
402-
$obj.voteUp.add($obj.voteDown).removeClass('dead');
410+
$obj.voteUp.add($obj.voteDown).removeClass('vote-disabled');
411+
$obj.userVoted.hide();
412+
403413
if ($this) {
404-
$this.addClass('dead');
414+
$this.addClass('vote-disabled').find($obj.userVoted).show();
415+
}
416+
}
417+
418+
function showLoadingIndicator() {
419+
$loadingIndicator = phpbb.loadingIndicator();
420+
}
421+
422+
function hideLoadingIndicator() {
423+
if ($loadingIndicator && $loadingIndicator.is(':visible')) {
424+
$loadingIndicator.fadeOut(phpbb.alertTime);
405425
}
406426
}
407427

styles/prosilver/template/index_body.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h2>{{ lang('IDEAS_TITLE') }}</h2>
99
{# TOP IDEAS #}
1010
<h2 class="push-left">{{ lang('TOP_IDEAS') }}</h2>
1111
{% if top_ideas %}
12-
<a class="button view-all" href="{{ U_VIEW_TOP }}"><i class="fa fa-fw fa-fire"></i> <span>{{ lang('VIEW_TOP') }}</span></a>
12+
<a class="button view-all" href="{{ U_VIEW_TOP }}"><i class="icon fa-fw fa-line-chart"></i> <span>{{ lang('VIEW_TOP') }}</span></a>
1313
{% endif %}
1414
<div class="forumbg">
1515
<div class="inner">
@@ -29,7 +29,7 @@ <h2 class="push-left">{{ lang('TOP_IDEAS') }}</h2>
2929
{# LATEST IDEAS #}
3030
<h2 class="push-left">{{ lang('LATEST_IDEAS') }}</h2>
3131
{% if latest_ideas %}
32-
<a class="button view-all" href="{{ U_VIEW_LATEST }}"><i class="fa fa-fw fa-lightbulb-o"></i> <span>{{ lang('VIEW_LATEST') }}</span></a>
32+
<a class="button view-all" href="{{ U_VIEW_LATEST }}"><i class="icon fa-fw fa-lightbulb-o"></i> <span>{{ lang('VIEW_LATEST') }}</span></a>
3333
{% endif %}
3434
<div class="forumbg" style="margin-top: 10px">
3535
<div class="inner">
@@ -49,7 +49,7 @@ <h2 class="push-left">{{ lang('LATEST_IDEAS') }}</h2>
4949
{# IMPLEMENTED IDEAS #}
5050
<h2 class="push-left">{{ lang('IMPLEMENTED_IDEAS') }}</h2>
5151
{% if implemented_ideas %}
52-
<a class="button view-all" href="{{ U_VIEW_IMPLEMENTED }}"><i class="fa fa-fw fa-check-circle-o"></i> <span>{{ lang('VIEW_IMPLEMENTED') }}</span></a>
52+
<a class="button view-all" href="{{ U_VIEW_IMPLEMENTED }}"><i class="icon fa-fw fa-code-fork fa-flip-vertical"></i> <span>{{ lang('VIEW_IMPLEMENTED') }}</span></a>
5353
{% endif %}
5454
<div class="forumbg" style="margin-top: 10px">
5555
<div class="inner">

styles/prosilver/template/index_list.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
</div>
1717
</dt>
1818

19-
<dd class="topics">
20-
<div class="minivoteup{% if idea.USER_VOTED == '1' %} voted{% endif %}"><span>{{ idea.VOTES_UP }}</span></div>
21-
<div class="minivotedown{% if idea.USER_VOTED == '0' %} voted{% endif %}"><span>{{ idea.VOTES_DOWN }}</span></div>
19+
<dd class="topics"{% if idea.USER_VOTED !== '' %} title="{{ lang('USER_ALREADY_VOTED', idea.USER_VOTED) }}"{% endif %}>
20+
<div class="minivote vote-up vote-disabled">
21+
<i class="icon fa-thumbs-up"></i><span class="vote-count">{{ idea.VOTES_UP }}</span>{% if idea.USER_VOTED === 1 %}<i class="icon fa-check-circle user-voted" aria-hidden="true"></i>{% endif %}
22+
</div>
23+
<div class="minivote vote-down vote-disabled">
24+
<i class="icon fa-thumbs-down"></i><span class="vote-count">{{ idea.VOTES_DOWN }}</span>{% if idea.USER_VOTED === 0 %}<i class="icon fa-check-circle user-voted" aria-hidden="true"></i>{% endif %}
25+
</div>
2226
</dd>
2327
</dl>
2428
</li>

0 commit comments

Comments
 (0)