]> git.openstreetmap.org Git - rails.git/blob - app/views/user_blocks/edit.html.erb
Add navigation tabs to edit block pages
[rails.git] / app / views / user_blocks / edit.html.erb
1 <% @title = t ".title", :name => @user_block.user.display_name %>
2
3 <% content_for :heading_class, "pb-0" %>
4 <% content_for :heading do %>
5   <h1><%= t(".heading_html", :name => link_to(@user_block.user.display_name, @user_block.user)) %></h1>
6   <%= render :partial => "navigation" %>
7 <% end %>
8
9 <%= bootstrap_form_for(@user_block) do |f| %>
10   <%= f.richtext_field :reason, :cols => 80, :rows => 20, :format => @user_block.reason_format %>
11
12   <%= f.form_group do %>
13     <%= label_tag "user_block_period", t(".period"), :class => "form-label" %>
14     <%= select_tag("user_block_period",
15                    options_for_select(UserBlock::PERIODS.collect { |h| [block_duration_in_words(h.hours), h.to_s] },
16                                       UserBlock::PERIODS.min_by { |h| (params[:user_block_period].to_i - h).abs }),
17                    :class => "form-select") %>
18   <% end %>
19
20   <%= f.form_group :needs_view do %>
21     <%= f.check_box :needs_view %>
22   <% end %>
23
24   <%= f.primary %>
25 <% end %>