Skip to content

Commit 63d4882

Browse files
committed
Report button next to edit/delete buttons
1 parent 5c17c73 commit 63d4882

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

app/assets/javascripts/request_for_comments.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,10 @@ $(document).on('turbo-migration:load', function () {
112112
</div> \
113113
<div class="comment-content">' + commentText + '</div> \
114114
<textarea class="comment-editor">' + commentText + '</textarea> \
115-
<div class="comment-actions' + (comment.editable ? '' : ' d-none') + '"> \
116-
<button class="action-edit btn btn-sm btn-warning">' + I18n.t('shared.edit') + '</button> \
117-
<button class="action-delete btn btn-sm btn-danger">' + I18n.t('shared.destroy') + '</button> \
118-
</div> \
119-
<div class="text-warning' + (comment.reportable ? '' : ' d-none') + '"> \
120-
<button class="action-report btn btn-light btn-sm">' + I18n.t('shared.report') + '</button> \
115+
<div class="comment-actions' + (comment.editable || comment.reportable ? '' : ' d-none') + '"> \
116+
<button class="action-edit btn btn-sm btn-warning' + (comment.editable ? '' : ' d-none') + '">' + I18n.t('shared.edit') + '</button> \
117+
<button class="action-delete btn btn-sm btn-danger' + (comment.editable ? '' : ' d-none') + '">' + I18n.t('shared.destroy') + '</button> \
118+
<button class="action-report btn btn-light btn-sm' + (comment.reportable ? '' : ' d-none') + '">' + I18n.t('shared.report') + '</button> \
121119
</div> \
122120
</div>';
123121
});

app/assets/stylesheets/request-for-comments.css.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ html[data-bs-theme="light"] {
212212
button {
213213
margin-right: 5px;
214214
}
215+
216+
.action-report {
217+
margin-left: auto;
218+
}
215219
}
216220
}
217221
}

0 commit comments

Comments
 (0)