Skip to content

Commit c21fd3e

Browse files
committed
統計情報が登録されていない場合は、表示されていない理由を示す注釈を表示する
1 parent 85dc600 commit c21fd3e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/views/dojos/show.html.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<p style="margin: 0 0px 40px 10px; line-height: 1.5em;">
1717
<%= link_to "CoderDojo #{@dojo[:name]}", @dojo[:url] %>に関する公開されている統計情報をまとめたページです。
1818
<br><br>
19+
<% if @event_histories.any? %>
1920
<small>
2021
2122
<a href="<%= events_path %>">近日開催</a>のデータは含まず、<a href="<%= stats_path %>">過去開催</a>のデータを使っています。
@@ -26,9 +27,11 @@
2627
2728
下記データは <code><%= link_to dojo_path(@dojo, format: :csv), dojo_url(@dojo, format: :csv) %></code> で CSV に変換できます。
2829
</small>
30+
<% end %>
2931
</p>
3032

3133
<div style="margin-top: 20px;" align="center">
34+
<% if @event_histories.any? %>
3235
<table border="1">
3336
<tr>
3437
<th style="padding: 10px; text-align: center;">
@@ -65,5 +68,12 @@
6568
</tr>
6669
<% end %>
6770
</table>
71+
<% else %>
72+
<p>
73+
<pre style='white-space: pre-wrap; margin-bottom: 30px; color: #505050;'>
74+
本サイトには <%= link_to "CoderDojo #{@dojo[:name]}", @dojo[:url] %>に関する統計情報は登録されていません。<br>
75+
統計情報は現在 <a href='https://doorkeeper.jp/'>Doorkeeper</a><a href='http://connpass.com/'>connpass</a> にのみ対応しています。</pre>
76+
</p>
77+
<% end %>
6878
</div>
6979
</section>

0 commit comments

Comments
 (0)