

<div class="page-header">
 <ul class="breadcrumb">
  <li><a href="<%= root_path %>">Home</a></li>
  <li>Menus</li>
  <span style="float: right">
    <%= link_to t('.new', :default => t("helpers.links.new")),new_settings_menu_path,:class => 'btn btn-primary btn-sm' %>
  </span>
 </ul>
</div>

<br>
<div class="card">
  <table class="table table-striped">
    <thead>
      <tr>
        <th>Name</th>
        <th>Valid Days</th>
        <th>Valid Time From</th>
        <th>Valid Time To</th>
        <th>Created By</th>
        <th>Created At</th>

        <th>Action</th>
      </tr>
    </thead>

    <tbody>
      <% @settings_menus.each do |settings_menu| %>
        <tr>
          <td><%= link_to settings_menu.name, settings_menu_path(settings_menu) %></td>
          <td><%= settings_menu.valid_days %></td>
          <td><%= settings_menu.valid_time_from.strftime("%H:%M") rescue "-" %></td>
          <td><%= settings_menu.valid_time_to.strftime("%H:%M") rescue "-" %></td>
          <td><%= settings_menu.created_by %></td>
          <!-- <td><%=l settings_menu.created_at, format: :short %></td> -->
          <td><%= settings_menu.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
          <td><%= link_to 'Edit', edit_settings_menu_path(settings_menu) %></td>  
          <td><%= link_to 'Destroy', settings_menu_path(settings_menu), method: :delete, data: { confirm: 'Are you sure?' } %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
 <%= paginate @settings_menus, param_name: :page, :outer_window => 3 %> 
