<%#
  This file is a part of RedmineX UX Upgrade plugin
  for Redmine

  Copyright 2020-2022 RedmineX. All Rights Reserved.
  https://www.redmine-x.com

  Licensed under GPL v2 (http://www.gnu.org/licenses/gpl-2.0.html)
  Created by Ondřej Svejkovský
%>

<fieldset class="box tabular">
  <legend><%= l(:top_menu_label) %></legend>
  <p>
    <label for="settings_show_spent_time_in_top_menu"><%= l(:show_spent_time_in_top_menu) %></label>
    <span>
      <span class="floating" style="margin-left: 0px;">
      <%= check_box_tag 'settings[show_spent_time_in_top_menu]', 1, @settings[:show_spent_time_in_top_menu] %>
      </span>
    </span>
  </p>
  <p>
    <label for="settings_show_home_page_in_top_menu"><%= l(:show_home_page_in_top_menu) %></label>
    <span>
      <span class="floating" style="margin-left: 0px;">
      <%= check_box_tag 'settings[show_home_page_in_top_menu]', 1, @settings[:show_home_page_in_top_menu] %>
      </span>
    </span>
  </p>
</fieldset>

<fieldset class="box tabular">
  <legend><%= l(:login_redirect_label) %></legend>
  <p>
    <label for="settings_redirect_to_my_page"><%= l(:redirect_to_my_page) %></label>
    <span>
      <span class="floating" style="margin-left: 0px;">
      <%= check_box_tag 'settings[redirect_to_my_page]', 1, @settings[:redirect_to_my_page] %>
      </span>
    </span>
  </p>
</fieldset>

<fieldset class="box tabular">
  <legend><%= l(:project_menu_label) %></legend>
  <p>
    <label for="settings_number_of_items_in_project_menu"><%= l(:number_of_items_in_project_menu) %></label>
    <span>
      <span class="floating" style="margin-left: 0px;">
      <%= number_field_tag 'settings[number_of_items_in_project_menu]', RedmineXUxUpgradeSetting.number_of_items_in_project_menu, :min => 1 %>
      </span>
    </span>
  </p>
</fieldset>

<fieldset class="box tabular">
  <legend><%= l(:label_issue_plural) %></legend>
  <p>
    <label for="settings_remember_collapsed_issues_state"><%= l(:remember_collapsed_issues_state) %></label>
    <span>
      <span class="floating" style="margin-left: 0px;">
      <%= check_box_tag 'settings[remember_collapsed_issues_state]', 1, @settings[:remember_collapsed_issues_state] %>
      </span>
    </span>
  </p>
</fieldset>

<fieldset class="box tabular filedroplistner">
  <legend><%= l(:logo_image_label) %></legend>
  <p>
    <div class="redminex-logo-settings">
      <%= render :partial => 'attachments/form', :locals => {attachment_param: 'logo', :container => @projectino_settings, :multiple => false} %>
    </div>
  </p>
  <p>
    <%= link_to l(:remove_logo), delete_attachment_path(@projectino_settings, name: 'logo'), method: :post%>
  </p>
</fieldset>
<fieldset class="box tabular filedroplistner">
  <legend><%= l(:login_images_label) %></legend>
  <p>
    <span>
      <label><b><%= l(:login_desktop_label) %></b></label>
    </span>
    <div class="redminex-logo-settings">
      <%= render :partial => 'attachments/form', :locals => { attachment_param: 'login_desktop', :container => @projectino_settings, :multiple => false} %>
    </div>
  </p>
  <p>
    <span>
      <label><b><%= l(:login_mobile_label) %></b></label>
    </span>
    <div class="redminex-logo-settings">
      <%= render :partial => 'attachments/form', :locals => { attachment_param: 'login_mobile', :container => @projectino_settings, :multiple => false} %>
    </div>
  </p>
  <p>
    <%= link_to l(:remove_login), delete_attachment_path(@projectino_settings, name: 'login'), method: :post%>
  </p>
</fieldset>
<%= hidden_field_tag('settings[version]', Redmine::Plugin.find('000_redmine_x_ux_upgrade').version.delete('.').to_i) %>
