diff options
Diffstat (limited to 'app/views/events/_rrule_builder.html.erb')
| -rw-r--r-- | app/views/events/_rrule_builder.html.erb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app/views/events/_rrule_builder.html.erb b/app/views/events/_rrule_builder.html.erb index 1ffec0a2..3cffb782 100644 --- a/app/views/events/_rrule_builder.html.erb +++ b/app/views/events/_rrule_builder.html.erb | |||
| @@ -1,33 +1,33 @@ | |||
| 1 | <div id="rrule_builder"> | 1 | <div id="rrule_builder"> |
| 2 | <p> | 2 | <p> |
| 3 | <label><%= radio_button_tag "rrule_freq", "weekly", true %> Weekly</label> | 3 | <label><%= radio_button_tag "rrule_freq", "weekly", true %> <%= t(".weekly") %></label> |
| 4 | <label><%= radio_button_tag "rrule_freq", "monthly" %> Monthly</label> | 4 | <label><%= radio_button_tag "rrule_freq", "monthly" %> <%= t(".monthly") %></label> |
| 5 | </p> | 5 | </p> |
| 6 | <div id="rrule_weekly_options"> | 6 | <div id="rrule_weekly_options"> |
| 7 | <p><label><%= check_box_tag "rrule_biweekly" %> Every 2 weeks</label></p> | 7 | <p><label><%= check_box_tag "rrule_biweekly" %> <%= t(".biweekly") %></label></p> |
| 8 | <p> | 8 | <p> |
| 9 | <% %w[MO TU WE TH FR SA SU].each do |code| %> | 9 | <% %w[MO TU WE TH FR SA SU].each do |code| %> |
| 10 | <label><%= check_box_tag "rrule_byday_#{code}" %> <%= RruleHumanizer::WEEKDAY_NAMES_ABBR[:de][code] %></label> | 10 | <label><%= check_box_tag "rrule_byday_#{code}" %> <%= RruleHumanizer::WEEKDAY_NAMES_ABBR[I18n.locale][code] %></label> |
| 11 | <% end %> | 11 | <% end %> |
| 12 | </p> | 12 | </p> |
| 13 | </div> | 13 | </div> |
| 14 | <div id="rrule_monthly_options" style="display: none;"> | 14 | <div id="rrule_monthly_options" style="display: none;"> |
| 15 | <p><label><%= check_box_tag "rrule_monthly_ordinal" %> On a specific weekday each month</label></p> | 15 | <p><label><%= check_box_tag "rrule_monthly_ordinal" %> <%= t(".monthly_ordinal") %></label></p> |
| 16 | <p id="rrule_ordinal_fields" style="display: none;"> | 16 | <p id="rrule_ordinal_fields" style="display: none;"> |
| 17 | <%= select_tag "rrule_ordinal", options_for_select([["1.", 1], ["2.", 2], ["3.", 3], ["4.", 4], ["letzter", -1], ["vorletzter", -2], ["Selected weeks", "custom"]]) %> | 17 | <%= select_tag "rrule_ordinal", options_for_select([[t(".ordinal_1"), 1], [t(".ordinal_2"), 2], [t(".ordinal_3"), 3], [t(".ordinal_4"), 4], [t(".ordinal_last"), -1], [t(".ordinal_second_last"), -2], [t(".ordinal_custom"), "custom"]]) %> |
| 18 | <%= select_tag "rrule_ordinal_day", options_for_select(%w[MO TU WE TH FR SA SU].map { |c| [RruleHumanizer::WEEKDAY_NAMES[:de][c], c] }) %> | 18 | <%= select_tag "rrule_ordinal_day", options_for_select(%w[MO TU WE TH FR SA SU].map { |c| [RruleHumanizer::WEEKDAY_NAMES[I18n.locale][c], c] }) %> |
| 19 | </p> | 19 | </p> |
| 20 | <p id="rrule_custom_ordinal_fields" style="display: none;"> | 20 | <p id="rrule_custom_ordinal_fields" style="display: none;"> |
| 21 | Weeks of the month: | 21 | <%= t(".weeks_of_month") %> |
| 22 | <% (1..5).each do |ordinal| %> | 22 | <% (1..5).each do |ordinal| %> |
| 23 | <label><%= check_box_tag "rrule_custom_ordinal_#{ordinal}" %> <%= ordinal %>.</label> | 23 | <label><%= check_box_tag "rrule_custom_ordinal_#{ordinal}" %> <%= ordinal %>.</label> |
| 24 | <% end %> | 24 | <% end %> |
| 25 | </p> | 25 | </p> |
| 26 | </div> | 26 | </div> |
| 27 | <p> | 27 | <p> |
| 28 | <label><%= check_box_tag "rrule_exclude_month" %> Except in one month</label> | 28 | <label><%= check_box_tag "rrule_exclude_month" %> <%= t(".exclude_month") %></label> |
| 29 | <%= select_tag "rrule_excluded_month", options_for_select((1..12).map { |m| [RruleHumanizer::MONTH_NAMES[:de][m-1], m] }), style: "display: none;" %> | 29 | <%= select_tag "rrule_excluded_month", options_for_select((1..12).map { |m| [RruleHumanizer::MONTH_NAMES[I18n.locale][m-1], m] }), style: "display: none;" %> |
| 30 | </p> | 30 | </p> |
| 31 | <span class="field_hint">Builds the field below automatically. If your pattern is more complex than this covers, just edit it directly below - these controls won't touch it unless you use them.</span> | 31 | <span class="field_hint"><%= t(".hint") %></span> |
| 32 | </div> | 32 | </div> |
| 33 | <%= f.text_field :rrule, id: "event_rrule" %> | 33 | <%= f.text_field :rrule, id: "event_rrule" %> |
