<% html_title(l(:label_my_page)) -%>

<%= context_menu issues_context_menu_path, 'table.issues' %>

<%= content_for :easy_page_layout_content do %>
  <div style="display: inline-block;">
    <%
      page_template_options = options_for_select(
        [[l(:title_easy_page_apply_template),nil]].concat(easy_page_context[:page_params][:page].templates.map { |t| [t.template_name, t.id] })
      )
    %>
    <%= form_tag({ controller: 'easy_page_layout', action: 'layout_from_template_selected_users' }) do %>
      <%= hidden_field_tag 'back_url', params[:back_url] %>
      <%= hidden_field_tag 'users[]', [User.current.id] %>
      <%= select_tag 'page_template_id', page_template_options,
        onchange: "if(confirm('#{l(:text_are_you_sure)}')) { $(this).parent('form').submit(); }"
      %>
    <% end %>
  </div>
<% end -%>
