30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
<div class="comments pad-block">
|
|
<div class="comment comment--new flex-inline align-start full-width">
|
|
<figure class="comment__avatar flex-item-no-shrink" aria-hidden="true">
|
|
<%= avatar_tag Current.user, hidden_for_screen_reader: true %>
|
|
</figure>
|
|
|
|
<div class="comment__content flex-inline flex-column full-width">
|
|
<div class="comment__body txt-align-start">
|
|
<form data-controller="outlet-auto-save paste"
|
|
class="flex flex-column gap full-width"
|
|
data-outlet-auto-save-auto-save-outlet="#card_form"
|
|
data-action="paste->paste#pasteFiles">
|
|
<%= tag.house_md card.draft_comment, name: "card[draft_comment]", class: "input comment__input",
|
|
form: "card_form",
|
|
placeholder: new_comment_placeholder(card),
|
|
data: { action: "house-md:change->outlet-auto-save#change focusout->outlet-auto-save#submit", uploads_url: uploads_url(format: "json") } %>
|
|
</form>
|
|
|
|
<% if card.creating? %>
|
|
<div class="margin-block-start flex align-center gap">
|
|
<%= button_to "Create card", card_publish_path(card), class: "btn btn--reversed" %>
|
|
<%= button_to "Save as draft", collection_card_path(card.collection, card), name: "card[status]", value: "drafted", method: :put, class: "btn" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|