Skip to content

Commit 1ac35ac

Browse files
committed
feat: /dojos/activity に Google 検索リンクカラムを追加
各道場の活動状況を Google で確認できるよう、新しい '🔍 検索' カラムを追加: - ノートカラムの前に配置 - 'CoderDojo [道場名]' で Google 検索 - 新しいタブで開く(target='_blank', rel='noopener') - Font Awesome の外部リンクアイコンを表示
1 parent 3e28bd5 commit 1ac35ac

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

app/views/dojos/activity.html.erb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949
<a href='<%= events_path %>'>開催日</a>
5050
</small>
5151
</th>
52+
<th>
53+
<small>
54+
🔍
55+
<br class='ignore-pc'>
56+
検索
57+
</small>
58+
</th>
5259
<th>
5360
<small>
5461
📝
@@ -94,6 +101,16 @@
94101
<% end %>
95102
</small>
96103
</td>
104+
<td>
105+
<small>
106+
<% search_query = "CoderDojo #{dojo[:name]}" %>
107+
<% search_url = "https://www.google.co.jp/search?q=#{URI.encode_www_form_component(search_query)}" %>
108+
<%= link_to search_url, target: "_blank", rel: "noopener" do %>
109+
Search
110+
<small><i class="far fa-external-link"></i></small>
111+
<% end %>
112+
</small>
113+
</td>
97114
<td class="url-cell">
98115
<small>
99116
<span title="<%= dojo[:note] %>">

0 commit comments

Comments
 (0)