Skip to content
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
2 changes: 1 addition & 1 deletion app/views/admin/photo_spots/_photo_spot.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<% end %>
<% elsif photo_spot.parking_flag == 0 %>
駐車場なし
</div>
<% end %>
</dd>
</dd>
<dt class="font-semibold">おすすめの季節</dt>
<dd>
Expand Down
61 changes: 41 additions & 20 deletions app/views/photo_spots/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,47 @@
<%= @photo_spot.name %>
<span class="text-gray-600 text-lg font-normal">
(<%= @photo_spot.reviews.count %>件のレビュー)
<div class="flex-1 min-w-0">
<dl class="grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-2 text-sm text-gray-700 break-words">
<dt class="font-semibold">名称</dt>
<dd><%= @photo_spot.name %></dd>
<dt class="font-semibold">説明</dt>
<dd><%= @photo_spot.detail %></dd>
<dt class="font-semibold">タグ</dt>
<dd><%= @photo_spot.tags %></dd>
<dt class="font-semibold">時間帯</dt>
<dd>
<%= @photo_spot.timestart ? @photo_spot.timestart.strftime("%H:%M") : "未設定" %> 〜
<%= @photo_spot.timeend ? @photo_spot.timeend.strftime("%H:%M") : "未設定" %>
</dd>
<dt class="font-semibold">駐車場</dt>
<dd>
<% if @photo_spot.parking_flag == 1 %>
駐車場あり
<% if @photo_spot.parking_count%>
:<%= @photo_spot.parking_count %> 台
<% end %>
<% elsif @photo_spot.parking_flag == 0 %>
駐車場なし
<% end %>
</dd>
<dt class="font-semibold">おすすめの季節</dt>
<dd>
<% case @photo_spot.season %>
<% when 'spring' %>
<% when 'summer' %>
<% when 'autumn' %>
<% when 'winter' %>
<% else %>
未設定
<% end %>
</dd>
</dl>
</div>
</span>
</h1>
<% if @photo_spot.tags.present? %>
Expand Down Expand Up @@ -60,26 +101,6 @@
<svg class="w-6 h-6 mr-2 text-yellow-500" fill="currentColor" viewBox="0 0 20 20">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"/>
</svg>
<div data-image-modal-target="modal"
class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black bg-opacity-75 hidden">
<div class="relative w-full h-full max-w-5xl">
<div class="relative w-full h-full flex items-center justify-center">
<img data-image-modal-target="image" class="max-w-full max-h-screen object-contain" alt="Enlarged image">
<!-- 閉じるボタン -->
<button data-action="click->image-modal#close" class="absolute top-4 right-4 text-white text-4xl">
&times;
</button>
<!-- 左右の矢印ボタン -->
<button data-action="click->image-modal#previous" data-image-modal-target="prevBtn"
class="absolute left-4 top-1/2 -translate-y-1/2 text-white text-5xl">
&lsaquo;
</button>
<button data-action="click->image-modal#next" data-image-modal-target="nextBtn"
class="absolute right-4 top-1/2 -translate-y-1/2 text-white text-5xl">
&rsaquo;
</button>
</div>
</div>
レビュー
</h2>
<div class="space-y-4">
Expand Down
Loading