OSDN Git Service

Merge branch 'master' of cake_67@git.sourceforge.jp:/gitroot/trpgtools-onweb/cake...
[trpgtools-onweb/cake-frame.git] / app / views / characters / edit.ctp
1 <div class="characters form edit">
2 <h3><?php echo sprintf(__('Edit %s', true), $this->data['Character']['name']); ?></h3>
3
4 <?php echo $form->create('Character');?>
5 <table class="CharacterSheet">
6 <tbody>
7 <!-- Header -->
8 <tr id="CharacterStatusRow">
9 <td colspan="2" class="SystemRow">
10 <!-- System -->
11 <table class="System">
12 <tbody>
13 <tr>
14 <td>
15 <label><?php __('System') ?></label>
16 <?php
17         echo $html->div(
18                 'SystemName',
19                 $this->data['System']['name']
20         );
21  ?>
22 </td>
23 <td>
24 <?php 
25         echo $select->create_status_select($status, 'status', array(
26                 'label' => __('Status', true)
27         ));
28  ?>
29 </td>
30 <td>
31 <?php 
32         echo $select->create_publicflag_select($public_flags, 'public_flag', array(
33                 'label' => __('Public Flag', true),
34         ));
35  ?>
36 </td>
37 </tr>
38 </table>
39 </td>
40 <!-- キャラ画像 -->
41 <td style="text-align: center;" class="image160" rowspan="3">
42 <div id="CharacterMainPicture" class="image150">
43 <?php 
44         echo $this->element('character_picture_image', array(
45                 'basename' => $this->data['Character']['main_picture'],
46                 'options' => array(
47                         'class' => 'mainImage',
48                         'alt' => $this->data['Character']['name'],
49                 )
50         ));
51  ?>
52 </div>
53 </td>
54 </tr>
55 <!-- Characters -->
56 <tr>
57 <th class="profileName">
58 <?php
59         __('Charater Name');
60 ?>
61 </th>
62 <td class="CharacterBasicData">
63 <div id="CharacterName">
64 <?php 
65         echo $html->tag(
66                 'div',
67                 __(' required', true),
68                 array(
69                         'class' => 'required'
70                 )
71         );
72
73         echo $form->input('name', array(
74                         'type' => 'text',
75                         'label' => false,
76                         'class' => 'name character',
77                 )
78         );
79 ?>
80 </div>
81 </td>
82 </tr>
83 <tr>
84 <th class="profileName">
85 <?php
86         __('Player Name');
87 ?>
88 </th>
89 <td class="CharacterBasicData">
90 <div id="UserName">
91 <?php 
92         echo $this->data['User']['name'];
93 ?>
94 </div>
95 </td>
96 </tr>
97
98 <!-- Profiles -->
99 <?php
100         // profile設定の表示
101         $profiles = $this->data['System']['Profile'];
102 ?>
103 <?php if (!empty($profiles)): ?>
104 <?php foreach($profiles as $key => $profile): ?>
105 <?php 
106         $profiledisp->set_profile_type4view($profile);
107  ?>
108 <tr>
109 <th class="profileName">
110 <?php 
111         echo $profile['name'];
112  ?>
113 </th>
114 <td colspan="3" class="CharacterProfileData edit<?php if ($profiledisp->profile_type['is_table']): ?> table<?php endif; ?>">
115 <div id="<?php echo $key; ?>">
116 <?php 
117         if (empty($profile['CharactersHasProfile'])) {
118                 if ($profile['profile_type'] == 's-table') {
119                         $form_num = count($profile['ProfileTable'][0]['ProfileTableStatic']);
120                 } else {
121                         $form_num = 4;
122                 }
123                 $disp_add_link = false;
124         } else {
125                 if ($profile['profile_type'] == 's-table') {
126                         $form_num = count($profile['ProfileTable'][0]['ProfileTableStatic']);
127                 } else {
128                         $form_num = 0;
129                 }
130                 $disp_add_link = true;
131         }
132         $profiledisp->disp_forms4profile_type($profile, $form_num, 0, $disp_add_link, $this->data['Character']['id'], true);
133  ?>
134 </div>
135 </td>
136 </tr>
137 <?php endforeach; ?>
138 <?php endif; ?>
139
140 <!-- Notes -->
141 <tr>
142 <th class="profileName">
143         <?php __('Notes'); ?>
144 </th>
145 <td colspan="3" class="CharacterProfileData">
146 <div id="Notes">
147 <?php 
148         echo $form->input('notes', array(
149                         'label' => false,
150                 )
151         );
152  ?>
153 </div>
154 </td>
155 </tr>
156
157 <!-- Archive -->
158 <tr>
159 <th class="profileName">
160         <?php __('Archives'); ?>
161 </th>
162 <td colspan="3">
163 <div id="SaveArchive">
164 <?php 
165         echo $form->input('archive', array(
166                         'type' => 'checkbox',
167                         'label' => __('Save the Profile Archive', true),
168                         'value' => 1,
169                 )
170         );
171
172         echo $form->input('CharacterProfileArchive.title');
173         echo $form->input('CharacterProfileArchive.memo');
174
175         if ($this->data['Character']['public_flag'] == 'public') {
176                 echo $select->create_publicflag_select($public_flags, 'CharacterProfileArchive.public_flag', array(
177                         'label' => __('Public Flag', true),
178                 ));
179         }
180  ?>
181 </div>
182 </td>
183 </tr>
184 </tbody>
185 </table>
186 </p>
187
188 <?php
189         echo $token->create();
190         echo $form->end(array('label' => __('Submit', true)));
191 ?>
192 </p>
193 </div>
194
195 <div class="backButton">
196 <?php
197 echo $form->create('', array('url' => array(
198         'action' => 'view', $this->data['Character']['id']),
199         'type' => 'GET',
200         'id' => 'CancelButton'
201 ));
202 echo $form->end(array('label' => __('Cancel', true)));
203 ?>
204 </div>
205
206 <div class="actions">
207 <fieldset>
208 <legend><?php __('Delete Character');?></legend>
209 <?php
210 echo $form->create('', array(
211         'url' => array(
212                 'action' => 'delete',
213         ),
214         'type' => 'GET',
215         'id' => 'CancelButton'
216 ));
217 ?>
218 <ul>
219 <li>
220 <?php
221         echo $form->end(__('Delete', true));
222 ?>
223 </li>
224 </ul>
225 </fieldset>
226 </div>