<div class="page-header">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
    <li class="breadcrumb-item"><a href="<%= settings_menu_category_simple_menu_item_path(@category,@item) %>"><%= t("views.right_panel.header.menu_item") %></a></li>
    <li class="breadcrumb-item active"><%= t :details %></li>
    <span class="float-right">
      <%= link_to 'Back', settings_menu_category_simple_menu_item_path(@category,@item) %>
    </span>
  </ol>
</div>


<div class="row">
  <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
     <div class="card">
  <div class="card-block">
    <h4 class="card-title"><%= t("views.right_panel.header.menu_item_instances") %></h4>
    <table class="table">
      <tbody>

          <tr><th><%= t("views.right_panel.detail.item_instance_code") %></th>
          <td><%= @settings_menu_item_instances.item_instance_code %></td>
          </tr>
          <tr><th><%= t("views.right_panel.detail.name") %></th>
          <td><%= @settings_menu_item_instances.item_instance_name  rescue "-" %></td>
          </tr>
          <tr><th><%= t("views.right_panel.detail.price") %></th>
          <td><%= @settings_menu_item_instances.price %></td>
          </tr>
          <tr><th><%= t("views.right_panel.detail.is_on_promotion") %></th>
          <td><%= @settings_menu_item_instances.is_on_promotion %></td>
          </tr>
          <tr><th><%= t("views.right_panel.detail.promotion_price") %></th>
          <td><%= @settings_menu_item_instances.promotion_price %></td>
          </tr>
          <tr><th><%= t("views.right_panel.detail.is_available") %></th>
          <td><%= @settings_menu_item_instances.is_available %></td>
          </tr>
          <tr><th><%= t("views.right_panel.detail.is_default") %></th>
          <td><%= @settings_menu_item_instances.is_default %></td>
          </tr>
          <tr><th><%= t("views.right_panel.detail.created_at") %></th>
          <td><%= @settings_menu_item_instances.created_at.strftime("%Y-%m-%d/%I:%M %p") %></td>
          </tr>

      </tbody>
    </table>
    <% if params[:simple_menu_item_id] %>
      <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_simple_menu_item_menu_item_instance_path(@item, @settings_menu_item_instances)%>" data-method="delete">
        <%= t("views.btn.delete") %>
      </button>

      <span class="hidden" id="delete_text">
          <h6>Are you sure you want to delete this row ?</h6>
          <h6>This action can't be undo. </h6>
      </span>
      <% else %>
      <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_simple_menu_item_menu_item_instance_path(@item, @settings_menu_item_instances)%>" data-method="delete">
        <%= t("views.btn.delete") %>
      </button>

      <span class="hidden" id="delete_text">
          <h6>Are you sure you want to delete this row ?</h6>
          <h6>This action can't be undo. </h6>
      </span>
    <% end %>
  </div>
</div>
  </div>
  <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
    <div class="card">
      <div class="body">
        <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
        <p>
        1) <%= t("views.right_panel.detail.item_instance_code") %> - <%= t("views.right_panel.detail.code_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %><br>
        2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.menu_item_instance_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
        3) <%= t("views.right_panel.detail.price") %> - <%= t("views.right_panel.detail.price_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
        4) <%= t("views.right_panel.detail.is_on_promotion") %> - <%= t("views.right_panel.detail.menu_item_instance_txt") %> <%= t("views.right_panel.detail.is_on_promotion_txt") %> <br>
        5) <%= t("views.right_panel.detail.promotion_price") %> - <%= t("views.right_panel.detail.promotion_txt") %> <%= t("views.right_panel.detail.price_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
        6) <%= t("views.right_panel.detail.is_available") %> - <%= t("views.right_panel.detail.menu_item_instance_txt") %> <%= t("views.right_panel.detail.status_txt") %> <br>
        7) <%= t("views.right_panel.detail.is_default") %> - <%= t("views.right_panel.detail.menu_item_instance_txt") %> <%= t("views.right_panel.detail.default_txt") %> <br>
        8) <%= t("views.right_panel.detail.created_at") %> - <%= t("views.right_panel.detail.created_at_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
        </p>
        <!-- <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
        <p>
        1) <%= t("views.right_panel.button.delete") %> - <%= t("views.right_panel.detail.delete_btn_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
        </p> -->
        <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
        <p>
          1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
          2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
        </p>
      </div>
    </div>
  </div>
</div>
