<% settings = Setting.plugin_redmine_ux_toolkit || {} %>
<% visible_navigation_links = RedmineUxToolkit::Services::NavigationLinks.visible_link_keys(settings) %>

<p>
  <strong><%= l(:label_ux_toolkit_navigation) %></strong>
</p>

<p>
  <strong><%= l(:label_ux_toolkit_visible_navigation_links) %></strong>
  <em class="info"><%= l(:text_ux_toolkit_visible_navigation_links_help) %></em>
</p>

<%= hidden_field_tag 'settings[visible_navigation_links][]', '', id: nil %>
<% RedmineUxToolkit::Services::NavigationLinks::LINK_KEYS.each do |link_key| %>
  <p>
    <%= check_box_tag 'settings[visible_navigation_links][]',
                      link_key,
                      visible_navigation_links.include?(link_key),
                      id: "settings_visible_navigation_link_#{link_key}" %>
    <%= label_tag "settings_visible_navigation_link_#{link_key}",
                  l(RedmineUxToolkit::Services::NavigationLinks::LABEL_KEYS[link_key]) %>
  </p>
<% end %>
