{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="pull-right">
	    <a onclick="urlAlias();" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus fa-fw"></i></a>
		<a onclick="generatorUrlAlias('categories');" data-toggle="tooltip" title="{{ button_generator_categories }}" class="btn btn-success"><i class="fa fa-sitemap fa-fw"></i></a>
		<a onclick="generatorUrlAlias('products');" data-toggle="tooltip" title="{{ button_generator_products }}" class="btn btn-success"><i class="fa fa-gift fa-fw"></i></a>
		<a onclick="generatorUrlAlias('manufacturers');" data-toggle="tooltip" title="{{ button_generator_manufacturers }}" class="btn btn-success"><i class="fa fa-wrench fa-fw"></i></a>
		<a onclick="generatorUrlAlias('informations');" data-toggle="tooltip" title="{{ button_generator_information }}" class="btn btn-success"><i class="fa fa-info fa-fw"></i></a>
		<a data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-seo-manager').submit() : false;"><i class="fa fa-trash-o fa-fw"></i></a>
      </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-seo-manager">
          <div class="table-responsive">
            <table class="table table-bordered table-hover">
              <thead>
                <tr class="table-pagination">
				  <td colspan="6">
					<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-left">{% if sort == 'query' %}<a href="{{ sort_query }}" class="{{ order|lower }}">{{ column_query }}</a>{% else %}<a href="{{ sort_query }}">{{ column_query }}</a>{% endif %}</td>
                  <td class="text-left">{% if sort == 'keyword' %}<a href="{{ sort_keyword }}" class="{{ order|lower }}">{{ column_keyword }}</a> {% else %}<a href="{{ sort_keyword }}">{{ column_keyword }}</a>{% endif %}</td>
                  <td class="text-left">{% if sort == 'store_id' %}<a href="{{ sort_store }}" class="{{ order|lower }}">{{ column_store }}</a>{% else %}<a href="{{ sort_store }}">{{ column_store }}</a>{% endif %}</td>
                  <td class="text-left">{% if sort == 'language_id' %}<a href="{{ sort_language }}" class="{{ order|lower }}">{{ column_language }}</a>{% else %}<a href="{{ sort_language }}">{{ column_language }}</a>{% endif %}</td>
				  <td class="text-center">{{ column_action }}</td>
				</tr>
			  </thead>
			  <tbody>
				<tr class="table-filter">
				  <td></td>
				  <td class="text-left"><input type="text" name="filter_query" value="{{ filter_query }}" id="input-query" class="form-control" /></td>
				  <td class="text-left"><input type="text" name="filter_keyword" value="{{ filter_keyword }}" id="input-keyword" class="form-control" /></td>
				  <td class="text-left">
				    <select name="filter_store_id" id="input-store" class="form-control">
					  <option value=""></option>
					  {% if filter_store_id == '0' %}
						<option value="0" selected="selected">{{ text_default }}</option>
						{% else %}
						<option value="0">{{ text_default }}</option>
					  {% endif %}               
					  {% for store in filter_stores %}
						{% if store.store_id == filter_store_id %}
						  <option value="{{ store.store_id }}" selected="selected">{{ store.name }}</option>
						  {% else %}
						  <option value="{{ store.store_id }}">{{ store.name }}</option>
						{% endif %}
					  {% endfor %}
				    </select>
				  </td>
				  <td class="text-left">
				    <select name="filter_language_id" id="input-language" class="form-control">
					  <option value=""></option>
					  {% for language in languages %}
					    {% if language.language_id == filter_language_id %}
						  <option value="{{ language.language_id }}" selected="selected">{{ language.name }}</option>
						  {% else %}
						  <option value="{{ language.language_id }}">{{ language.name }}</option>
					    {% endif %}
					  {% endfor %}
				    </select>
				  </td>
				  <td class="text-center"><button type="button" id="button-filter" data-toggle="tooltip" title="{{ button_filter }}" class="btn btn-info btn-sm"><i class="fa fa-search"></i></button></td>
				</tr>
				{% if seo_urls %}
                  {% for seo_url in seo_urls %}
					<tr>
					  <td class="text-center">
					    {% if seo_url.seo_url_id in selected %}
                          <input type="checkbox" name="selected[]" value="{{ seo_url.seo_url_id }}" checked="checked" />
                          {% else %}
                          <input type="checkbox" name="selected[]" value="{{ seo_url.seo_url_id }}" />
                        {% endif %}
					  </td>
					  <td class="text-left"><a data-toggle="popover-maxy" data-target="#url-query-{{ seo_url.seo_url_id }}" data-placement="right right-top" id="url-query{{ seo_url.seo_url_id }}" class="btn-hover-list">{{ seo_url.query }}</a></td>
					  <td class="text-left">
					    {% if seo_url.keyword %}
					      <a data-toggle="popover-maxy" data-target="#url-keyword-{{ seo_url.seo_url_id }}" data-placement="right right-top" id="url-keyword{{ seo_url.seo_url_id }}" class="btn-hover-list">{{ seo_url.keyword }}</a>
					      {% else %}
						  <a data-toggle="popover-maxy" data-target="#url-keyword-{{ seo_url.seo_url_id }}" data-placement="right right-top" id="url-keyword{{ seo_url.seo_url_id }}" class="btn-hover-list">{{ text_keyword_none }}</a>
					    {% endif %}
					  </td>
					  <td class="text-left">{{ seo_url.store }}</td>
                      <td class="text-left">{{ seo_url.language }}</td>
					  <td class="text-center"><a onclick="urlAlias('{{ seo_url.seo_url_id }}');" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary btn-sm"><i class="fa fa-pencil"></i></a></td>
					</tr>
				  {% endfor %}
                  {% else %}
				  <tr>
				    <td class="text-center" colspan="6">{{ 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-left">{% if sort == 'query' %}<a href="{{ sort_query }}" class="{{ order|lower }}">{{ column_query }}</a>{% else %}<a href="{{ sort_query }}">{{ column_query }}</a>{% endif %}</td>
                  <td class="text-left">{% if sort == 'keyword' %}<a href="{{ sort_keyword }}" class="{{ order|lower }}">{{ column_keyword }}</a> {% else %}<a href="{{ sort_keyword }}">{{ column_keyword }}</a>{% endif %}</td>
                  <td class="text-left">{% if sort == 'store_id' %}<a href="{{ sort_store }}" class="{{ order|lower }}">{{ column_store }}</a>{% else %}<a href="{{ sort_store }}">{{ column_store }}</a>{% endif %}</td>
                  <td class="text-left">{% if sort == 'language_id' %}<a href="{{ sort_language }}" class="{{ order|lower }}">{{ column_language }}</a>{% else %}<a href="{{ sort_language }}">{{ column_language }}</a>{% endif %}</td>
				  <td class="text-center">{{ column_action }}</td>
				</tr>
				<tr class="table-pagination">
				  <td colspan="6">
					<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="text_keyword_none" value="{{ text_keyword_none }}" id="keyword-none" />
  <input type="hidden" name="text_confirm" value="{{ text_confirm }}" id="delete-seo-confirm" />
  {% if seo_urls %}
    {% for seo_url in seo_urls %}
	  <div id="url-query-{{ seo_url.seo_url_id }}" class="popover popover-primary animate littleFadeInRight">
	    <div class="arrow"></div><h3 class="popover-title">{{ column_query }}<a id="close-url-query-{{ seo_url.seo_url_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="query" value="{{ seo_url.query }}" placeholder="{{ column_query }}" id="input-url-query{{ seo_url.seo_url_id }}" class="form-control" />
	    </div>
	    <div class="popover-footer">
		  <a onclick="editQuery('{{ seo_url.seo_url_id }}');" class="btn btn-primary btn-sm"><i class="fa fa-save fa-fw"></i></a><a onclick="clearQuery('{{ seo_url.seo_url_id }}');" class="btn btn-danger btn-sm"><i class="fa fa-eraser fa-fw"></i></a>
	    </div>
	  </div>
	  <div id="url-keyword-{{ seo_url.seo_url_id }}" class="popover popover-primary animate littleFadeInRight">
	    <div class="arrow"></div><h3 class="popover-title">{{ column_keyword }}<a id="close-url-keyword-{{ seo_url.seo_url_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="keyword" value="{{ seo_url.keyword }}" placeholder="{{ column_keyword }}" id="input-url-keyword{{ seo_url.seo_url_id }}" class="form-control" />
	      <input type="hidden" name="query" value="{{ seo_url.query }}" id="input-url-keyword-query{{ seo_url.seo_url_id }}" />
		</div>
	    <div class="popover-footer">
		  <a onclick="editKeyword('{{ seo_url.seo_url_id }}');" class="btn btn-primary btn-sm"><i class="fa fa-save fa-fw"></i></a><a onclick="clearKeyword('{{ seo_url.seo_url_id }}');" class="btn btn-danger btn-sm"><i class="fa fa-eraser fa-fw"></i></a>
	    </div>
	  </div>
	{% endfor %}
  {% endif %}
  <div id="modal-url-alias" class="modal fade">
    <div class="modal-dialog modal-lg animated zoomIn">
      <div class="modal-content">
	    <div id="modal-url-alias-content"></div>
	  </div>
    </div>
  </div>
</div>
{{ footer }}