PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
weforms / assets / spa / components / component-table / template.php

template.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.6.1, at assets/spa/components/component-table/template.php

163 lines 10.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div>
2
3 <div class="tablenav top">
4
5 <div class="alignleft actions bulkactions">
6 <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e( 'Select bulk action', 'weforms' ); ?></label>
7 <select name="action" v-model="bulkAction">
8 <option value="-1"><?php _e( 'Bulk Actions', 'weforms' ); ?></option>
9 <option value="restore" v-if="status == 'trash' ">
10 <?php _e( 'Restore Entries', 'weforms' ); ?>
11 </option>
12 <option value="delete">
13 <template v-if="status == 'trash' "><?php _e( 'Delete Permanently', 'weforms' ); ?></template>
14 <template v-else><?php _e( 'Delete Entries', 'weforms' ); ?></template>
15 </option>
16 </select>
17
18 <button class="button action" v-on:click.prevent="handleBulkAction"><?php _e( 'Apply', 'weforms' ); ?></button>
19 </div>
20
21 <div class="alignleft actions" v-if="has_export !== 'no' && status != 'trash' ">
22 <a class="button" :href="'admin-post.php?action=weforms_export_form_entries&selected_forms=' + id + '&_wpnonce=' + nonce" style="margin-top: 0;"><span class="dashicons dashicons-download" style="margin-top: 4px;"></span> <?php _e( 'Export Entries', 'weforms' ); ?></a>
23 </div>
24
25 <div class="tablenav-pages">
26
27 <span v-if="totalItems" class="displaying-num">{{ totalItems }} <?php _e( 'items', 'weforms' ); ?></span>
28
29 <span class="pagination-links">
30 <span v-if="isFirstPage()" class="tablenav-pages-navspan" aria-hidden="true">«</span>
31 <a v-else class="first-page" href="#" @click.prevent="goFirstPage()"><span class="screen-reader-text"><?php _e( 'First page', 'weforms' ); ?></span><span aria-hidden="true">«</span></a>
32
33 <span v-if="currentPage == 1" class="tablenav-pages-navspan" aria-hidden="true"></span>
34 <a v-else class="prev-page" href="#" @click.prevent="goToPage('prev')"><span class="screen-reader-text"><?php _e( 'Previous page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
35
36 <span class="screen-reader-text"><?php _e( 'Current Page', 'weforms' ); ?></span><input @keydown.enter.prevent="goToPage(pageNumberInput)" class="current-page" id="current-page-selector" v-model="pageNumberInput" type="text" value="1" size="1" aria-describedby="table-paging"> <?php _e( 'of', 'weforms' ); ?> <span class="total-pages">{{ totalPage }}</span>
37
38 <span v-if="currentPage == totalPage" class="tablenav-pages-navspan" aria-hidden="true"></span>
39 <a v-else class="next-page" href="#" @click.prevent="goToPage('next')"><span class="screen-reader-text"><?php _e( 'Next page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
40
41 <span v-if="isLastPage()" class="tablenav-pages-navspan" aria-hidden="true">»</span>
42 <a v-else class="last-page" href="#" @click.prevent="goLastPage()"><span class="screen-reader-text"><?php _e( 'Last page', 'weforms' ); ?></span><span aria-hidden="true">»</span></a>
43 </span>
44 </div>
45 </div>
46
47 <table class="wp-list-table widefat fixed striped wpuf-contact-form">
48 <thead>
49 <tr>
50 <td id="cb" class="manage-column column-cb check-column">
51 <input type="checkbox" v-model="selectAll">
52 </td>
53 <th class="col-entry-id"><?php _e( 'ID', 'weforms' ); ?></th>
54 <th v-for="(header, index) in columns">{{ header }}</th>
55 <th>Actions</th>
56 </tr>
57 </thead>
58 <tfoot>
59 <tr>
60 <td id="cb" class="manage-column column-cb check-column">
61 <input type="checkbox" v-model="selectAll">
62 </td>
63 <th class="col-entry-id"><?php _e( 'ID', 'weforms' ); ?></th>
64 <th v-for="(header, index) in columns">{{ header }}</th>
65 <th class="col-entry-details"><?php _e( 'Actions', 'weforms' ); ?></th>
66 </tr>
67 </tfoot>
68 <tbody>
69 <tr v-if="loading">
70 <td v-bind:colspan="columnLength + 3"><?php _e( 'Loading...', 'weforms' ); ?></td>
71 </tr>
72 <tr v-if="!items.length && !loading">
73 <td v-bind:colspan="columnLength + 3"><?php _e( 'No entries found!', 'weforms' ); ?></td>
74 </tr>
75 <tr v-for="(entry, index) in items">
76 <template v-if="currentPage == 1">
77 <template v-if="index < perPage">
78 <th scope="row" class="check-column">
79 <input type="checkbox" name="post[]" v-model="checkedItems" :value="entry.id">
80 </th>
81 <th class="col-entry-id">
82 <router-link :to="{ name: 'formEntriesSingle', params: { entryid: entry.id }}">#{{ entry.id }}</router-link>
83 </th>
84 <td v-for="(header, index) in columns"><span v-html="entry.fields[index]"></span></td>
85 <th class="col-entry-details">
86 <template v-if="status == 'trash'">
87 <a href="#" @click.prevent="restore(entry.id)"><?php _e( 'Restore', 'weforms' ); ?></a>
88 <span style="color: #ddd">|</span>
89 <a href="#" @click.prevent="deletePermanently(entry.id)"><?php _e( 'Delete Permanently', 'weforms' ); ?></a>
90 </template>
91 <template v-else>
92 <router-link :to="{ name: 'formEntriesSingle', params: { entryid: entry.id }}">
93 <?php _e( 'Details', 'weforms' ); ?>
94 </router-link>
95 </template>
96 </th>
97 </template>
98 </template>
99 <template v-else>
100 <th scope="row" class="check-column">
101 <input type="checkbox" name="post[]" v-model="checkedItems" :value="entry.id">
102 </th>
103 <th class="col-entry-id">
104 <router-link :to="{ name: 'formEntriesSingle', params: { entryid: entry.id }}">#{{ entry.id }}</router-link>
105 </th>
106 <td v-for="(header, index) in columns"><span v-html="entry.fields[index]"></span></td>
107 <th class="col-entry-details">
108 <template v-if="status == 'trash'">
109 <a href="#" @click.prevent="restore(entry.id)"><?php _e( 'Restore', 'weforms' ); ?></a>
110 <span style="color: #ddd">|</span>
111 <a href="#" @click.prevent="deletePermanently(entry.id)"><?php _e( 'Delete Permanently', 'weforms' ); ?></a>
112 </template>
113 <template v-else>
114 <router-link :to="{ name: 'formEntriesSingle', params: { entryid: entry.id }}">
115 <?php _e( 'Details', 'weforms' ); ?>
116 </router-link>
117 </template>
118 </th>
119 </template>
120 </tr>
121 </tbody>
122 </table>
123
124 <div class="tablenav bottom">
125 <div class="alignleft actions bulkactions">
126 <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e( 'Select bulk action', 'weforms' ); ?></label>
127 <select name="action" v-model="bulkAction">
128 <option value="-1"><?php _e( 'Bulk Actions', 'weforms' ); ?></option>
129 <option value="restore" v-if="status == 'trash' ">
130 <?php _e( 'Restore Entries', 'weforms' ); ?>
131 </option>
132 <option value="delete">
133 <template v-if="status == 'trash' "><?php _e( 'Delete Permanently', 'weforms' ); ?></template>
134 <template v-else><?php _e( 'Delete Entries', 'weforms' ); ?></template>
135 </option>
136 </select>
137
138 <button class="button action" v-on:click.prevent="handleBulkAction"><?php _e( 'Apply', 'weforms' ); ?></button>
139 </div>
140
141 <div class="tablenav-pages">
142
143 <span v-if="totalItems" class="displaying-num">{{ totalItems }} <?php _e( 'items', 'weforms' ); ?></span>
144
145 <span class="pagination-links">
146 <span v-if="isFirstPage()" class="tablenav-pages-navspan" aria-hidden="true">«</span>
147 <a v-else class="first-page" href="#" @click.prevent="goFirstPage()"><span class="screen-reader-text"><?php _e( 'First page', 'weforms' ); ?></span><span aria-hidden="true">«</span></a>
148
149 <span v-if="currentPage == 1" class="tablenav-pages-navspan" aria-hidden="true"></span>
150 <a v-else class="prev-page" href="#" @click.prevent="goToPage('prev')"><span class="screen-reader-text"><?php _e( 'Previous page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
151
152 <span class="screen-reader-text"><?php _e( 'Current Page', 'weforms' ); ?></span><input @keydown.enter.prevent="goToPage(pageNumberInput)" class="current-page" id="current-page-selector" v-model="pageNumberInput" type="text" value="1" size="1" aria-describedby="table-paging"> of <span class="total-pages">{{ totalPage }}</span>
153
154 <span v-if="currentPage == totalPage" class="tablenav-pages-navspan" aria-hidden="true"></span>
155 <a v-else class="next-page" href="#" @click.prevent="goToPage('next')"><span class="screen-reader-text"><?php _e( 'Next page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
156
157 <span v-if="isLastPage()" class="tablenav-pages-navspan" aria-hidden="true">»</span>
158 <a v-else class="last-page" href="#" @click.prevent="goLastPage()"><span class="screen-reader-text"><?php _e( 'Last page', 'weforms' ); ?></span><span aria-hidden="true">»</span></a>
159 </span>
160 </div>
161 </div>
162 </div>
163