Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

117 lines (106 sloc) 4.19 kb
<!-- render_column -->
{% macro render_column(column, page_url, page) -%}
{% if column.orderable %}
<th {{ column.attrs.th.as_html() }} >
<a href="{{ page_url(page, order_by=column.name) }}">
<span>{{ column.header }}</span>
<span class="sorting-indicator"></span>
</a>
</th>
{% else %}
<th {{ column.attrs.th.as_html() }} >
{{ column.header }}</th>
{% endif %}
{%- endmacro %}
<!-- render_paginate -->
{% macro render_paginate(page_obj, page_url) -%}
<div class="tablenav bottom">
<div class="tablenav-pages"><span class="displaying-num">{{ page_obj.total_items }} items</span>
<span class="pagination-links">
<a class="first-pag {% if page_obj.page==1 %}disabled{% endif %}"
title="Go to the first page" href="{{ page_url(1) }}">«</a>
{% if page_obj.has_prev %}
<a class="prev-page" title="Go to the previous page" href="{{ page_url(page_obj.prev_num) }}">‹</a>
{% endif %}
<span class="paging-input">{{ page_obj.page }} of <span class="total-pages">{{ page_obj.pages }}</span></span>
{% if page_obj.has_next %}
<a class="next-page" title="Go to the next page" href="{{ page_url(page_obj.next_num) }}">›</a>
{% endif %}
<a class="last-page {% if page_obj.page==page_obj.pages %}disabled{% endif %}"
title="Go to the last page" href="{{ page_url(page_obj.pages) }}">»</a></span>
</div>
<br class="clear">
</div>
{%- endmacro %}
<!-- render_table -->
{% macro render_table(table) -%}
<table class="wp-list-table widefat fixed" cellspacing="0">
<thead>
<tr>
{% for column in table.columns %}
{{ render_column(column, table.page_url, table.page_obj.page) }}
{% endfor %}
</tr>
</thead>
<tfoot>
<tr>
{% for column in table.columns %}
{{ render_column(column, table.page_url, table.page_obj.page) }}
{% endfor %}
</tr>
</tfoot>
<tbody id="the-list" >
{% for row in table.rows %}
<tr>
{% for column, cell in row.items %}
{% if column.is_checkbox %}
<th {{ column.attrs.th.as_html(scope="row") }} >{{ cell }}</th>
{% else %}
<td {{ column.attrs.td.as_html() }}>{{ cell }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% if table.page_obj.total %}{{ render_paginate(table.page_obj, table.page_url) }}{% endif %}
{%- endmacro %}
<!-- Screen Meta -->
{% macro render_screen_meta(table) -%}
<div id="screen-meta" class="metabox-prefs" style="display: none; ">
<div id="contextual-help-wrap" class="hidden">
<div id="contextual-help-columns">
<div class="contextual-help-tabs-wrap">
<div id="tab-panel-overview" class="help-tab-content active">
<p>{{ "Table.infomation" }}</p>
</div>
</div>
</div>
</div>
<div id="screen-options-wrap" class="hidden" style="display: none; ">
<form id="adv-settings" action="" method="post">
<h5>Show on screen</h5>
<div class="metabox-prefs">
<input id="hidden-columns" type="hidden" name="hidden-columns" value="" />
{% for column in table.columns %}
{% if not column.is_checkbox and not column.is_button %}
<label for="{{ column.name }}-hide">
<input class="hide-column-tog" name="{{ column.name }}-hide" type="checkbox"
id="{{ column.name }}-hide" value="{{ column.name }}"
{% if column.name not in table.hidden_columns %} checked="checked" {% endif %} >{{ column.header }}</label>
{% endif %}
{% endfor %}
<br class="clear">
</div>
<div class="screen-options">
<input type="number" step="1" min="1" max="999" class="screen-per-page"
name="wp_screen_options[value]" id="users_per_page" maxlength="3" value="{{ table.page_obj.per_page }}">
<label for="users_per_page">Users</label>
<input type="submit" name="screen-options-apply" id="screen-options-apply" class="button" value="Apply">
<input type="hidden" name="wp_screen_options[option]" value="users_per_page">
</div>
<!-- <div><input type="hidden" id="screenoptionnonce" name="screenoptionnonce" value="24b7ebf309"></div> -->
</form>
</div>
</div>
{%- endmacro %}
Jump to Line
Something went wrong with that request. Please try again.