Skip to content

Commit

Permalink
Update: 酒ビューのノートを別フィールドセットにした
Browse files Browse the repository at this point in the history
  • Loading branch information
yonta committed Jul 31, 2024
1 parent 28434dc commit 51087f2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
15 changes: 15 additions & 0 deletions app/views/sakes/_show_note.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="row gy-3">
<div class="col-12">
<h2 class="fs-3 mb-0"><%= t(".note") %></h2>
</div>

<div class="col-12">
<div class="textbox">
<div class="text">
<div class="box">
<p><%= empty_to_default(sake.note, " ") %></p>
</div>
</div>
</div>
</div>
</div>
13 changes: 0 additions & 13 deletions app/views/sakes/_show_review.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,4 @@
</div>
</div>
</div>

<div class="col-lg-6 col-12">
<div class="textbox">
<div class="label">
<%= Sake.human_attribute_name(:note) %>
</div>
<div class="text">
<div class="box">
<p><%= empty_to_default(sake.note, " ") %></p>
</div>
</div>
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions app/views/sakes/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<%= render(partial: "show_review", locals: { sake: @sake }) %>
</div>

<div class="col-12">
<%= render(partial: "show_note", locals: { sake: @sake }) %>
</div>

<div class="col-12">
<div class="row justify-content-center">
<div class="col-auto">
Expand Down
2 changes: 2 additions & 0 deletions config/locales/views/sake.ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ja:
show_review:
no_awa: 炭酸なし
review: レビュー
show_note:
note: ノート
drink_button:
open: 開封する
confirm_open: "%{name} の栓を開ける?"
Expand Down

0 comments on commit 51087f2

Please sign in to comment.