|
| 1 | +<% provide(:title, '道場情報 - 活動状況まとめ') %> |
| 2 | +<% provide(:desc, '道場別の掲載日と直近開催日をまとめたページです。') %> |
| 3 | +<% provide(:url, activity_dojos_url) %> |
| 4 | +<% provide(:meta_image, '/img/ogp-events.jpeg') %> |
| 5 | + |
| 6 | +<section class="cover"> |
| 7 | + <%= lazy_image_tag('/events_cover.jpg', alt: 'Cover Photo on Upcoming Events', min: true) %> |
| 8 | +</section> |
| 9 | + |
| 10 | +<section id="events" class="text-center" style="margin-bottom: 100px;"> |
| 11 | + <br /> |
| 12 | + <h1>☯️ 道場別の活動状況まとめ</h1> |
| 13 | + <br /> |
| 14 | + <p style="margin: 0 0px 40px 10px; line-height: 1.5em;"> |
| 15 | + 主にデータ分析や |
| 16 | + <a href="/signup#terms-of-use">Active/Inactive</a> |
| 17 | + の判断などの用途で使われています。 |
| 18 | + <br> |
| 19 | + <div class='form__terms list'> |
| 20 | + <ul style='list-style-type: "\2713\0020"; font-size: smaller;'> |
| 21 | + <li>「掲載日」は<%= link_to '統計情報 (道場別) ', dojos_path %> と同じロジックで表示しています。</li> |
| 22 | + <li>「開催日」は<%= link_to '統計情報 (開催数)', stats_path %> から直近の開催日を表示しています。</li> |
| 23 | + <li>「開催日」のデータは <a href='https://doorkeeper.jp/'>Doorkeeper</a> と <a href='http://connpass.com/'>connpass</a> にのみ対応しています。</li> |
| 24 | + </ul> |
| 25 | + </div> |
| 26 | + </p> |
| 27 | + |
| 28 | + <div style="margin-top: 20px;" align="center"> |
| 29 | + <table border="1" class="stats-table"> |
| 30 | + <tr> |
| 31 | + <th> |
| 32 | + <small> |
| 33 | + ☯️ |
| 34 | + <br class='ignore-pc'> |
| 35 | + 道場名 (ID 番号) |
| 36 | + </small> |
| 37 | + </th> |
| 38 | + <th> |
| 39 | + <small> |
| 40 | + 🗓 |
| 41 | + <br class='ignore-pc'> |
| 42 | + <a href='/signup'>掲載日</a> |
| 43 | + </small> |
| 44 | + </th> |
| 45 | + <th> |
| 46 | + <small> |
| 47 | + 👥 |
| 48 | + <br class='ignore-pc'> |
| 49 | + 開催日 |
| 50 | + </small> |
| 51 | + </th> |
| 52 | + <th> |
| 53 | + <small> |
| 54 | + 📝 |
| 55 | + <br class='ignore-pc'> |
| 56 | + ノート |
| 57 | + </small> |
| 58 | + </th> |
| 59 | + </tr> |
| 60 | + <% @latest_event_by_dojos.each do |dojo| %> |
| 61 | + <tr> |
| 62 | + <td> |
| 63 | + <small> |
| 64 | + <%= link_to dojo_path(dojo[:id]) do %> |
| 65 | + <%= dojo[:name] %><br> |
| 66 | + <small>(ID: <%= dojo[:id] %>)</small> |
| 67 | + <% end %> |
| 68 | + </small> |
| 69 | + </td> |
| 70 | + <td> |
| 71 | + <small><%= dojo[:created_at].strftime("%Y-%m-%d") %></small> |
| 72 | + </td> |
| 73 | + <td> |
| 74 | + <small> |
| 75 | + <% if dojo[:latest_event_at] %> |
| 76 | + <!-- イベント履歴がある場合 --> |
| 77 | + <% expired = dojo[:latest_event_at] <= Time.current - @inactive_threshold && !dojo[:note].include?('Active') %> |
| 78 | + <span class="<%= 'expired' if expired %>"> |
| 79 | + <%= link_to dojo[:latest_event_at].strftime("%Y-%m-%d"), dojo[:latest_event_url] %> |
| 80 | + </span> |
| 81 | + <% elsif dojo[:note_date] %> |
| 82 | + <!-- note内に日付がある場合 --> |
| 83 | + <% expired = dojo[:note_date] <= Time.current - @inactive_threshold && !dojo[:note].include?('Active') %> |
| 84 | + <span class="<%= 'expired' if expired %>"> |
| 85 | + <% if dojo[:note_link] %> |
| 86 | + <%= link_to dojo[:note_date].strftime("%Y-%m-%d"), dojo[:note_link] %> |
| 87 | + <% else %> |
| 88 | + <%= dojo[:note_date].strftime("%Y-%m-%d") %> |
| 89 | + <% end %> |
| 90 | + </span> |
| 91 | + <% else %> |
| 92 | + <!-- 開催日情報なし --> |
| 93 | + <span style="color: #999;">-</span> |
| 94 | + <% end %> |
| 95 | + </small> |
| 96 | + </td> |
| 97 | + <td class="url-cell"> |
| 98 | + <small> |
| 99 | + <span title="<%= dojo[:note] %>"> |
| 100 | + <% truncated_note = truncate(dojo[:note], length: 60) %> |
| 101 | + <%= raw Addressable::URI.unescape(Rinku.auto_link(truncated_note)) %> |
| 102 | + </span> |
| 103 | + </small> |
| 104 | + </td> |
| 105 | + </tr> |
| 106 | + <% end %> |
| 107 | + </table> |
| 108 | + </div> |
| 109 | + |
| 110 | + <p> |
| 111 | + <pre style='white-space: pre-wrap; margin-top: 60px; color: #505050;'>本ページにある開催日は <br class='ignore-pc'><a href='https://doorkeeper.jp/'>Doorkeeper</a> と <a href='http://connpass.com/'>connpass</a> にのみ対応しています。</pre> |
| 112 | + </p> |
| 113 | + <div style='margin-top: 30px;'><a href='#top'>↑ 上に戻る</a></div> |
| 114 | +</section> |
0 commit comments