Commit aaa2f353 by Greg Price

Change endorsement UI for forum question threads

Responses to question threads can be "marked as answer" instead of
"endorsed".
parent 182ae7ae
......@@ -656,6 +656,10 @@ body.discussion {
background: url(../images/endorse-icon.png) no-repeat;
}
&.mark-answer .check-icon {
background: url(../images/answer-icon.png) no-repeat;
}
&.is-endorsed {
border: 1px solid #4697c1;
@include linear-gradient(top, #6dccf1, #38a8e5);
......@@ -664,6 +668,11 @@ body.discussion {
.check-icon {
background-position: 0 -12px;
}
&.mark-answer {
@include linear-gradient(top, tint(#1d9348, 60%), tint(#1d9348, 20%));
border: 1px solid #1d9348;
}
}
}
......
......@@ -153,7 +153,20 @@
<script aria-hidden="true" type="text/template" id="thread-response-show-template">
<header>
<a href="#" class="vote-btn" role="button" aria-pressed="false"><!-- DiscussionContentView.renderVote() populates this --></a>
<a href="javascript:void(0)" class="endorse-btn action-endorse" style="cursor: default; display: none;" data-tooltip="${_('endorse') | h}"><span class="check-icon" style="pointer-events: none; "></span></a>
<%
tooltip_expr = u"<%- thread.get('thread_type') == 'question' ? '{mark_answer}' : '{endorse}' %>".format(
endorse=_("endorse"),
mark_answer=_("mark as answer")
)
%>
<a
href="javascript:void(0)"
class="endorse-btn action-endorse ${"<%= thread.get('thread_type') == 'question' ? 'mark-answer' : '' %>"}"
style="cursor: default; display: none;"
data-tooltip="${tooltip_expr}"
>
<span class="check-icon" style="pointer-events: none; "></span>
</a>
${"<% if (obj.username) { %>"}
<a href="${'<%- user_url %>'}" class="posted-by">${'<%- username %>'}</a>
${"<% } else { %>"}
......
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