Skip to content

Commit 0a028f0

Browse files
committed
dojos.yaml に note を追記した
1 parent b939527 commit 0a028f0

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

app/controllers/events_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ def latest
3939
event_at: latest_event.nil? ?
4040
last_session_date.strftime("%Y-%m-%d") :
4141
latest_event.evented_at.strftime("%Y-%m-%d"),
42+
43+
# 過去のイベント開催データが無ければ、note 内にあるリンクまたは個別統計ページを表示
4244
event_url: latest_event.nil? ?
4345
last_session_link.to_s :
4446
latest_event.event_url

app/views/events/latest.html.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@
7777
<td>
7878
<small>
7979
<% if dojo[:has_event_histories] %>
80-
<!-- 過去1年間イベント開催していない Dojo で、"Active" の確認が無い場合はハイライトする -->
80+
<!-- 過去1年間イベント開催していない Dojo で、"Active" マークが無い場合はハイライトする -->
8181
<span class=<%= 'expired' if dojo[:event_at] <= Time.current.prev_year && !dojo[:note].include?('Active') %>>
8282
<%= link_to dojo[:event_at], dojo[:event_url] %>
8383
</span>
8484
<% else %>
85-
<!-- 別サービスでイベント管理している Dojo で、"Active" の確認が無い場合はハイライトする -->
85+
<!-- 別サービスでイベント管理している Dojo で、"Active" マークが無い場合はハイライトする -->
86+
<!-- 別サービスでイベント管理している Dojo の場合、note にある日付とリンクで分岐処理する -->
8687
<span class=<%= 'expired' if dojo[:event_at] <= Time.current.prev_year && !dojo[:note].include?('Active') %>>
8788
<%= link_to dojo[:event_at], dojo[:event_url] %>
8889
</span>

db/dojos.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
- 電子工作
4444
- id: 100
4545
order: '012319'
46-
note: 'Last session was 2024-07-21 https://www.facebook.com/CoderDojoEniwa/posts/pfbid0SfrehQRyN9LS78ewt6y2coxHiKhvy1ddg77zCBhZoKyqBD4MYrK8XH9FhKDBJXF2l'
46+
note: '2024-07-21 https://www.facebook.com/CoderDojoEniwa/posts/pfbid0SfrehQRyN9LS78ewt6y2coxHiKhvy1ddg77zCBhZoKyqBD4MYrK8XH9FhKDBJXF2l'
4747
created_at: '2017-09-20'
4848
name: 恵庭
4949
prefecture_id: 1
@@ -1961,6 +1961,7 @@
19611961
- LEGO
19621962
- id: 257
19631963
order: '162086'
1964+
note: '2024-12-07 https://coderdojo-tonami.org/event/weekly-188th/'
19641965
created_at: '2020-11-13'
19651966
name: となみ
19661967
prefecture_id: 16
@@ -3044,7 +3045,7 @@
30443045
- 電子工作
30453046
- id: 48
30463047
order: '281107'
3047-
note: 'Active for years.'
3048+
note: 'Active - 2025-03-08 https://www.facebook.com/CoderDojoKobe/posts/pfbid02oraVjAR3BVbVnK7eGhTMrjBSEWEnTassxb9fkx3kTWajccUNDXx8s359HYs6tX6Vl'
30483049
created_at: '2016-09-28'
30493050
name: 神戸
30503051
prefecture_id: 28
@@ -3261,11 +3262,12 @@
32613262
- Viscuit
32623263
- id: 47
32633264
order: '302015'
3265+
note: 'Active for years - 2025-03-16 https://coderdojo-wakayama.hatenablog.com/entry/2025/03/16/230604'
32643266
created_at: '2016-11-01'
32653267
name: 和歌山
32663268
prefecture_id: 30
32673269
logo: "/img/dojos/wakayama.webp"
3268-
url: https://www.facebook.com/coderdojo.wakayama/
3270+
url: https://coderdojo-wakayama.hatenablog.com/
32693271
description: 和歌山市で毎月開催
32703272
tags:
32713273
- Scratch
@@ -3281,7 +3283,7 @@
32813283
- Scratch
32823284
- id: 99
32833285
order: '302066'
3284-
note: 'Active for years.'
3286+
note: 'Active for years. https://coderdojo-nanki-tanabe.jimdofree.com/%E9%96%8B%E5%82%AC%E4%BA%88%E5%AE%9A-%E5%8F%82%E5%8A%A0%E6%96%B9%E6%B3%95/'
32853287
created_at: '2017-09-06'
32863288
name: 南紀田辺
32873289
prefecture_id: 30
@@ -3920,6 +3922,7 @@
39203922
- Python
39213923
- id: 55
39223924
order: '454419'
3925+
note: 'Active for years - 2025-04-13 https://x.com/YoseiIto/status/1889435600337641670'
39233926
created_at: '2016-09-15'
39243927
name: 宮崎
39253928
prefecture_id: 45
@@ -3959,6 +3962,7 @@
39593962
- micro:bit
39603963
- id: 106
39613964
order: '472051'
3965+
note: '2020-08-16 から浦添と合同でイベント開催? https://www.facebook.com/coderdojo.ginowan/posts/pfbid0wKhwQAbNXcoEfEwZc9e1CxqKB7dfNZ8xmhZFf6SpxRC99vYWdrVGwBr7Y3W1GkxVl'
39623966
created_at: '2017-09-20'
39633967
name: 宜野湾
39643968
prefecture_id: 47
@@ -4104,7 +4108,7 @@
41044108
- Scratch
41054109
- id: 318
41064110
order: '473502'
4107-
note: 'Active - Reports are here https://note.com/code_for_haebaru/m/mb9902e30b85a'
4111+
note: '2025-03-24 https://note.com/code_for_haebaru/n/n2823cfb85bbc?magazine_key=mb9902e30b85a'
41084112
created_at: '2024-05-19'
41094113
name: 南風原
41104114
prefecture_id: 47

0 commit comments

Comments
 (0)