Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

賞品情報のデザインを修正する #220

Merged
merged 7 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 25 additions & 27 deletions app/views/lotteries/_lottery.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,41 @@
.font-semibold.text-lg
| 抽選会賞品
- lottery.prizes.each do |prize|
.border.border-gray.rounded.mt-3.p-6.text-zinc-800.text-sm.md:text-base
.border.border-gray.rounded.mt-3.p-6.text-zinc-800
div
.font-bold.text-lg
= prize.name
.flex.mt-3
label.w-1/2.md:w-1/3
= "#{Prize.human_attribute_name(:winners_count)}:"
.w-1/2.md:w-2/3
= prize.winners_count
.flex.mt-3
label.w-1/2.md:w-1/3
= "#{Prize.human_attribute_name(:winning_email_subject)}:"
.w-1/2.md:w-2/3
.mt-3
label.text-sm
= "#{Prize.human_attribute_name(:winners_count)}(#{prize.winners_count})"
.mt-3
label.text-sm.border-b.border-dashed.border-gray-500
= Prize.human_attribute_name(:winning_email_subject)
.font-semibold.mt-1
= prize.winning_email_subject
.flex.mt-3
label.w-1/2.md:w-1/3
= "#{Prize.human_attribute_name(:winning_email_body)}:"
.break-all.w-1/2.md:w-2/3
.mt-3
label.text-sm.border-b.border-dashed.border-gray-500
= Prize.human_attribute_name(:winning_email_body)
.font-semibold.mt-1.break-all
= simple_format(h(prize.winning_email_body))

- if lottery_executed?(lottery) && closed?(lottery)
.mt-3
.font-bold
.mt-6
.font-semibold
= "当選者一覧(#{prize.entries.size})"
- prize.entries.each do |winner|
.flex.mt-3
label.w-1/2.md:w-1/3
= "#{Entry.human_attribute_name(:email)}:"
.break-all.w-1/2.md:w-2/3
.mt-3
label.text-xs
= Entry.human_attribute_name(:email)
.break-all
= winner.email
- if lottery.name_field_enabled
label.w-1/2.md:w-1/3
= "#{Entry.human_attribute_name(:email)}:"
.break-all.w-1/2.md:w-2/3
= winner.email
label.text-xs
= Entry.human_attribute_name(:name)
.break-all
= winner.name
- if lottery.name_field_enabled
label.w-1/2.md:w-1/3
= "#{Entry.human_attribute_name(:note)}:"
.break-all.w-1/2.md:w-2/3
label.text-xs
= Entry.human_attribute_name(:note)
.break-all
= winner.note
2 changes: 1 addition & 1 deletion app/views/lotteries/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.bg-gray-500.rounded-full.text-xs.h-4
| 終了
- else
.bg-blue-900.rounded-full.text-xs.h-4
.bg-red-800.rounded-full.text-xs.h-4
| 開催中
.text-left.w-full.p-1
.text-zinc-500
Expand Down
2 changes: 1 addition & 1 deletion app/views/lotteries/show.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- set_meta_tags(title: '抽選会詳細')

.p-2.m-auto.w-full.md:w-7/12
.p-2.m-auto.w-full.md:w-5/12
h1.mt-6.font-semibold.text-2xl.text-center.text-zinc-800
= @lottery.name
- unless closed?(@lottery)
Expand Down
Loading