PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/baser/views/elements/admin/pages/index_list.php

https://github.com/hashing/basercms
PHP | 87 lines | 64 code | 5 blank | 18 comment | 5 complexity | e294155450d3cede5ce812ab92beb817 MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /* SVN FILE: $Id$ */
  3. /**
  4. * [ADMIN] Ajaxページ一覧
  5. *
  6. * PHP versions 4 and 5
  7. *
  8. * baserCMS : Based Website Development Project <http://basercms.net>
  9. * Copyright 2008 - 2012, baserCMS Users Community <http://sites.google.com/site/baserusers/>
  10. *
  11. * @copyright Copyright 2008 - 2012, baserCMS Users Community
  12. * @link http://basercms.net baserCMS Project
  13. * @package baser.views
  14. * @since baserCMS v 2.0.0
  15. * @version $Revision$
  16. * @modifiedby $LastChangedBy$
  17. * @lastmodified $Date$
  18. * @license http://basercms.net/license/index.html
  19. */
  20. ?>
  21. <!-- pagination -->
  22. <?php $bcBaser->element('pagination') ?>
  23. <!-- ListTable -->
  24. <table cellpadding="0" cellspacing="0" class="list-table sort-table" id="ListTable">
  25. <thead>
  26. <tr>
  27. <th class="list-tool">
  28. <div>
  29. <?php if($newCatAddable): ?>
  30. <?php $bcBaser->link($bcBaser->getImg('admin/btn_add.png', array('width' => 69, 'height' => 18, 'alt' => '新規追加', 'class' => 'btn')), array('action' => 'add')) ?>
  31. <?php endif ?>
  32. <?php if(!$sortmode): ?>
  33. <?php $bcBaser->link($bcBaser->getImg('admin/btn_sort.png', array('width' => 65, 'height' => 14, 'alt' => '並び替え', 'class' => 'btn')), array('sortmode' => 1)) ?>
  34. <?php else: ?>
  35. <?php $bcBaser->link($bcBaser->getImg('admin/btn_normal.png', array('width' => 65, 'height' => 14, 'alt' => 'ノーマル', 'class' => 'btn')), array('sortmode' => 0)) ?>
  36. <?php endif ?>
  37. </div>
  38. <?php if($bcBaser->isAdminUser()): ?>
  39. <div>
  40. <?php echo $bcForm->checkbox('ListTool.checkall') ?>
  41. <?php echo $bcForm->input('ListTool.batch', array('type' => 'select', 'options' => array('publish' => '公開', 'unpublish' => '非公開', 'del' => '削除'), 'empty' => '一括処理')) ?>
  42. <?php echo $bcForm->button('適用', array('id' => 'BtnApplyBatch', 'disabled' => 'disabled')) ?>
  43. </div>
  44. <?php endif ?>
  45. </th>
  46. <?php if(!$sortmode): ?>
  47. <th><?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' NO', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' NO'), 'id', array('escape' => false, 'class' => 'btn-direction')) ?></th>
  48. <th><?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' カテゴリー', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' カテゴリー'), 'page_category_id', array('escape' => false, 'class' => 'btn-direction')) ?></th>
  49. <th>
  50. <?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' ページ名', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' ページ名'), 'name', array('escape' => false, 'class' => 'btn-direction')) ?><br />
  51. <?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' タイトル', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' タイトル'), 'title', array('escape' => false, 'class' => 'btn-direction')) ?>
  52. </th>
  53. <th><?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' 公開状態', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' 公開状態'), 'status', array('escape' => false, 'class' => 'btn-direction')) ?></th>
  54. <th><?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' 作成者', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' 作成者'), 'author_id', array('escape' => false, 'class' => 'btn-direction')) ?></th>
  55. <th>
  56. <?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' 登録日', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' 登録日'), 'created', array('escape' => false, 'class' => 'btn-direction')) ?><br />
  57. <?php echo $paginator->sort(array('asc' => $bcBaser->getImg('admin/blt_list_down.png', array('alt' => '昇順', 'title' => '昇順')).' 更新日', 'desc' => $bcBaser->getImg('admin/blt_list_up.png', array('alt' => '降順', 'title' => '降順')).' 更新日'), 'modified', array('escape' => false, 'class' => 'btn-direction')) ?>
  58. </th>
  59. <?php else: ?>
  60. <th>NO</th>
  61. <th>カテゴリー</th>
  62. <th>ページ名<br />タイトル</th>
  63. <th>公開状態</th>
  64. <th>作成者</th>
  65. <th>登録日<br />更新日</th>
  66. <?php endif ?>
  67. </tr>
  68. </thead>
  69. <tbody>
  70. <?php if(!empty($datas)): ?>
  71. <?php foreach($datas as $key => $data): ?>
  72. <?php $bcBaser->element('pages/index_row', array('data' => $data, 'count' => ($key + 1))) ?>
  73. <?php endforeach; ?>
  74. <?php else: ?>
  75. <tr>
  76. <td colspan="7"><p class="no-data">データがありません</p></td>
  77. </tr>
  78. <?php endif; ?>
  79. </tbody>
  80. </table>
  81. <!-- list-num -->
  82. <?php $bcBaser->element('list_num') ?>