feat:3.0.0版初次提交,新版将完全推倒重写

This commit is contained in:
sunxiyuan 2020-07-13 18:44:03 +08:00
parent e556c4b6d9
commit 39735249ee
293 changed files with 26908 additions and 475 deletions

View file

@ -0,0 +1,8 @@
<?php
/**
* Generic listing of bundles of a given type
*/
$this->extend('../layout');
echo $this->render('../common/inc-table-filter');
echo $this->render('inc-table');

View file

@ -0,0 +1,43 @@
<?php
/**
* List of bundles
*/
?>
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th data-sort-type="s">
<?php esc_html_e('Bundle name', 'loco-translate')?>
</th>
<th data-sort-type="s">
<?php esc_html_e('Text domain','loco-translate')?>
</th>
<th data-sort-type="n">
<?php esc_html_e('Last modified','loco-translate')?>
</th>
<th data-sort-type="n">
<?php esc_html_e('Sets','loco-translate')?>
</th>
</tr>
</thead>
<tbody><?php
/* @var $bundle Loco_pages_ViewParams */
foreach( $bundles as $bundle ):?>
<tr id="loco-<?php $bundle->e('id')?>">
<td data-sort-value="<?php $bundle->e('name')?>">
<a href="<?php $bundle->e('view')?>"><?php $bundle->e('name')?></a>
</td>
<td>
<?php $bundle->e('dflt')?>
</td>
<td data-sort-value="<?php $bundle->f('time','%u')?>">
<time datetime="<?php $bundle->date('time','c')?>"><?php $bundle->time ? $bundle->date('time') : print '--'?></time>
</td>
<td data-sort-value="<?php $bundle->f('size','%u')?>">
<?php $bundle->n('size')?>
</td>
</tr><?php
endforeach;?>
</tbody>
</table>

View file

@ -0,0 +1,54 @@
<?php
/**
* Listing of installed languages
*/
$this->extend('../layout');
echo $this->render('../common/inc-table-filter');
?>
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th data-sort-type="s">
<?php esc_html_e('Locale name', 'loco-translate')?>
</th>
<th data-sort-type="s">
<?php esc_html_e('Locale code', 'loco-translate')?>
</th>
<th data-sort-type="n">
<?php esc_html_e('Last modified','loco-translate')?>
</th>
<th data-sort-type="n">
<?php esc_html_e('Files found', 'loco-translate')?>
</th>
<th data-sort-type="s">
<?php esc_html_e('Site language', 'loco-translate')?>
</th>
</tr>
</thead>
<tbody><?php
/* @var $p Loco_mvc_Params */
foreach( $locales as $p ):?>
<tr>
<td>
<a href="<?php $p->e('href')?>" class="row-title">
<span <?php echo $p->lattr?>><code><?php $p->e('lcode')?></code></span>
<span><?php $p->e('lname')?></span>
</a>
</td>
<td>
<?php $p->e('lcode')?>
</td>
<td data-sort-value="<?php $p->f('time','%u')?>">
<time datetime="<?php $p->date('time','c')?>"><?php $p->time ? $p->date('time') : print '--'?></time>
</td>
<td data-sort-value="<?php $p->e('nfiles')?>">
<?php $p->n('nfiles',0)?>
</td>
<td class="loco-<?php echo $p->active?'is':'not' ?>-active">
<?php $p->e('used')?>
</td>
</tr><?php
endforeach?>
</tbody>
</table>