- Tham gia
- 28/02/2015
- Bài viết
- 16,830
- Được Like
- 12,692
Hiển thị lượt vote công khai cho từng thanh kết quả của thăm dò ý kiến
Bài viết này sẽ hướng dẫn các bạn cách hiển thị lượt vote công khai cho từng thanh kết quả của thăm dò ý kiến. Để áp dụng nhấp chuột vào phần bóng mờ của mỗi kết quả lựa chọn, chỉnh sửa template poll_block_result:
Tìm:
Thay bằng:
Thêm vào phần sau đây trong EXTRA.css:
Và tạo 1 phrase mới có tên là: cta_click_to_view_who_voted_for_this_option - Phrase Text: Click to view who voted for this option
Kết quả:
Chúc các bạn thành công.
Bài viết này sẽ hướng dẫn các bạn cách hiển thị lượt vote công khai cho từng thanh kết quả của thăm dò ý kiến. Để áp dụng nhấp chuột vào phần bóng mờ của mỗi kết quả lựa chọn, chỉnh sửa template poll_block_result:
Tìm:
Mã:
<div class="barCell">
<span class="barContainer">
<xen:if is="{$response.response_vote_count}"><span class="bar" style="width: {xen:calc "100 * {$response.response_vote_count} / {$poll.voter_count}"}%"></span></xen:if>
</span>
</div>
Thay bằng:
Mã:
<div class="barCell">
<span class="barContainer">
<xen:if is="{$poll.public_votes}">
<a href="{xen:link threads/poll/results, $thread, 'poll_response_id={$pollResponseId}'}" class="concealed OverlayTrigger" title="{xen:phrase cta_click_to_view_who_voted_for_this_option}">
<xen:if is="{$response.response_vote_count}"><span class="bar" style="width: {xen:calc "100 * {$response.response_vote_count} / {$poll.voter_count}"}%"></span></xen:if>
</a>
<xen:else />
<xen:if is="{$response.response_vote_count}"><span class="bar" style="width: {xen:calc "100 * {$response.response_vote_count} / {$poll.voter_count}"}%"></span></xen:if>
</xen:if>
</span>
</div>
Thêm vào phần sau đây trong EXTRA.css:
Mã:
.pollResult .bar:hover {
background: @secondaryLight;
}
Và tạo 1 phrase mới có tên là: cta_click_to_view_who_voted_for_this_option - Phrase Text: Click to view who voted for this option
Kết quả:
Nguồn: xenforo.com
Bài viết liên quan