OSDN Git Service

102aae1f1605fdab7310df0d97c8a31cfb7793f7
[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         if (!empty($site_configs['System.otherSetting']['value']) && $site_configs['System.otherSetting']['value'] == $this->data['Character']['system_id']) {
23                 echo $html->div(
24                         'link',
25                         $html->link(__('Change System', true), array(
26                                 'action' => 'change_system',
27                                 $this->data['Character']['id'],
28                         ))
29                 );
30         }
31
32  ?>
33 </td>
34 <td>
35 <?php 
36         echo $select->create_status_select($status, 'status', array(
37                 'label' => __('Status', true)
38         ));
39  ?>
40 </td>
41 <td>
42 <?php 
43         echo $select->create_publicflag_select($public_flags, 'public_flag', array(
44                 'label' => __('Public Flag', true),
45         ));
46  ?>
47 </td>
48 </tr>
49 </table>
50 </td>
51 <!-- キャラ画像 -->
52 <td style="text-align: center;" class="image160" rowspan="3">
53 <div id="CharacterMainPicture" class="image150">
54 <?php 
55         echo $this->element('character_picture_image', array(
56                 'basename' => $this->data['Character']['main_picture'],
57                 'options' => array(
58                         'class' => 'mainImage',
59                         'alt' => $this->data['Character']['name'],
60                 )
61         ));
62  ?>
63 </div>
64 </td>
65 </tr>
66 <!-- Characters -->
67 <tr>
68 <th class="profileName">
69 <?php
70         __('Charater Name');
71 ?>
72 </th>
73 <td class="CharacterBasicData">
74 <div id="CharacterName">
75 <?php 
76         echo $html->tag(
77                 'div',
78                 __(' required', true),
79                 array(
80                         'class' => 'required'
81                 )
82         );
83
84         echo $form->input('name', array(
85                         'type' => 'text',
86                         'label' => false,
87                         'class' => 'name character longInput',
88                 )
89         );
90 ?>
91 </div>
92 </td>
93 </tr>
94 <tr>
95 <th class="profileName">
96 <?php
97         __('Player Name');
98 ?>
99 </th>
100 <td class="CharacterBasicData">
101 <div id="UserName">
102 <?php 
103         echo $this->data['User']['name'];
104 ?>
105 </div>
106 </td>
107 </tr>
108
109 <!-- Profiles -->
110 <?php
111         // profile設定の表示
112         $profiles = $this->data['System']['Profile'];
113 ?>
114 <?php if (!empty($profiles)): ?>
115 <?php foreach($profiles as $key => $profile): ?>
116 <?php 
117         $profiledisp->set_profile_type4view($profile);
118  ?>
119 <tr>
120 <th class="profileName">
121 <?php 
122         echo $profile['name'];
123  ?>
124 </th>
125 <td colspan="3" class="CharacterProfileData edit<?php if ($profiledisp->profile_type['is_table']): ?> table<?php endif; ?>">
126 <div id="<?php echo $key; ?>">
127 <?php 
128         if (empty($profile['CharactersHasProfile'])) {
129                 if (CorePlus::get_profile_type($profile['profile_type']) == 's-table') {
130                         $form_num = count($profile['ProfileTable'][0]['ProfileTableStatic']);
131                 } else {
132                         $form_num = 4;
133                 }
134                 $disp_add_link = false;
135         } else {
136                 if (CorePlus::get_profile_type($profile['profile_type']) == 's-table') {
137                         $form_num = count($profile['ProfileTable'][0]['ProfileTableStatic']);
138                 } else {
139                         $form_num = 0;
140                 }
141                 $disp_add_link = true;
142         }
143         $disp_public = true;
144         if (!empty($profile['all_public'])) {
145                 $disp_public = false;
146         }
147         $profiledisp->disp_forms4profile_type(
148                 $profile, 
149                 $form_num, 
150                 0, 
151                 $disp_add_link, 
152                 $this->data['Character']['id'], 
153                 $disp_public,
154                 array(),
155                 true
156         );
157  ?>
158 </div>
159 </td>
160 </tr>
161 <?php endforeach; ?>
162 <?php endif; ?>
163
164 <!-- Notes -->
165 <tr>
166 <th class="profileName">
167         <?php __('Notes'); ?>
168 </th>
169 <td colspan="3" class="CharacterProfileData">
170 <div id="Notes">
171 <?php 
172         echo $form->input('notes', array(
173                         'label' => false,
174                 )
175         );
176  ?>
177 </div>
178 </td>
179 </tr>
180 <tr>
181 <th class="profileName">
182         <?php __('Secret Notes'); ?>
183 </th>
184 <td colspan="3" class="CharacterProfileData">
185 <div id="Secret Notes">
186 <?php 
187         echo $form->input('secret_notes', array(
188                 'label' => __('Secret Notes', true),
189                         'after' => $html->tag(
190                                 'div',
191                                 __('Show only myself', true),
192                                 array('class' => 'required')
193                         )
194         ));
195  ?>
196 </div>
197 </td>
198 </tr>
199
200 <!-- Archive -->
201 <tr>
202 <th class="profileName">
203         <?php __('Archives'); ?>
204 </th>
205 <td colspan="3">
206 <div id="SaveArchive">
207 <?php 
208         echo $form->input('archive', array(
209                         'type' => 'checkbox',
210                         'label' => __('Save the Profile Archive', true),
211                         'value' => 1,
212                 )
213         );
214
215         echo $form->input('CharacterProfileArchive.title');
216         echo $form->input('CharacterProfileArchive.memo');
217
218         if ($this->data['Character']['public_flag'] == 1) {
219                 echo $select->create_publicflag_select($public_flags, 'CharacterProfileArchive.public_flag', array(
220                         'label' => __('Public Flag', true),
221                 ));
222         }
223  ?>
224 </div>
225 </td>
226 </tr>
227 </tbody>
228 </table>
229 </p>
230
231 <?php
232         echo $token->create();
233         echo $form->end(array('label' => __('Submit', true)));
234 ?>
235 </p>
236 </div>
237
238 <div class="backButton">
239 <?php
240 echo $form->create('', array('url' => array(
241         'action' => 'view', $this->data['Character']['id']),
242         'type' => 'GET',
243         'id' => 'CancelButton'
244 ));
245 echo $form->end(array('label' => __('Cancel', true)));
246 ?>
247 </div>
248
249 <div>
250 <?php
251 echo $form->create('', array(
252         'url' => array(
253                 'action' => 'delete',
254         ),
255         'type' => 'GET',
256         'id' => 'CancelButton'
257 ));
258 ?>
259 <ul>
260 <li>
261 <?php
262         echo $form->end(__('Delete Character', true));
263 ?>
264 </li>
265 </ul>
266 </div>