/
show.html.erb
86 lines (84 loc) · 3.64 KB
/
show.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<div class="container pb-0 px-0">
<%= render partial: 'events/share_buttons', locals: {event: @event} %>
</div>
<div class="container w-100">
<div class="d-flex justify-content-center align-items-lg-center align-items-start w-100 py-4">
<div class="d-flex flex-column justify-content-center align-items-center pr-1 pt-1 flex-shrink-0">
<div class="w-100 text-center rounded bg-secondary text-white px-3">
<%= @event.start_at_month %>月
</div>
<div class="w-100 text-center font-weight-bold display-4">
<%= @event.start_at_day %>
</div>
</div>
<div class="display-4"><%= @event.name %></div>
</div>
</div>
<div class="d-print-none d-block d-sm-none container w-100 px-0 pb-3">
<%= @event.display_url.present? && image_tag(@event.thumbnail(600), class: 'w-100 rounded img-fluid ') %>
</div>
<div class="">
<div class="sticky-top">
<div class="container w-100 px-0">
<div class="d-flex w-100">
<% @event.venues&.each do |venue| %>
<%= render partial: 'home/map', locals: {place_id: venue.place_id} %>
<% end %>
</div>
</div>
</div>
<div class="container w-100 d-flex">
<div class="d-print-none d-none d-sm-block container w-100 pt-4 pb-3 pr-3">
<%= @event.display_url.present? && image_tag(@event.thumbnail(600), class: 'w-100 rounded img-fluid ') %>
</div>
<div class="w-100">
<%= render partial: 'events/description', locals: {event: @event} %>
</div>
</div>
</div>
<div class="d-print-none container w-100 mt-5">
<h4 class="display-4 pt-3 sticky-top">関連するイベント</h4>
<% # TODO too many sql %>
<div class="row">
<%= render partial: 'home/event_card', locals: {keyword_array: @event.related_events['query'].split(""), omit_content: true}, collection: @related_events, as: :event %>
</div>
</div>
<div class="container fixed-bottom d-flex justify-content-end">
<div class="p-3 d-flex align-items-end">
<div class="btn btn-lg btn-success py-2 rounded px-3 shadow" data-toggle="modal" data-target="#enquiryModal" data-whatever="@mdo">
<%= icon 'far', 'comment-alt' %>
</div>
</div>
</div>
<div class="modal fade" id="enquiryModal" tabindex="-1" role="dialog" aria-labelledby="enquiryModal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">情報修正・コメント</h5>
</div>
<%= form_with model: @communication, method: :post, url: event_path(token: @event.token), local: true do |f| %>
<div class="modal-body">
<p>
理系の学会/研究会 サイトへのご協力ありがとうございます。
</p>
<p>
<span>本ページに記載されている</span>
<strong><%= @event.name %></strong>
<span>の情報修正ありましたら教えて下さい。</span>
</p>
<p>
また、お気づきの点ございましたらあわせてご記載お願いします。
</p>
<div class="form-group">
<%= f.label :body, class: 'col-form-label' %>
<%= f.text_area :body, maxlength: 1000, required: true, class: 'form-control', placeholder: '最大1000文字。xxxx の情報が間違っている、yyyy の情報が古い、zzzzの情報が欲しいなど。' %>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-lg btn-secondary" data-dismiss="modal">閉じる</button>
<%= f.submit '送信', class: 'btn btn-lg btn-primary' %>
</div>
<% end %>
</div>
</div>
</div>