120 lines
5.3 KiB
Plaintext
Executable File
120 lines
5.3 KiB
Plaintext
Executable File
<!-- Search Bar -->
|
|
<!-- <div class="search-bar">
|
|
<div class="search-icon">
|
|
<i class="material-icons">search</i>
|
|
</div>
|
|
<input type="text" placeholder="START TYPING...">
|
|
<div class="close-search">
|
|
<i class="material-icons">close</i>
|
|
</div>
|
|
</div> -->
|
|
<!-- #END# Search Bar -->
|
|
<!-- Top Bar -->
|
|
<%if !request.path_info.include?('second_display') %>
|
|
<nav class="navbar">
|
|
<div class="container-fluid">
|
|
<div class="navbar-header">
|
|
<!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> -->
|
|
<%if current_login_employee.role !="waiter" %>
|
|
<a href="javascript:void(0);" class="bars"></a>
|
|
<% if current_login_employee.role != "cashier" %>
|
|
<a class="navbar-brand" href="<%=dashboard_path%>" style="margin-left: 20px;">
|
|
<% else %>
|
|
<a class="navbar-brand" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
|
|
<% end %>
|
|
<% else %>
|
|
<a class="navbar-brand m-0" href="<%= origami_dashboard_path%>">
|
|
<%end%>
|
|
<img src="<%= asset_path('SX-Logo-small.png') %>" width="40" height="40" alt="Logo" />
|
|
<span class="navbar-brand-txt">SX Restaurant</span>
|
|
</a>
|
|
<% if @payment_method_setting_nav.present? %>
|
|
<span class="navbar-brand m-0">/
|
|
<span id="otherPayment"></span> Payment
|
|
</span>
|
|
<% end %>
|
|
|
|
</div>
|
|
<!-- Start Shop Info -->
|
|
<div class="navbar-right">
|
|
<div class="col-lg-12 col-md-12 col-sm-12 navbar-brand">
|
|
<span class="navbar-brand-txt"><%= shop_detail.name %></span>
|
|
</div>
|
|
</div>
|
|
<!-- End Shop Info -->
|
|
<!-- Start Delete confirrm text !-->
|
|
<div class="navbar-right">
|
|
<a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
<% if current_login_employee %>
|
|
<span><%= current_login_employee.name %></span>
|
|
<% end %>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<%if current_login_employee.role =="administrator" %>
|
|
<li>
|
|
<p class="waves-effect waves-block p-l-30 m-b-5">
|
|
<a href="<%= settings_shops_path %>" style="text-decoration: none;">
|
|
<i class="material-icons font-7 logout_icon shopinfo">info</i>
|
|
<span class="font-15 shopinfo" >Shop Info</span>
|
|
</a>
|
|
</p>
|
|
</li>
|
|
<% end %>
|
|
<li>
|
|
<!-- <p class="delete waves-effect waves-block p-l-30 m-b-5" data-ref="<%=logout_path%>" data-method="delete">
|
|
<i class="material-icons font-10 logout_icon">exit_to_app</i>
|
|
<span class="font-18">Logout</span>
|
|
</p> -->
|
|
<p class="delete waves-effect waves-block p-l-30 m-b-5 logout" data-ref="<%= logout_path %>" data-method="delete">
|
|
<i class="material-icons font-7 logout_icon">exit_to_app</i>
|
|
<span class="font-15">Logout</span>
|
|
</p>
|
|
<span class="hidden" id="delete_text">
|
|
<h6>Are you sure you want to Logout ?</h6>
|
|
<!-- <h6>This action can't be undo. </h6> -->
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
<!-- NO Need for color Change
|
|
<a href="javascript:void(0);" class="js-right-sidebar" data-close="true">
|
|
<i class="material-icons">more_vert</i>
|
|
</a> -->
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<%end%>
|
|
<script type="text/javascript">
|
|
if((document.getElementById("otherPayment")!=undefined) && (document.getElementById("otherPayment")!=null) && (document.getElementById("otherPayment")!="")){
|
|
var otherPayment = location.href.split('/')[location.href.split('/').length -1 ];
|
|
document.getElementById("otherPayment").innerHTML = otherPayment;
|
|
}
|
|
|
|
$(function(){
|
|
$('.delete').click(function(){
|
|
var method = $(this).attr('data-method');
|
|
var url = $(this).attr('data-ref');
|
|
var html_text = $(this).siblings( "#delete_text" ).html();
|
|
//var page = url.substring(url.lastIndexOf('/') + 1);
|
|
swal({
|
|
title: "Confirmation",
|
|
text: html_text,
|
|
type: "warning",
|
|
showCancelButton: true,
|
|
confirmButtonColor: "#DD6B55",
|
|
html: true
|
|
}, function (isConfirm) {
|
|
if (isConfirm) {
|
|
$.ajax({
|
|
type: method,
|
|
url: url ,
|
|
success: function(data) {
|
|
location.href = data.url;
|
|
}
|
|
});
|
|
} else {
|
|
swal("Cancelled", "Your imaginary file is safe :)", "error");
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script> |