Skip to content

Commit 3ef3301

Browse files
committed
improve: 年次フィルタリングUIのラベルを改善
- '年を選択' → '対象期間' に変更(より汎用的な表現) - デフォルトラベル '全道場' → '全期間' に変更(道場ページなので冗長性を排除) - テストも合わせて更新
1 parent 2f07933 commit 3ef3301

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/views/dojos/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939

4040
<%= form_with(url: dojos_path, method: :get, local: true, style: 'margin-top: 15px;') do |f| %>
4141
<div style="display: flex; align-items: center; justify-content: center; gap: 10px;">
42-
<%= label_tag :year, '年を選択:', style: 'font-weight: bold;' %>
42+
<%= label_tag :year, '対象期間:', style: 'font-weight: bold;' %>
4343
<%= select_tag :year,
4444
options_for_select(
4545
(2012..Date.current.year).to_a.reverse.map { |y| [y.to_s + '年', y] },
4646
params[:year]
4747
),
48-
include_blank: '全道場',
48+
include_blank: '全期間',
4949
style: 'padding: 5px; border: 1px solid #ced4da; border-radius: 4px;' %>
5050

5151
<%= button_tag type: 'submit', style: 'padding: 5px 15px; background: #17a2b8; color: white; border: none; border-radius: 4px; cursor: pointer;' do %>

spec/requests/dojos_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
describe "HTML format year selection UI" do
238238
it "shows year selection form" do
239239
get dojos_path
240-
expect(response.body).to include('年を選択')
240+
expect(response.body).to include('対象期間')
241241
expect(response.body).to include('<select')
242242
expect(response.body).to include('2012')
243243
expect(response.body).to include(Date.current.year.to_s)

0 commit comments

Comments
 (0)