--- /dev/null
+<?php
+/*
+ * Link Plugin for TRPG Databank
+ *
+ * PHP version 5
+ *
+ * @copyright Copyright 2010, Cake. (http://trpgtools-onweb.sourceforge.jp/)
+ * @category Element
+ * @package plugin for TRPG Data Bank
+ * @version beta
+ * @author Cake <cake_67@users.sourceforge.jp>
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @link http://trpgtools-onweb.sourceforge.jp/
+ */
+
+echo $this->Html->css('/links/css/link.css');
+
+?>
+<script language="JavaScript">
+<!--
+ var thumbnailweb_jump = '<?php echo $thumbnail['options']['thumbnailweb_']['jump']; ?>';
+ var thumbnailweb_target = '<?php echo $thumbnail['options']['thumbnailweb_']['target']; ?>';
+ var thumbnailweb_lpos = '<?php echo $thumbnail['options']['thumbnailweb_']['lpos']; ?>';
+ var thumbnailweb_lposv = '<?php echo $thumbnail['options']['thumbnailweb_']['lposv']; ?>';
+
+//-->
+</script>
+<div class="links index">
+<?php
+$pagenator_options = array();
+$this->Paginator->options(array('url' => $this->passedArgs));
+
+?>
+<div class="box full">
+<?php
+echo $this->element('link_sort_header', array(
+ 'pagenator_options' => $pagenator_options,
+ 'isSimple' => false,
+));
+?>
+<div class="boxBody">
+
+<p>
+<?php
+echo $this->Paginator->counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?>
+</p>
+
+<div class="paging">
+ <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
+ | <?php echo $this->Paginator->numbers();?>
+ |
+ <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+
+<?php foreach ($links as $link): ?>
+<?php
+echo $this->element('link_view', array(
+ 'link' => $link,
+ 'isDelete' => false,
+ 'isAdmin' => $isAdmin,
+));
+?>
+<?php endforeach; ?>
+
+<div class="paging">
+ <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
+ | <?php echo $this->Paginator->numbers();?>
+ |
+ <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+
+<p>
+<?php
+ echo $this->Paginator->counter(array(
+ 'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+ ));
+?>
+</p>
+
+</div>
--- /dev/null
+<?php
+/*
+ * Link Plugin for TRPG Databank
+ *
+ * PHP version 5
+ *
+ * @copyright Copyright 2010, Cake. (http://trpgtools-onweb.sourceforge.jp/)
+ * @category Element
+ * @package plugin for TRPG Data Bank
+ * @version beta
+ * @author Cake <cake_67@users.sourceforge.jp>
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @link http://trpgtools-onweb.sourceforge.jp/
+ */
+
+echo $this->Html->css('/links/css/link.css');
+
+?>
+
+<div class="links listview">
+<?php
+$pagenator_options = array();
+$this->Paginator->options(array('url' => $this->passedArgs));
+
+?>
+<div class="box full">
+<?php
+echo $this->element('link_sort_header', array(
+ 'pagenator_options' => $pagenator_options,
+ 'isSimple' => true,
+));
+?>
+<div class="boxBody">
+
+<p>
+<?php
+echo $this->Paginator->counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?>
+</p>
+
+<div class="paging">
+ <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
+ | <?php echo $this->Paginator->numbers();?>
+ |
+ <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+
+<table cellpadding="0" cellspacing="0"<?php if ($isAdmin): ?> class="2rows"<?php endif ?>>
+<tr>
+ <th><?php echo $paginatorEx->sortAllow(__('Id', true), 'id', $pagenator_options);?></th>
+ <th>
+<?php
+ echo $paginatorEx->sortAllow(__('Title', true), 'title', $pagenator_options);
+ //echo $this->PaginatorEx->sortAllow('type');
+ //echo $this->PaginatorEx->sortAllow('pickup');
+ //echo $this->PaginatorEx->sortAllow('not_found');
+ ?>
+</th>
+ <th><?php echo $paginatorEx->sortAllow(__('URL', true), 'url', $pagenator_options);?></th>
+ <th><?php echo $paginatorEx->sortAllow(__('User Name', true), 'user_id', $pagenator_options);?></th>
+ <th><?php echo $this->PaginatorEx->sortAllow('modified');?></th>
+</tr>
+<?php
+$i = 0;
+foreach ($links as $link):
+ $class = null;
+ if ($i++ % 2 == 0) {
+ $class = ' class="altrow"';
+ }
+?>
+<tr<?php echo $class;?>>
+ <td<?php if ($isAdmin): ?> rowspan="2"<?php endif ?>><?php echo $link['Link']['id']; ?> </td>
+ <td>
+<?php
+ echo $this->Html->link($link['Link']['title'], array('action' => 'view', $link['Link']['id']));
+ //echo $link['Link']['type'];
+ //echo $link['Link']['pickup'];
+ //echo $link['Link']['not_found'];
+?>
+ </td>
+ <td><?php echo $link['Link']['url']; ?> </td>
+ <td><?php echo $link['User']['name']; ?> </td>
+ <td><?php echo $link['Link']['modified']; ?> </td>
+</tr>
+<?php if ($isAdmin): ?>
+<tr>
+<td class="notes"<?php if ($isAdmin): ?> colspan="5"<?php endif; ?>>
+ <div><?php echo $link['Link']['notes']; ?></div>
+</td>
+</tr>
+<?php endif; ?>
+<?php endforeach; ?>
+</table>
+</div>
+
+<div class="paging">
+ <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
+ | <?php echo $this->Paginator->numbers();?>
+ |
+ <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
+</div>
+
+<p>
+<?php
+ echo $this->Paginator->counter(array(
+ 'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+ ));
+?>
+</p>
+
+</div>
--- /dev/null
+<?php
+/*
+ * Link Plugin for TRPG Databank
+ *
+ * PHP version 5
+ *
+ * @copyright Copyright 2010, Cake. (http://trpgtools-onweb.sourceforge.jp/)
+ * @category Element
+ * @package plugin for TRPG Data Bank
+ * @version beta
+ * @author Cake <cake_67@users.sourceforge.jp>
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @link http://trpgtools-onweb.sourceforge.jp/
+ */
+
+$header = __('Links', true);
+
+$header .= $this->Html->tag('span',
+ '['.$this->Html->link(__('Add Link', true), array(
+ 'action' => 'add'
+ ), array(
+ 'class' => 'edit'
+ )).']'
+);
+
+if (!$isSimple) {
+ $header .= '<span class="linkSort">'. __('Sort', true). ' : ';
+ $header .= $this->PaginatorEx->sortAllow(__('Title', true), 'title', $pagenator_options);
+ $header .= $this->PaginatorEx->sortAllow(__('Owner', true), 'user_id', $pagenator_options);
+ $header .= $this->PaginatorEx->sortAllow(__('Modified', true), 'modified', $pagenator_options);
+$header .= '</span>';
+}
+?>
+<div class="boxHeader"><h2><span><?php echo $header; ?></h2></span></div>
* @link http://trpgtools-onweb.sourceforge.jp/
*/
-echo $this->element('link_index', array(
+echo $this->element('link_simplelist', array(
'links' => $links,
'isAdmin' => true,
));
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @link http://trpgtools-onweb.sourceforge.jp/
*/
+echo $this->Html->css('/links/css/link.css');
+
?>
+<script language="JavaScript">
+<!--
+ var thumbnailweb_jump = '<?php echo $thumbnail['options']['thumbnailweb_']['jump']; ?>';
+ var thumbnailweb_target = '<?php echo $thumbnail['options']['thumbnailweb_']['target']; ?>';
+ var thumbnailweb_lpos = '<?php echo $thumbnail['options']['thumbnailweb_']['lpos']; ?>';
+ var thumbnailweb_lposv = '<?php echo $thumbnail['options']['thumbnailweb_']['lposv']; ?>';
+
+//-->
+</script>
<div class="links view">
-<h2><?php __('Link');?></h2>
- <dl><?php $i = 0; $class = ' class="altrow"';?>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['id']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Title'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['title']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('User'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $this->Html->link($link['User']['name'], array('controller' => 'users', 'action' => 'view', $link['User']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Url'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['url']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Type'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['type']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Pickup'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['pickup']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Not Found'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['not_found']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['modified']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $link['Link']['created']; ?>
-
- </dd>
- </dl>
+<?php
+echo $this->element('link_view', array(
+ 'link' => $link,
+ 'isDelete' => false,
+ 'isAdmin' => $isAdmin,
+));
+?>
+
+<div class="backButton">
+<?php
+ echo $form->create('', array('url' => array(
+ 'action' => 'index'),
+ 'type' => 'GET',
+ 'id' => 'BacgButton'
+ ));
+ echo $form->end(array('label' => __('Lists', true)));
+?>
</div>
-<div class="actions">
- <h3><?php __('Actions'); ?></h3>
- <ul>
- <li><?php echo $this->Html->link(__('Edit Link', true), array('action' => 'edit', $link['Link']['id'])); ?> </li>
- <li><?php echo $this->Html->link(__('Delete Link', true), array('action' => 'delete', $link['Link']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $link['Link']['id'])); ?> </li>
- <li><?php echo $this->Html->link(__('List Links', true), array('action' => 'index')); ?> </li>
- <li><?php echo $this->Html->link(__('New Link', true), array('action' => 'add')); ?> </li>
- <li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
- <li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
- </ul>
+
</div>
* @link http://trpgtools-onweb.sourceforge.jp/
*/
-echo $this->element('link_index', array(
+echo $this->element('link_listview', array(
'links' => $links,
'isAdmin' => false,
));
clear: both;
padding-top: 7px;
}
+
+#Links_admin_listview table th {
+ white-space: nowrap;
+}