<div class="wrap">
   <h1>Easy Affiliate Cloaker</h1>
   <h2>{{ affiliateLinkCloaker.trans('Cloaks List') }}</h2>
   <table class="wp-list-table widefat fixed striped posts">
      <thead>
         <tr>
            <th scope="col" id="safe-page">{{ affiliateLinkCloaker.trans('Safe Page') }}</th>
            <th scope="col" id="redirect-url">{{ affiliateLinkCloaker.trans('Money Page') }}</th>
            <th scope="col" id="redirect-type">{{ affiliateLinkCloaker.trans('Redirect Type') }}</th>
            <th scope="col" id="status">{{ affiliateLinkCloaker.trans('Status') }}</th>
            <th scope="col" id="visite">{{ affiliateLinkCloaker.trans('Visits') }}</th>
            <th scope="col" id="actions">{{ affiliateLinkCloaker.trans('Actions') }}</th>
         </tr>
      </thead>
      <tbody id="the-list">
      	{% for cloak in cloaks %}
         <tr id="post-587" class="iedit author-self level-0 post-587 type-post status-draft format-standard hentry category-uncategorized">
            <td>
               {{cloak.post.post_title}}
            </td>
            <td>
            	<a target="_blank" href="{{cloak.redirect_url}}">{{cloak.redirect_url}}</a>
            </td>
            <td>{{cloak.redirect_type}}</td>
            <td>
            	{% if cloak.status == 0 %}
            		{{ affiliateLinkCloaker.trans('Learning Mode') }}
            	{% else %}
            		{{ affiliateLinkCloaker.trans('Enabled') }}
            	{% endif %}
            </td>
            <td>{{cloak.visits_count}}</td>
            <td>
            	<a href="{{ panel_url('AffiliateLinkCloaker::dashboard') ~ '&action=visits&cloak_id=' ~ cloak.id }}">{{ affiliateLinkCloaker.trans('Visits') }}</a> | 
               <a href="{{ panel_url('AffiliateLinkCloaker::dashboard') ~ '&action=edit&cloak_id=' ~ cloak.id }}">{{ affiliateLinkCloaker.trans('Edit') }}</a> | 
               <a href="{{ panel_url('AffiliateLinkCloaker::dashboard') ~ '&action=delete&cloak_id=' ~ cloak.id }}">{{ affiliateLinkCloaker.trans('Delete') }}</a>
            </td>
         </tr>
     	   {% endfor %}
         {% if cloaks|length == 0 %}
         <tr>
            <td colspan="6" style="text-align:center;">{{ affiliateLinkCloaker.trans('No results found') }}</td>
         </tr>
         {% endif %}
      </tbody>
      <tfoot>
         <tr>
            <th scope="col" id="safe-page">{{ affiliateLinkCloaker.trans('Safe Page') }}</th>
            <th scope="col" id="redirect-url">{{ affiliateLinkCloaker.trans('Money Page') }}</th>
            <th scope="col" id="redirect-type">{{ affiliateLinkCloaker.trans('Redirect Type') }}</th>
            <th scope="col" id="status">{{ affiliateLinkCloaker.trans('Status') }}</th>
            <th scope="col" id="visite">{{ affiliateLinkCloaker.trans('Visits') }}</th>
            <th scope="col" id="actions">{{ affiliateLinkCloaker.trans('Actions') }}</th>
         </tr>
      </tfoot>
   </table>
   <div class="tablenav bottom">
      <div class="tablenav-pages">
         <span class="displaying-num">{{count}} {{ affiliateLinkCloaker.trans('total cloaks') }}</span>
         {% if prev_url != '' %}
            <a class="next-page" href="{{prev_url}}">
               <span>‹</span>
            </a>
         {% else %}
            <span class="tablenav-pages-navspan">‹</span>
         {% endif %}
         {% if next_url != '' %}
            <a class="next-page" href="{{next_url}}">
               <span>›</span>
            </a>
         {% else %}
            <span class="tablenav-pages-navspan">›</span>
         {% endif %}
         <br class="clear">
      </div>
   </div>
</div>