Split actions from comments into separate partial
This commit is contained in:
parent
5562bd0de0
commit
2a2f1a9988
|
@ -0,0 +1,12 @@
|
||||||
|
.dropdown-menu.dropdown-menu-right{ role: :menu }
|
||||||
|
%a.dropdown-item{ href: "#", data: { target: "#modal-view-comment#{comment.id}-smiles", toggle: :modal } }
|
||||||
|
%i.fa.fa-fw.fa-smile-o
|
||||||
|
= t(".view_smiles")
|
||||||
|
- if privileged?(comment.user) || privileged?(answer.user)
|
||||||
|
%a.dropdown-item.text-danger{ href: "#", data: { action: "ab-comment-destroy", c_id: comment.id } }
|
||||||
|
%i.fa.fa-fw.fa-trash-o
|
||||||
|
= t("voc.delete")
|
||||||
|
- unless comment.user == current_user
|
||||||
|
%a.dropdown-item{ href: "#", data: { action: "ab-comment-report", c_id: comment.id } }
|
||||||
|
%i.fa.fa-fw.fa-exclamation-triangle
|
||||||
|
= t("voc.report")
|
|
@ -34,18 +34,7 @@
|
||||||
.btn-group
|
.btn-group
|
||||||
%button.btn.btn-link.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
%button.btn.btn-link.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
||||||
%span.caret
|
%span.caret
|
||||||
.dropdown-menu.dropdown-menu-right{ role: :menu }
|
= render "actions/comment", comment: comment, answer: a
|
||||||
%a.dropdown-item{ href: "#", data: { target: "#modal-view-comment#{comment.id}-smiles", toggle: :modal } }
|
|
||||||
%i.fa.fa-fw.fa-smile-o
|
|
||||||
= t(".actions.view_smiles")
|
|
||||||
- if privileged?(comment.user) || privileged?(a.user)
|
|
||||||
%a.dropdown-item.text-danger{ href: "#", data: { action: "ab-comment-destroy", c_id: comment.id } }
|
|
||||||
%i.fa.fa-fw.fa-trash-o
|
|
||||||
= t("voc.delete")
|
|
||||||
- unless comment.user == current_user
|
|
||||||
%a.dropdown-item{ href: "#", data: { action: "ab-comment-report", c_id: comment.id } }
|
|
||||||
%i.fa.fa-fw.fa-exclamation-triangle
|
|
||||||
= t("voc.report")
|
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
.form-group.has-feedback.comment__input-group{ name: "ab-comment-new-group", data: { a_id: a.id } }
|
.form-group.has-feedback.comment__input-group{ name: "ab-comment-new-group", data: { a_id: a.id } }
|
||||||
%input.form-control.comment__input{ type: :text, placeholder: t(".placeholder"), name: "ab-comment-new", data: { a_id: a.id } }
|
%input.form-control.comment__input{ type: :text, placeholder: t(".placeholder"), name: "ab-comment-new", data: { a_id: a.id } }
|
||||||
|
|
Loading…
Reference in New Issue