themes.php 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. include 'common.php';
  3. include 'header.php';
  4. include 'menu.php';
  5. ?>
  6. <div class="main">
  7. <div class="body container">
  8. <?php include 'page-title.php'; ?>
  9. <div class="row typecho-page-main" role="main">
  10. <div class="col-mb-12">
  11. <ul class="typecho-option-tabs fix-tabs clearfix">
  12. <li class="current"><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a>
  13. </li>
  14. <?php if (\Widget\Themes\Files::isWriteable()): ?>
  15. <li><a href="<?php $options->adminUrl('theme-editor.php'); ?>"><?php _e('编辑当前外观'); ?></a></li>
  16. <?php endif; ?>
  17. <?php if (\Widget\Themes\Config::isExists()): ?>
  18. <li><a href="<?php $options->adminUrl('options-theme.php'); ?>"><?php _e('设置外观'); ?></a></li>
  19. <?php endif; ?>
  20. </ul>
  21. <div class="typecho-table-wrap">
  22. <table class="typecho-list-table typecho-theme-list">
  23. <colgroup>
  24. <col width="35%"/>
  25. <col/>
  26. </colgroup>
  27. <thead>
  28. <th><?php _e('截图'); ?></th>
  29. <th><?php _e('详情'); ?></th>
  30. </thead>
  31. <tbody>
  32. <?php if ($options->missingTheme): ?>
  33. <tr id="theme-<?php $options->missingTheme; ?>" class="current">
  34. <td colspan="2" class="warning">
  35. <p><strong><?php _e('检测到您之前使用的 "%s" 外观文件不存在,您可以重新上传此外观或者启用其他外观。', $options->missingTheme); ?></strong></p>
  36. <ul>
  37. <li><?php _e('重新上传此外观后刷新当前页面,此提示将会消失。'); ?></li>
  38. <li><?php _e('启用新外观后,当前外观的设置数据将被删除。'); ?></li>
  39. </ul>
  40. </td>
  41. </tr>
  42. <?php endif; ?>
  43. <?php \Widget\Themes\Rows::alloc()->to($themes); ?>
  44. <?php while ($themes->next()): ?>
  45. <tr id="theme-<?php $themes->name(); ?>"
  46. class="<?php if ($themes->activated && !$options->missingTheme): ?>current<?php endif; ?>">
  47. <td valign="top"><img src="<?php $themes->screen(); ?>"
  48. alt="<?php $themes->name(); ?>"/></td>
  49. <td valign="top">
  50. <h3><?php '' != $themes->title ? $themes->title() : $themes->name(); ?></h3>
  51. <cite>
  52. <?php if ($themes->author): ?><?php _e('作者'); ?>: <?php if ($themes->homepage): ?><a href="<?php $themes->homepage() ?>"><?php endif; ?><?php $themes->author(); ?><?php if ($themes->homepage): ?></a><?php endif; ?> &nbsp;&nbsp;<?php endif; ?>
  53. <?php if ($themes->version): ?><?php _e('版本'); ?>: <?php $themes->version() ?><?php endif; ?>
  54. </cite>
  55. <p><?php echo nl2br($themes->description); ?></p>
  56. <?php if ($options->theme != $themes->name || $options->missingTheme): ?>
  57. <p>
  58. <?php if (\Widget\Themes\Files::isWriteable()): ?>
  59. <a class="edit"
  60. href="<?php $options->adminUrl('theme-editor.php?theme=' . $themes->name); ?>"><?php _e('编辑'); ?></a> &nbsp;
  61. <?php endif; ?>
  62. <a class="activate"
  63. href="<?php $security->index('/action/themes-edit?change=' . $themes->name); ?>"><?php _e('启用'); ?></a>
  64. </p>
  65. <?php endif; ?>
  66. </td>
  67. </tr>
  68. <?php endwhile; ?>
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <?php
  77. include 'copyright.php';
  78. include 'common-js.php';
  79. include 'footer.php';
  80. ?>