1- <?php if ($ result ): ?>
2- <table class="pure-table pure-table-bordered">
3- <thead>
4- <tr>
5- <th>#</th>
6- <th><?php echo _t ('应用名称 ' ); ?> </th>
7- <th><?php echo _t ('应用描述 ' ); ?> </th>
8- <th><?php echo _t ('作者 ' ); ?> </th>
9- <th><?php echo _t ('版本 ' ); ?> </th>
10- <th><?php echo _t ('版本要求 ' ); ?> </th>
11- <th><?php echo _t ('安装 ' ); ?> </th>
12- </tr>
13- </thead>
14- <tbody>
15- <?php $ index = 0 ;
16- foreach ($ result ->packages as $ plugin ):
17- $ index ++; ?>
18- <tr class="as-card" data-name="<?php echo $ plugin ->name ; ?> " data-existed="<?php echo $ plugin ->existed ?> ">
19- <td><?php echo $ index ; ?> </td>
20- <td><?php echo $ plugin ->name ; ?> </td>
21- <td class="as-description"><?php echo $ plugin ->versions [0 ]->description ; ?> </td>
22- <td class="as-author"><?php echo $ plugin ->versions [0 ]->author ; ?> </td>
23- <td class="as-versions">
24- <select class="as-version-selector">
25- <?php foreach ($ plugin ->versions as $ version ): ?>
26- <option value="<?php echo $ version ->version ; ?> " data-activated="<?php echo $ version ->activated ; ?> " data-author="<?php echo $ version ->author ; ?> " data-require="<?php echo $ version ->require ; ?> " data-description="<?php echo $ version ->description ; ?> "><?php echo $ version ->version ; ?> </option>
27- <?php endforeach ; ?>
28- </select>
29- </td>
30- <td class="as-require" style="white-space:nowrap;"><?php echo $ plugin ->versions [0 ]->require ; ?> </td>
31- <td class="as-operations">
32- <?php if ($ this ->installale ): ?>
33- <?php if ($ plugin ->existed ): ?>
34- <button class="pure-button as-install button-small"><?php echo _t ("重新安装 " ); ?> </button>
35- <?php else : ?>
36- <button class="pure-button pure-button-primary as-install button-small"><?php echo _t ("立即安装 " ); ?> </button>
37- <?php endif ; ?>
38- <?php else : ?>
39- <a class="pure-button button-small" onclick="return confirm('没有写入权限或者运行在云平台中\n点击确认后将进行下载,请手动传到服务器上!');" href="<?php echo $ this ->server .'archive/ ' .$ plugin ->name .'/ ' .str_replace (' ' , '%20 ' , $ version ->version );?> "><?php echo _t ('下载 ' ); ?> </a>
40- <?php endif ; ?>
41- </td>
42- </tr>
43- <?php endforeach ; ?>
44- </tbody>
45- </table>
46- <?php else : ?>
47- <div class="message" style="width:20em;text-align: center;margin:0 auto">
48- <p><i class="fa fa-frown-o" style="font-size: 5em"></i></p>
49- <h3 style="font-size: 2em">没有找到任何插件</h3>
1+ <div class="col-mb-12 typecho-list">
2+ <h4 class="typecho-list-table-title">已安装的插件</h4>
3+ <div class="typecho-table-wrap">
4+ <?php if ($ result ): ?>
5+ <table class="typecho-list-table">
6+ <thead>
7+ <?php include 'row-title.php ' ; ?>
8+ </thead>
9+ <tbody>
10+ <?php foreach ($ result ->packages as $ plugin ):
11+ if ($ plugin ->existed ) {
12+ include 'row.php ' ;
13+ }
14+ endforeach ; ?>
15+ </tbody>
16+ </table>
17+ <?php else : ?>
18+ <div class="message" style="width:20em;text-align: center;margin:0 auto">
19+ <h3 style="font-size: 2em">没有找到任何插件</h3>
20+ </div>
21+ <?php endif ; ?>
5022 </div>
51- <?php endif ; ?>
23+ <h4 class="typecho-list-table-title">未安装的插件</h4>
24+ <div class="typecho-table-wrap">
25+ <?php if ($ result ): ?>
26+ <table class="typecho-list-table">
27+ <thead>
28+ <?php include 'row-title.php ' ; ?>
29+ </thead>
30+ <tbody>
31+ <?php foreach ($ result ->packages as $ plugin ):
32+ if (!$ plugin ->existed ) {
33+ include 'row.php ' ;
34+ }
35+ endforeach ; ?>
36+ </tbody>
37+ </table>
38+ <?php else : ?>
39+ <div class="message" style="width:20em;text-align: center;margin:0 auto">
40+ <h3 style="font-size: 2em">没有找到任何插件</h3>
41+ </div>
42+ <?php endif ; ?>
43+ </div>
44+ </div>
0 commit comments