mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-05-25 19:48:44 +09:00
27 lines
919 B
Plaintext
27 lines
919 B
Plaintext
<%= form_with model: room do |form| %>
|
|
<div class="flex align-center gap">
|
|
<% if Current.user.can_administer?(room) %>
|
|
<%= translation_button(:room_name) %>
|
|
|
|
<label class="flex-item-grow txt-large">
|
|
<%= form.text_field :name, name: "room[name]", id: "room_name", class: "input full-width",
|
|
required: true, autofocus: true, placeholder: "Name the room",
|
|
data: { turbo_permanent: true, action: "keydown.enter->form#submit:prevent" } %>
|
|
<span class="for-screen-reader">Name this room</span>
|
|
</label>
|
|
<% else %>
|
|
<h1 class="flex-item-grow txt-x-large">
|
|
<%= room.name %>
|
|
</h1>
|
|
<% end %>
|
|
</div>
|
|
|
|
<hr class="margin-block borderless">
|
|
|
|
<section class="room-access margin-block pad-inline fill-shade border-radius">
|
|
<%= yield %>
|
|
</section>
|
|
|
|
<%= submit_room_button_tag if Current.user.can_administer?(room) %>
|
|
<% end %>
|