OSDN Git Service

Character編集画面にProfiles項目表示
authorCake <cake_67@users.sourceforge.jp>
Wed, 27 Jan 2010 08:59:36 +0000 (17:59 +0900)
committerCake <cake_67@users.sourceforge.jp>
Wed, 27 Jan 2010 08:59:36 +0000 (17:59 +0900)
app/controllers/characters_controller.php
app/views/characters/edit.ctp
app/views/helpers/profiledisp.php
app/webroot/css/base.css

index e5c98e5..0cf955a 100644 (file)
@@ -4,6 +4,7 @@ class CharactersController extends AppController {
        var $name = 'Characters';
        var $helpers = array(
                'Select',
+               'Profiledisp',
        );
 
        /* ACL */
index fff8d9f..58911d8 100644 (file)
@@ -5,16 +5,19 @@
 
 <table class="Character">
 <tbody>
+<!-- Header -->
 <tr>
 <td colspan="2" class="SystemRow">
+<!-- System -->
 <table class="System">
 <tbody>
 <tr>
 <td>
-<?php 
-       echo $form->input('system_id', array(
-                       'label' => __('System', true),
-               )
+<lavel><?php __('System') ?></label>
+<?php
+       echo $html->div(
+               'SystemName',
+               $this->data['System']['name']
        );
  ?>
 </td>
@@ -38,6 +41,7 @@
 </tr>
 </table>
 </td>
+<!-- キャラ画像 -->
 <td class="image" rowspan="4">
 <div class="imagefile">
 <?php if ($this->data['Character']['image_filename']): ?>
@@ -59,7 +63,7 @@
 </div>
 </td>
 </tr>
-
+<!-- Characters -->
 <tr>
 <th class="CharacterName">
 <?php
  ?>
 </td>
 </tr>
+
+<!-- Profiles -->
+<?php foreach($this->data['System']['Profile'] as $profile): ?>
+<?php 
+       $profiledisp->set_profile_type4view($profile);
+ ?>
+<tr>
+<th>
+       <?php echo $profile['name']; ?>
+</th>
+<td colspan="3"<?php if ($profiledisp->profile_type['is_table']): ?> class="table"<?php endif; ?>>
+<?php 
+       $profiledisp->disp_forms4profile_type($profile, false, 0);
+ ?>
+</td>
+</tr>
+<?php endforeach; ?>
+
+<!-- Notes -->
 <tr>
 <th>
        <?php __('Notes'); ?>
index 01167a0..86196c6 100644 (file)
@@ -123,7 +123,7 @@ class ProfiledispHelper extends Helper {
                        $option
                );
 
-               echo $this->Form->input($profile_selects[0]['profile_id'].'.ProfileSelect.profile_type', $option);
+               echo $this->Form->input('ProfileSelect.'.$profile_selects[0]['profile_id'].'.profile_type', $option);
        }
 
        /* profile_selectsの設定をラジオボタンで出力 */
index 818c5aa..69609fd 100644 (file)
@@ -474,6 +474,12 @@ td.table {
 td.table table {
        padding: 0;
        margin: 0;
+       border-bottom: 0 none;
+}
+td.table th,
+td.table td
+ {
+       border-top: 0 none;
 }
 .blank {
        min-height: 1em;