'Html',
'Form',
'Javascript',
- 'Selectpublic',
+ 'Select',
'Token'
);
'label' => __('Status', true)
)
);
- echo $selectpublic->create_publicflag_select($public_flags, 'public_flag', array(
+ echo $select->create_publicflag_select($public_flags, 'public_flag', array(
'label' => __('Public Flag', true)
)
);
<?php echo $character['Character']['status']; ?>
</td>
<td>
- <?php echo $selectpublic->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
+ <?php echo $select->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
</td>
<td>
<?php echo $html->link($character['User']['name'], array('controller' => 'users', 'action' => 'view', $character['User']['id']), array(), false, false); ?>
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Public Flag'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $selectpublic->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
+ <?php echo $select->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('User'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
'label' => __('Status', true)
)
);
- echo $selectpublic->create_publicflag_select($public_flags, 'public_flag', array(
+ echo $select->create_publicflag_select($public_flags, 'public_flag', array(
'label' => __('Public Flag', true)
)
);
<td>
<?php echo $html->link('<img src="'.$character['Character']['image_filename'].'" alt="'.$character['Character']['name'].'">', array('action' => 'view', $character['Character']['id']), array(), false, false); ?><br>
<?php echo $html->link($character['Character']['name'], array('action' => 'view', $character['Character']['id'])); ?>
- <?php echo $selectpublic->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
+ <?php echo $select->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
</td>
<td>
<?php echo $character['Character']['sort_order']; ?>
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Public Flag'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $selectpublic->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
+ <?php echo $select->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('User'); ?></dt>
</div>
<div class="actions">
<ul>
+ <?php if ($editable): ?>
<li><?php echo $html->link(__('Edit Character', true), array('action' => 'edit', $character['Character']['id'])); ?> </li>
<li><?php echo $html->link(__('Delete Character', true), array('action' => 'delete', $character['Character']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $character['Character']['id'])); ?> </li>
+ <?php endif; ?>
<li><?php echo $html->link(__('List Characters', true), array('action' => 'index')); ?> </li>
<li><?php echo $html->link(__('New Character', true), array('action' => 'add')); ?> </li>
<li><?php echo $html->link(__('List Systems', true), array('controller' => 'systems', 'action' => 'index')); ?> </li>
<?php
-class SelectpublicHelper extends Helper {
+/*
+ * プルダウン表示用Helper
+ * i18n対応
+ */
+class SelectHelper extends Helper {
var $helpers = array('Form');
var $default_public_flags = array('public_flag', 'private');
/**
* public_flagの設定をview表示形式に変換
- * i18n対応
*
* @param string $public_flag, array $public_flags
* @return String
'selected' => true
)
);
- echo $selectpublic->create_publicflag_select($public_flags, 'public_flag', array(
+ echo $select->create_publicflag_select($public_flags, 'public_flag', array(
'label' => __('Public Flag', true),
'selected' => 'public',
)
'selected' => true
)
);
- echo $selectpublic->create_publicflag_select($public_flags, 'public_flag', array(
+ echo $select->create_publicflag_select($public_flags, 'public_flag', array(
'label' => __('Public Flag', true)
)
);
<?php endif; ?>
</td>
<td>
- <?php echo $selectpublic->get_i18n_public_flag($system['System']['public_flag'], $public_flags) ?>
+ <?php echo $select->get_i18n_public_flag($system['System']['public_flag'], $public_flags) ?>
</td>
<td>
<?php echo $system['System']['detail']; ?>
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Public'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $selectpublic->get_i18n_public_flag($system['System']['public_flag'], $public_flags) ?>
+ <?php echo $select->get_i18n_public_flag($system['System']['public_flag'], $public_flags) ?>
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Detail'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>