{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
	  <div class="pull-right">
	    <a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
		<a onclick="$('#form-manufacturer').attr('action', '{{ copy }}'); $('#form-manufacturer').submit();" data-toggle="tooltip" title="{{ button_copy }}" class="btn btn-warning"><i class="fa fa-copy"></i></a>
        <button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-manufacturer').submit() : false;"><i class="fa fa-trash-o"></i></button>
      </div>
      <h1>{{ heading_title }}</h1>
      <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
        <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ul>
    </div>
  </div>
  <div class="container-fluid">
    {% if error_warning %}
    <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %}
    {% if success %}
    <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %}
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
      </div>
      <div class="panel-body">
        <div class="maxy-backdrop"></div>
	    <div class="messages-body"></div>
		<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-manufacturer">
          <div class="table-responsive">
            <table class="table table-bordered table-hover">
              <thead>
			    <tr class="table-pagination">
				  <td colspan="5">
					<div class="pull-left">{{ pagination }}</div>
					{% if pagination %}
					  <div class="pull-right pagination-text">{{ results }}</div>
					  {% else %}
					  <div class="pull-right">{{ results }}</div>
					{% endif %}
				  </td>
				</tr>
				<tr>
                  <td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
                  <td class="text-center" style="width: 90px;">{{ column_image }}</td>
				  <td class="text-left">{% if sort == 'name' %}
                    <a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
                    {% else %}
                    <a href="{{ sort_name }}">{{ column_name }}</a>
                    {% endif %}
				  </td>
                  <td class="text-right">{% if sort == 'sort_order' %}
                    <a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
                    {% else %}
                    <a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
                    {% endif %}
				  </td>
                  <td class="text-center" style="min-width: 100px; width: 100px;">{{ column_action }}</td>
                </tr>
              </thead>
              <tbody>
                {% if manufacturers %}
                {% for manufacturer in manufacturers %}
                <tr>
                  <td class="text-center">{% if manufacturer.manufacturer_id in selected %}
                    <input type="checkbox" name="selected[]" value="{{ manufacturer.manufacturer_id }}" checked="checked" />
                    {% else %}
                    <input type="checkbox" name="selected[]" value="{{ manufacturer.manufacturer_id }}" />
                    {% endif %}
				  </td>
				  <td class="text-center">
					{% if manufacturer_image %}
					  <a data-toggle="popover-maxy" data-target="#manufacturer-image-{{ manufacturer.manufacturer_id }}" data-placement="right right-top" id="manufacturer-image{{ manufacturer.manufacturer_id }}" class="btn-hover-list"><img src="{{ manufacturer.image }}" alt="{{ manufacturer.name }}" class="img-thumbnail" /></a>
				      {% else %}
				      <img src="{{ manufacturer.image }}" alt="{{ manufacturer.name }}" class="img-thumbnail" />
					{% endif %}
				  </td>
				  <td class="text-left">
					{% if manufacturer_name %}
					  <a data-toggle="popover-maxy" data-target="#manufacturer-name-{{ manufacturer.manufacturer_id }}" data-placement="right right-top" id="manufacturer-name{{ manufacturer.manufacturer_id }}" class="btn-hover-list">{{ manufacturer.name }}</a>
                      {% else %}
					  {{ manufacturer.name }}
					{% endif %}
				  </td>
				  <td class="text-right">
					{% if manufacturer_sort_order %}
					  <a data-toggle="popover-maxy" data-target="#manufacturer-sort-{{ manufacturer.manufacturer_id }}" data-placement="left left-top" id="manufacturer-sort{{ manufacturer.manufacturer_id }}" class="btn btn-default btn-sm">{{ manufacturer.sort_order }}</a>
                      {% else %}
					  {{ manufacturer.sort_order }}
					{% endif %}
				  </td>
                  <td class="text-center">
				    {% if manufacturer_more %}<a data-toggle="popover-maxy" data-target="#manufacturer-more-{{ manufacturer.manufacturer_id }}" data-placement="left" class="btn btn-warning btn-sm"><i class="fa fa-star-o fa-fw"></i></a>{% endif %}
					<a href="{{ manufacturer.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary btn-sm"><i class="fa fa-pencil fa-fw"></i></a>
				  </td>
                </tr>
                {% endfor %}
                {% else %}
                <tr>
                  <td class="text-center" colspan="5">{{ text_no_results }}</td>
                </tr>
                {% endif %}
              </tbody>
			  <tfoot>
			    <tr>
                  <td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
                  <td class="text-center">{{ column_image }}</td>
				  <td class="text-left">{% if sort == 'name' %}
                    <a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
                    {% else %}
                    <a href="{{ sort_name }}">{{ column_name }}</a>
                    {% endif %}
				  </td>
                  <td class="text-right">{% if sort == 'sort_order' %}
                    <a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
                    {% else %}
                    <a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
                    {% endif %}
				  </td>
                  <td class="text-center">{{ column_action }}</td>
                </tr>
				<tr class="table-pagination">
				  <td colspan="5">
					<div class="pull-left">{{ pagination }}</div>
					{% if pagination %}
					  <div class="pull-right pagination-text">{{ results }}</div>
					  {% else %}
					  <div class="pull-right">{{ results }}</div>
					{% endif %}
				  </td>
				</tr>
			  </tfoot>
            </table>
          </div>
        </form>
      </div>
    </div>
  </div>
  <input type="hidden" name="placeholder" value="{{ placeholder }}" id="manufacturer-placeholder" />
  {% if manufacturers %}
    {% for manufacturer in manufacturers %}
	<div id="manufacturer-image-{{ manufacturer.manufacturer_id }}" class="popover popover-primary animate littleFadeInRight">
	  <div class="arrow"></div><h3 class="popover-title">{{ column_image }}
	  <a id="close-image-{{ manufacturer.manufacturer_id }}" data-dismiss="popover-maxy" class="btn btn-default btn-xs"><i class="fa fa-close"></i></a></h3>
	  <div class="popover-content">
		<div class="row">
		  <a onclick="linkImage('{{ manufacturer.manufacturer_id }}');" class="btn btn-link"><img src="{{ manufacturer.thumb }}" class="img-thumbnail" /></a><input type="hidden" name="image" value="" id="manufacturer-image" />
		</div>
	  </div>
	  <div class="popover-footer">
		<a onclick="editImage('{{ manufacturer.manufacturer_id }}');" class="btn btn-primary btn-sm"><i class="fa fa-save fa-fw"></i></a><a onclick="imageClear('{{ manufacturer.manufacturer_id }}');" class="btn btn-danger btn-sm"><i class="fa fa-eraser fa-fw"></i></a>
	  </div>
	</div>
	<div id="manufacturer-name-{{ manufacturer.manufacturer_id }}" class="popover popover-primary animate littleFadeInRight">
	  <div class="arrow"></div><h3 class="popover-title">{{ column_name }}
	  <a id="close-name-{{ manufacturer.manufacturer_id }}" data-dismiss="popover-maxy" class="btn btn-default btn-xs"><i class="fa fa-close"></i></a></h3>
	  <div class="popover-content">
		<input type="text" name="name" value="{{ manufacturer.name }}" placeholder="{{ column_name }}" id="input-name{{ manufacturer.manufacturer_id }}" class="form-control" />
	  </div>
	  <div class="popover-footer">
		<a onclick="editName('{{ manufacturer.manufacturer_id }}');" class="btn btn-primary btn-sm"><i class="fa fa-save fa-fw"></i></a><a onclick="nameClear('{{ manufacturer.manufacturer_id }}');" class="btn btn-danger btn-sm"><i class="fa fa-eraser fa-fw"></i></a>
	  </div>
	</div>
	<div id="manufacturer-sort-{{ manufacturer.manufacturer_id }}" class="popover popover-primary animate littleFadeInLeft">
	  <div class="arrow"></div><h3 class="popover-title">{{ column_sort_order }}
	  <a id="close-sort-{{ manufacturer.manufacturer_id }}" data-dismiss="popover-maxy" class="btn btn-default btn-xs"><i class="fa fa-close"></i></a></h3>
	  <div class="popover-content">
		<input type="number" name="sort_order" value="{{ manufacturer.sort_order }}" placeholder="{{ column_sort_order }}" id="input-sort{{ manufacturer.manufacturer_id }}" class="form-control" />
	  </div>
	  <div class="popover-footer">
		<a onclick="editSort('{{ manufacturer.manufacturer_id }}');" class="btn btn-primary btn-sm"><i class="fa fa-save fa-fw"></i></a><a onclick="sortClear('{{ manufacturer.manufacturer_id }}');" class="btn btn-danger btn-sm"><i class="fa fa-eraser fa-fw"></i></a>
	  </div>
	</div>
	<div id="manufacturer-more-{{ manufacturer.manufacturer_id }}" class="popover popover-primary popover-more animate littleFadeInLeft">
	  <div class="arrow"></div>
	  <div class="popover-content">
		{% if manufacturer_general and presence_manufacturer_description != 'manufacturer-description-not-in-opencart' %}<a onclick="editMore('{{ manufacturer.manufacturer_id }}', 'general');" class="btn btn-primary btn-sm" data-toggle="tooltip" title="{{ text_general }}"><i class="fa fa-reorder"></i></a>{% endif %}
		{% if manufacturer_seo %}<a onclick="editMore('{{ manufacturer.manufacturer_id }}', 'seo');" class="btn btn-primary btn-sm" data-toggle="tooltip" title="{{ text_seo_keyword }}"><i class="fa fa-link"></i></a>{% endif %}
		{% if manufacturer_store %}<a onclick="editMore('{{ manufacturer.manufacturer_id }}', 'stores');" class="btn btn-primary btn-sm" data-toggle="tooltip" title="{{ text_store }}"><i class="fa fa-flag"></i></a>{% endif %}
	  </div>
	</div>
	{% endfor %}
  {% endif %}
  <div id="modal-manufacturer-edit" class="modal fade">
    <div class="modal-dialog modal-lg animated zoomIn">
      <div class="modal-content">
	    <div id="modal-manufacturer-content"></div>
	  </div>
    </div>
  </div>
</div>
{{ footer }}