Display pinned answers on profiles
This commit is contained in:
parent
ed4ec98455
commit
3451ae1fb0
|
@ -16,6 +16,15 @@
|
|||
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-report" } }
|
||||
%i.fa.fa-fw.fa-exclamation-triangle
|
||||
= t("voc.report")
|
||||
- else
|
||||
- if answer.pinned?
|
||||
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-unpin" } }
|
||||
%i.fa.fa-fw.fa-thumbtack
|
||||
= t(".unpin")
|
||||
- else
|
||||
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-pin" } }
|
||||
%i.fa.fa-fw.fa-thumbtack
|
||||
= t(".pin")
|
||||
- if current_user.admin?
|
||||
%a.dropdown-item{ href: rails_admin_path_for_resource(answer), target: "_blank" }
|
||||
%i.fa.fa-fw.fa-gears
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
- unless @user.banned?
|
||||
#pinned_answers
|
||||
- @user.answers.pinned.each do |a|
|
||||
= render 'answerbox', a:
|
||||
|
||||
#answers
|
||||
- @answers.each do |a|
|
||||
= render 'answerbox', a: a
|
||||
= render 'answerbox', a:
|
||||
|
||||
- if @more_data_available
|
||||
.d-flex.justify-content-center.justify-content-sm-start#paginator
|
||||
|
|
|
@ -26,6 +26,8 @@ en:
|
|||
destroy:
|
||||
nopriv: "You cannot delete other people's answers."
|
||||
success: "Successfully deleted answer."
|
||||
pin:
|
||||
success: "Successfully pinned answer."
|
||||
comment:
|
||||
create:
|
||||
invalid: "Your comment is too long."
|
||||
|
|
|
@ -73,6 +73,8 @@ en:
|
|||
actions:
|
||||
answer:
|
||||
return: "Return to Inbox"
|
||||
pin: "Pin to Profile"
|
||||
unpin: "Unpin from Profile"
|
||||
comment:
|
||||
view_smiles: "View comment smiles"
|
||||
share:
|
||||
|
|
Loading…
Reference in New Issue