From 51087f264d7e518411e2fe33b3e899c870d87db7 Mon Sep 17 00:00:00 2001 From: SAITOU Keita Date: Mon, 1 Jul 2024 17:22:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Update:=20=E9=85=92=E3=83=93=E3=83=A5?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E3=83=8E=E3=83=BC=E3=83=88=E3=82=92=E5=88=A5?= =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/sakes/_show_note.html.erb | 15 +++++++++++++++ app/views/sakes/_show_review.html.erb | 13 ------------- app/views/sakes/show.html.erb | 4 ++++ config/locales/views/sake.ja.yml | 2 ++ 4 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 app/views/sakes/_show_note.html.erb diff --git a/app/views/sakes/_show_note.html.erb b/app/views/sakes/_show_note.html.erb new file mode 100644 index 000000000..d934102c2 --- /dev/null +++ b/app/views/sakes/_show_note.html.erb @@ -0,0 +1,15 @@ +
+
+

<%= t(".note") %>

+
+ +
+
+
+
+

<%= empty_to_default(sake.note, " ") %>

+
+
+
+
+
diff --git a/app/views/sakes/_show_review.html.erb b/app/views/sakes/_show_review.html.erb index 00066072e..18d1bf648 100644 --- a/app/views/sakes/_show_review.html.erb +++ b/app/views/sakes/_show_review.html.erb @@ -88,17 +88,4 @@ - -
-
-
- <%= Sake.human_attribute_name(:note) %> -
-
-
-

<%= empty_to_default(sake.note, " ") %>

-
-
-
-
diff --git a/app/views/sakes/show.html.erb b/app/views/sakes/show.html.erb index 2d3a33f22..a931f6bc3 100644 --- a/app/views/sakes/show.html.erb +++ b/app/views/sakes/show.html.erb @@ -18,6 +18,10 @@ <%= render(partial: "show_review", locals: { sake: @sake }) %> +
+ <%= render(partial: "show_note", locals: { sake: @sake }) %> +
+
diff --git a/config/locales/views/sake.ja.yml b/config/locales/views/sake.ja.yml index 25d1c0e92..1a96a04c8 100644 --- a/config/locales/views/sake.ja.yml +++ b/config/locales/views/sake.ja.yml @@ -28,6 +28,8 @@ ja: show_review: no_awa: 炭酸なし review: レビュー + show_note: + note: ノート drink_button: open: 開封する confirm_open: "%{name} の栓を開ける?" From a739e967a16e448e6c2a00e576fc67194be7b262 Mon Sep 17 00:00:00 2001 From: SAITOU Keita Date: Mon, 1 Jul 2024 17:30:17 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Update:=20=E9=85=92=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A0=E3=81=AE=E3=83=8E=E3=83=BC=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=88=A5=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E3=82=BB?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/sakes/_form.html.erb | 1 + app/views/sakes/_form_note.html.erb | 23 +++++++++++++++++++++++ app/views/sakes/_form_review.html.erb | 8 -------- config/locales/views/sake.ja.yml | 2 ++ 4 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 app/views/sakes/_form_note.html.erb diff --git a/app/views/sakes/_form.html.erb b/app/views/sakes/_form.html.erb index c60c829ba..0544f5fb9 100644 --- a/app/views/sakes/_form.html.erb +++ b/app/views/sakes/_form.html.erb @@ -7,5 +7,6 @@ <%= render(partial: "form_abstract", locals: { sake:, form: }) %> <%= render(partial: "form_detail", locals: { sake:, form: }) %> <%= render(partial: "form_review", locals: { sake:, form: }) %> + <%= render(partial: "form_note", locals: { sake:, form: }) %>
<% end %> diff --git a/app/views/sakes/_form_note.html.erb b/app/views/sakes/_form_note.html.erb new file mode 100644 index 000000000..4214bb8f2 --- /dev/null +++ b/app/views/sakes/_form_note.html.erb @@ -0,0 +1,23 @@ +
+

+ +

+
+
+
+
+
+
+ <%= form.text_area(:note, class: "form-control", data: { testid: "sake_note" }) %> +
+
+
+
+
+
+
diff --git a/app/views/sakes/_form_review.html.erb b/app/views/sakes/_form_review.html.erb index 6d83cbab3..8baccc2cd 100644 --- a/app/views/sakes/_form_review.html.erb +++ b/app/views/sakes/_form_review.html.erb @@ -96,14 +96,6 @@ testid: "sake_rating", }) %> -
-
-
- <%= form.label(:note, class: "form-label") %> - <%= form.text_area(:note, class: "form-control", data: { testid: "sake_note" }) %> -
-
-
diff --git a/config/locales/views/sake.ja.yml b/config/locales/views/sake.ja.yml index 1a96a04c8..f590eb449 100644 --- a/config/locales/views/sake.ja.yml +++ b/config/locales/views/sake.ja.yml @@ -63,6 +63,8 @@ ja: measurement: :sakes.show_detail.measurement form_review: review: :sakes.show_review.review + form_note: + note: :sakes.show_note.note float_button: edit: :sakes.sake.edit copy: 複製