Skip to content

Commit

Permalink
Adjust layout of inbox entry buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldesu committed Nov 1, 2023
1 parent 4cb66c7 commit fa0aa59
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
.z-n1 {
z-index: -1;
}

.grid-row-1 {
grid-row: 1;
}
14 changes: 8 additions & 6 deletions app/views/inbox/_entry.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
- if current_user == i.user
.card-body
%textarea.form-control.mb-3{ name: "ib-answer", placeholder: t(".placeholder"), data: { id: i.id } }
.d-sm-flex
%button.btn.btn-success.me-sm-1{ name: "ib-answer", data: { ib_id: i.id } }
= t("voc.answer")
%button.btn.btn-danger.me-sm-1{ name: "ib-destroy", data: { ib_id: i.id } }
= t("voc.delete")
%p.format-help.ms-auto.align-self-center.mt-2.mt-sm-0.text-center
.d-flex.flex-column-reverse.flex-sm-row
%p.format-help.me-sm-auto.align-self-center.mb-0.mt-2.mt-sm-0.text-center
= render "shared/format_link"
.d-grid.gap-2.d-sm-block
%button.btn.btn-default.text-muted.me-sm-1.mb-sm-0{ name: "ib-destroy", data: { ib_id: i.id } }
%i.fa.fa-trash.fa-fw
= t("voc.delete")
%button.btn.btn-primary.grid-row-1{ name: "ib-answer", data: { ib_id: i.id } }
= t("voc.answer")
- if current_user.sharing_enabled
.inbox-entry__sharing.text-center.p-2.justify-content-center.d-none{
data: { controller: "inbox-sharing", inbox_sharing_config_value: "{}", inbox_sharing_auto_close_value: current_user.sharing_autoclose.to_s } }
Expand Down

0 comments on commit fa0aa59

Please sign in to comment.