-<div class="characters form">
+<div class="characters form edit">
+<h3><?php echo sprintf(__('Edit %s', true), $this->data['Character']['name']); ?></h3>
+
<?php echo $form->create('Character');?>
- <fieldset>
- <legend><?php __('Edit Character');?></legend>
- <?php
- echo $form->input('id');
- echo $form->input('system_id');
- echo $form->input('user_id');
- echo $form->input('name');
- echo $form->input('image_filename');
- echo $form->input('notes');
- echo $form->input('public_flag');
- echo $form->input('status_2');
- echo $form->input('sort_order');
- echo $form->input('deleted');
- echo $form->input('deleted_date');
- ?>
- </fieldset>
-<?php echo $form->end('Submit');?>
+<table class="CharacterSheet">
+<tbody>
+<!-- Header -->
+<tr id="CharacterStatusRow">
+<td colspan="2" class="SystemRow">
+<!-- System -->
+<table class="System">
+<tbody>
+<tr>
+<td>
+<label><?php __('System') ?></label>
+<?php
+ echo $html->div(
+ 'SystemName',
+ $this->data['System']['name']
+ );
+
+ if (!empty($site_configs['System.otherSetting']['value']) && $site_configs['System.otherSetting']['value'] == $this->data['Character']['system_id']) {
+ echo $html->div(
+ 'link',
+ $html->link(__('Change System', true), array(
+ 'action' => 'change_system',
+ $this->data['Character']['id'],
+ ))
+ );
+ }
+
+ ?>
+</td>
+<td>
+<?php
+ echo $select->create_status_select($status, 'status', array(
+ 'label' => __('Status', true)
+ ));
+ ?>
+</td>
+<td>
+<?php
+ echo $select->create_publicflag_select($public_flags, 'public_flag', array(
+ 'label' => __('Public Flag', true),
+ ));
+ ?>
+</td>
+</tr>
+</table>
+</td>
+<!-- キャラ画像 -->
+<td style="text-align: center;" class="image160" rowspan="3">
+<div id="CharacterMainPicture" class="image150">
+<?php
+ echo $this->element('character_picture_image', array(
+ 'basename' => $this->data['Character']['main_picture'],
+ 'options' => array(
+ 'class' => 'mainImage',
+ 'alt' => $this->data['Character']['name'],
+ )
+ ));
+ ?>
</div>
+</td>
+</tr>
+<!-- Characters -->
+<tr>
+<th class="profileName">
+<?php
+ __('Charater Name');
+?>
+</th>
+<td class="CharacterBasicData">
+<div id="CharacterName">
+<?php
+ echo $html->tag(
+ 'div',
+ __(' required', true),
+ array(
+ 'class' => 'required'
+ )
+ );
+
+ echo $form->input('name', array(
+ 'type' => 'text',
+ 'label' => false,
+ 'class' => 'name character longInput',
+ )
+ );
+?>
+</div>
+</td>
+</tr>
+<tr>
+<th class="profileName">
+<?php
+ __('Player Name');
+?>
+</th>
+<td class="CharacterBasicData">
+<div id="UserName">
+<?php
+ echo $this->data['User']['name'];
+?>
+</div>
+</td>
+</tr>
+
+<!-- Profiles -->
+<?php
+ // profile設定の表示
+ $profiles = $this->data['System']['Profile'];
+?>
+<?php if (!empty($profiles)): ?>
+<?php foreach($profiles as $key => $profile): ?>
+<?php
+ $profiledisp->set_profile_type4view($profile);
+ ?>
+<tr>
+<th class="profileName">
+<?php
+ echo $profile['name'];
+ ?>
+</th>
+<td colspan="3" class="CharacterProfileData edit<?php if ($profiledisp->profile_type['is_table']): ?> table<?php endif; ?>">
+<div id="<?php echo $key; ?>">
+<?php
+ if (empty($profile['CharactersHasProfile'])) {
+ if ($profile['profile_type'] == 's-table') {
+ $form_num = count($profile['ProfileTable'][0]['ProfileTableStatic']);
+ } else {
+ $form_num = 4;
+ }
+ $disp_add_link = false;
+ } else {
+ if ($profile['profile_type'] == 's-table') {
+ $form_num = count($profile['ProfileTable'][0]['ProfileTableStatic']);
+ } else {
+ $form_num = 0;
+ }
+ $disp_add_link = true;
+ }
+ $profiledisp->disp_forms4profile_type(
+ $profile,
+ $form_num,
+ 0,
+ $disp_add_link,
+ $this->data['Character']['id'],
+ true,
+ array(),
+ true
+ );
+ ?>
+</div>
+</td>
+</tr>
+<?php endforeach; ?>
+<?php endif; ?>
+
+<!-- Notes -->
+<tr>
+<th class="profileName">
+ <?php __('Notes'); ?>
+</th>
+<td colspan="3" class="CharacterProfileData">
+<div id="Notes">
+<?php
+ echo $form->input('notes', array(
+ 'label' => false,
+ )
+ );
+ ?>
+</div>
+</td>
+</tr>
+<tr>
+<th class="profileName">
+ <?php __('Secret Notes'); ?>
+</th>
+<td colspan="3" class="CharacterProfileData">
+<div id="Secret Notes">
+<?php
+ echo $form->input('secret_notes', array(
+ 'label' => __('Secret Notes', true),
+ 'after' => $html->tag(
+ 'div',
+ __('Show only myself', true),
+ array('class' => 'required')
+ )
+ ));
+ ?>
+</div>
+</td>
+</tr>
+
+<!-- Archive -->
+<tr>
+<th class="profileName">
+ <?php __('Archives'); ?>
+</th>
+<td colspan="3">
+<div id="SaveArchive">
+<?php
+ echo $form->input('archive', array(
+ 'type' => 'checkbox',
+ 'label' => __('Save the Profile Archive', true),
+ 'value' => 1,
+ )
+ );
+
+ echo $form->input('CharacterProfileArchive.title');
+ echo $form->input('CharacterProfileArchive.memo');
+
+ if ($this->data['Character']['public_flag'] == 'public') {
+ echo $select->create_publicflag_select($public_flags, 'CharacterProfileArchive.public_flag', array(
+ 'label' => __('Public Flag', true),
+ ));
+ }
+ ?>
+</div>
+</td>
+</tr>
+</tbody>
+</table>
+</p>
+
+<?php
+ echo $token->create();
+ echo $form->end(array('label' => __('Submit', true)));
+?>
+</p>
+</div>
+
+<div class="backButton">
+<?php
+echo $form->create('', array('url' => array(
+ 'action' => 'view', $this->data['Character']['id']),
+ 'type' => 'GET',
+ 'id' => 'CancelButton'
+));
+echo $form->end(array('label' => __('Cancel', true)));
+?>
+</div>
+
<div class="actions">
- <ul>
- <li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('Character.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Character.id'))); ?></li>
- <li><?php echo $html->link(__('List Characters', true), array('action' => 'index'));?></li>
- <li><?php echo $html->link(__('List Systems', true), array('controller' => 'systems', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New System', true), array('controller' => 'systems', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
- </ul>
+<?php
+echo $form->create('', array(
+ 'url' => array(
+ 'action' => 'delete',
+ ),
+ 'type' => 'GET',
+ 'id' => 'CancelButton'
+));
+?>
+<ul>
+<li>
+<?php
+ echo $form->end(__('Delete Character', true));
+?>
+</li>
+</ul>
</div>