PageRenderTime 55ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/baser/plugins/feed/views/feed_details/admin/form.php

https://github.com/hashing/basercms
PHP | 110 lines | 84 code | 8 blank | 18 comment | 8 complexity | 65ec8a6a9f2a1018950b2f59cd1fe1c8 MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /* SVN FILE: $Id$ */
  3. /**
  4. * [ADMIN] フィード詳細 フォーム
  5. *
  6. * PHP versions 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.plugins.feed.views
  14. * @since baserCMS v 0.1.0
  15. * @version $Revision$
  16. * @modifiedby $LastChangedBy$
  17. * @lastmodified $Date$
  18. * @license http://basercms.net/license/index.html
  19. */
  20. ?>
  21. <script type="text/javascript">
  22. $(window).load(function() {
  23. $("#FeedDetailName").focus();
  24. });
  25. </script>
  26. <div class="section">
  27. <h2>基本項目</h2>
  28. <?php if($this->action == 'admin_add'): ?>
  29. <?php echo $bcForm->create('FeedDetail', array('url' => array('controller' => 'feed_details', 'action' => 'add', $bcForm->value('FeedDetail.feed_config_id')))) ?>
  30. <?php elseif($this->action == 'admin_edit'): ?>
  31. <?php echo $bcForm->create('FeedDetail', array('url' => array('controller' => 'feed_details', 'action' => 'edit', $bcForm->value('FeedDetail.feed_config_id'), $bcForm->value('FeedDetail.id'), 'id' => false))) ?>
  32. <?php endif; ?>
  33. <?php echo $bcForm->input('FeedDetail.feed_config_id', array('type' => 'hidden')) ?>
  34. <table cellpadding="0" cellspacing="0" id="FormTable" class="form-table">
  35. <?php if($this->action == 'admin_edit'): ?>
  36. <tr>
  37. <th class="col-head"><?php echo $bcForm->label('FeedDetail.id', 'ID') ?>&nbsp;<span class="required">*</span></th>
  38. <td class="col-input">
  39. <?php echo $bcForm->value('FeedDetail.id') ?>
  40. <?php echo $bcForm->input('FeedDetail.id', array('type' => 'hidden')) ?>
  41. </td>
  42. </tr>
  43. <?php endif; ?>
  44. <tr>
  45. <th class="col-head"><?php echo $bcForm->label('FeedDetail.name', 'フィード詳細名') ?>&nbsp;<span class="required">*</span></th>
  46. <td class="col-input">
  47. <?php echo $bcForm->input('FeedDetail.name', array('type' => 'text', 'size'=>40,'maxlength'=>255)) ?>
  48. <?php echo $bcForm->error('FeedDetail.name') ?>
  49. </td>
  50. </tr>
  51. <tr>
  52. <th class="col-head"><?php echo $bcForm->label('FeedDetail.url', 'フィードURL') ?>&nbsp;<span class="required">*</span></th>
  53. <td class="col-input">
  54. <?php echo $bcForm->input('FeedDetail.url', array('type' => 'text', 'size' => 40, 'maxlength' => 255)) ?>
  55. <?php echo $bcForm->error('FeedDetail.url') ?>
  56. </td>
  57. </tr>
  58. </table>
  59. </div>
  60. <div class="section">
  61. <h2 class="btn-slide-form"><a href="javascript:void(0)" id="FormOption">オプション</a></h2>
  62. <table cellpadding="0" cellspacing="0" class="form-table slide-body" id="FormOptionBody">
  63. <tr>
  64. <th class="col-head"><?php echo $bcForm->label('FeedDetail.cache_time', 'キャッシュ時間') ?></th>
  65. <td class="col-input">
  66. <?php echo $bcForm->input('FeedDetail.cache_time', array(
  67. 'type' => 'select',
  68. 'options' => $bcForm->getControlSource('cache_time'),
  69. 'empty' => 'なし')) ?>
  70. <?php echo $html->image('admin/icn_help.png', array('id' => 'helpCacheTime', 'class' => 'btn help', 'alt' => 'ヘルプ')) ?>
  71. <?php echo $bcForm->error('FeedDetail.cache_time') ?>
  72. <div id="helptextCacheTime" class="helptext"> 負荷を軽減させる為フィード情報をキャッシュさせる時間を選択してください</div>
  73. </td>
  74. <tr>
  75. <th class="col-head"><?php echo $bcForm->label('FeedDetail.category_filter', 'カテゴリフィルター') ?></th>
  76. <td class="col-input">
  77. <?php echo $bcForm->input('FeedDetail.category_filter', array('type' => 'text', 'size' => 40, 'maxlength' => 255)) ?>
  78. <?php echo $html->image('admin/icn_help.png', array('id' => 'helpCategoryFilter', 'class' => 'btn help', 'alt' => 'ヘルプ')) ?>
  79. <?php echo $bcForm->error('FeedDetail.category_filter') ?>
  80. <div id="helptextCategoryFilter" class="helptext">
  81. <ul>
  82. <li>特定のカテゴリのみ絞込みたい場合はカテゴリ名を入力してください</li>
  83. <li>複数のカテゴリを指定する場合はカテゴリ名を|半角縦棒で区切ります</li>
  84. </ul>
  85. </div>
  86. </td>
  87. </tr>
  88. </table>
  89. </div>
  90. <!-- button -->
  91. <div class="submit">
  92. <?php if($this->action == 'admin_add'): ?>
  93. <?php echo $bcForm->submit('登録', array('div' => false, 'class' => 'btn-red button')) ?>
  94. <?php elseif ($this->action == 'admin_edit'): ?>
  95. <?php echo $bcForm->submit('更新', array('div' => false, 'class' => 'btn-orange button')) ?>
  96. <?php $bcBaser->link('削除',
  97. array('action' => 'delete', $bcForm->value('FeedConfig.id'), $bcForm->value('FeedDetail.id')),
  98. array('class' => 'btn-gray button'),
  99. sprintf('%s を本当に削除してもいいですか?', $bcForm->value('FeedConfig.name')),false); ?>
  100. <?php endif ?>
  101. </div>
  102. <?php echo $bcForm->end() ?>