OSDN Git Service

添付ファイルがない場合の処理
[trpgtools-onweb/cake-frame.git] / app / views / systems / admin_view.ctp
1 <div class="systems view">
2 <h2><?php echo $system['System']['name']; ?></h2>
3
4 <p>
5 <table>
6 <tbody>
7 <tr>
8 <th>
9         <?php __('Image'); ?>
10 </th>
11 <td colspan="3" class="photo">
12 <?php
13         $url = null;
14         if ($system['System']['url']) {
15                 $url = $system['System']['url'];
16         }
17
18         $file = $upfile->file(
19                 'filter/s', 
20                 CorePlus::get_value($system, 'Attachment.0'),
21                 array(
22                         'model_name' => 'System', 
23                         'mime_type' => 'original',
24                         'nodata' => 'image',
25                 )
26         );
27         echo $upfile->embed(
28                 $file,
29                 array(
30                         'linkTo' => $url,
31                         'alt' => CorePlus::get_value($system, 'Attachment.0.alternative'),
32                         'restrict' => array('image'),
33                         'htmlAttributes' => array(
34                                 'target' => '_blank',
35                         ),
36                 )
37         );
38 ?>
39 </td>
40 </tr>
41 <tr>
42 <th>
43         <?php __('URL'); ?>
44 </th>
45 <td colspan="3">
46 <?php if ($system['System']['url']): ?>
47         <?php echo $html->link($system['System']['url'], $system['System']['url'], array('target'=>'_blank'), false, false); ?>
48 <?php else: ?>
49         &nbsp;
50 <?php endif; ?>
51 </td>
52 </tr>
53 <tr>
54 <th>
55         <?php __('Public'); ?>
56 </th>
57 <td>
58         <?php echo $select->get_i18n_public_flag($system['System']['public_flag'], $public_flags) ?>
59 </td>
60 <th>
61         <?php __('Use NPC Setting'); ?>
62 </th>
63 <td>
64 <?php if ($system['System']['set_npc']): ?>
65         <?php echo __('Use', true) ?>
66 <?php else: ?>
67         <?php echo __('No Use', true) ?>
68 <?php endif; ?>
69 </td>
70 </tr>
71 <tr>
72 <th>
73         <?php __('Detail'); ?>
74 </th>
75 <td colspan="3">
76         <?php echo $system['System']['detail']; ?>
77         &nbsp;
78 </td>
79 </tr>
80 </tbody>
81 </table>
82 </div>
83 </p>
84
85 <div class="actions">
86 <ul>
87 <li><?php echo $html->link(__('Edit System', true), array('action' => 'edit', $system['System']['id'])); ?> </li>
88 <li><?php echo $html->link(__('Delete System', true), array('action' => 'delete', $system['System']['id']), null, sprintf(__('Are you sure you want to delete %s?', true), $system['System']['name'])); ?> </li>
89 </ul>
90 </div>
91
92 <hr>
93
94 <div class="profiles view">
95 <h2><?php __('Profiles');?></h2>
96 <p>
97 <div class="actions">
98 <ul>
99 <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add', $system['System']['id'])); ?></li>
100 </ul>
101 </div>
102 </p>
103 <p>
104 <table>
105 <tr>
106 <th>
107         <?php echo __('ID', true);?>
108 </th>
109 <th>
110         <?php echo __('Order');?>
111 </th>
112 <th colspan="6">
113         <?php echo __('Detail');?>
114 </th>
115 </tr>
116 <?php
117 $i = 0;
118 foreach ($system['Profile'] as $profile):
119         $class = null;
120         $profiledisp->set_profile_type4view($profile);
121 ?>
122 <tr>
123 <td rowspan="<?php if ($profiledisp->profile_type['is_subsetting']): ?>4<?php else: ?>3<?php endif; ?>">
124         <?php echo $profile['id']; ?>
125 </td>
126 <td rowspan="<?php if ($profiledisp->profile_type['is_subsetting']): ?>4<?php else: ?>3<?php endif; ?>">
127         <?php echo $profile['sort_order']; ?>
128 </td>
129
130 <th>
131         <?php echo __('Item Name', true);?>
132 </th>
133 <th>
134         <?php echo __('Key Name', true);?>
135 </th>
136 <th>
137         <?php echo __('Input Type', true);?>
138 </th>
139 <th>
140         <?php echo __('Required', true);?>
141 </th>
142 <th>
143         <?php echo __('Editable', true);?>
144 </th>
145 <th>
146         <?php echo __('Default Public Flag', true);?>
147 </th>
148 </tr>
149 <tr>
150 <td>
151         <?php echo $profile['name']; ?>
152 </td>
153 <td>
154         <?php echo $profile['key_name']; ?>
155 </td>
156 <td>
157 <?php 
158         $profile_type = $profiledisp->get_i18n_profile_type($profile['profile_type'], $profile_types);
159         echo $profile_type;
160 ?>
161 </td>
162 <td>
163 <?php if ($profile['required']) {
164                 echo __('true' ,true);
165         } else {
166                 echo __('false' ,true);
167         }
168 ?>
169 </td>
170 <td>
171 <?php if ($profile['editable']) {
172                 echo __('true' ,true);
173         } else {
174                 echo __('false' ,true);
175         }
176 ?>
177 </td>
178 <td>
179         <?php echo $select->get_i18n_public_flag($profile['public_flag_default'], $public_flags); ?>
180 </td>
181 </tr>
182 <?php if ($profiledisp->profile_type['is_subsetting']): ?> 
183 <tr>
184 <td colspan="6"<?php if($profiledisp->profile_type['is_table']): ?> class="table"<?php endif; ?>>
185 <?php 
186         $profiledisp->disp_forms4profile_type($profile, 2, 0);
187 ?>
188 </td>
189 </tr>
190 <?php endif; ?>
191 <tr>
192 <td colspan="6" class="actions">
193 <?php if ($profiledisp->profile_type['is_select'] || $profiledisp->profile_type['is_radio'] || $profiledisp->profile_type['is_checkbox']): ?> 
194 <?php 
195         echo $html->link(
196                 __('Edit Items', true), 
197                 array('controller' => 'profile_selects', 'action' => 'admin_listview', $profile['id'])
198         );
199 ?>
200 <?php endif; ?>
201 <?php if ($profiledisp->profile_type['is_table']): ?> 
202 <?php
203         echo $html->link(
204                 __('Edit Table', true), 
205                 array('controller' => 'profile_tables', 'action' => 'admin_listview', $profile['id'])
206         );
207 ?>
208 <?php endif; ?>
209 <?php
210         echo $html->link(
211                 __('Edit', true), 
212                 array('controller' => 'profiles', 'action' => 'edit', $profile['id'])
213         );
214         echo $html->link(
215                 __('Delete', true), 
216                 array('controller' => 'profiles', 'action' => 'delete', $profile['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $profile['id'])
217         );
218 ?>
219 </td>
220 </tr>
221 <?php endforeach; ?>
222 </table>
223 </div>