OSDN Git Service

System詳細画面のレイアウト変更
authorCake <cake_67@users.sourceforge.jp>
Sun, 26 Dec 2010 13:38:06 +0000 (22:38 +0900)
committerCake <cake_67@users.sourceforge.jp>
Sun, 26 Dec 2010 13:40:35 +0000 (22:40 +0900)
app/locale/jpn/LC_MESSAGES/default.po
app/views/elements/box.ctp
app/views/elements/system_view.ctp [new file with mode: 0644]
app/views/site_configs/admin_edit.ctp
app/views/systems/admin_add.ctp
app/views/systems/admin_edit.ctp
app/views/systems/admin_view.ctp
app/views/systems/view.ctp
app/webroot/css/box.css

index 1d1d042..3646c97 100644 (file)
@@ -2074,7 +2074,7 @@ msgid "Not Required"
 msgstr "不要"
 
 #: /views/site_configs/admin_edit.ctp:
-msgid "Information"
+msgid "Site Information"
 msgstr "サイト情報"
 
 msgid "Help"
@@ -2250,6 +2250,9 @@ msgstr "著作権表示"
 msgid "HTML tag OK."
 msgstr "HTMLタグ使用可"
 
+msgid "Official Web Site"
+msgstr "公式サイト"
+
 #: /views/systems/admin_add.ctp:44
 #: /views/systems/admin_edit.ctp:51
 msgid "Use NPC"
index 646a207..aa11e2f 100644 (file)
@@ -1,4 +1,4 @@
-<div class="box <?php if (isset($classes)): ?><?php echo $classes ?><?php endif; ?>" id="<?php if (isset($id)): ?><?php echo $id ?><?php endif; ?>">
+<div class="box<?php if (isset($classes)): ?> <?php echo $classes ?><?php endif; ?>" id="<?php if (isset($id)): ?><?php echo $id ?><?php endif; ?>">
 <div class="boxHeader"><h3><?php if (isset($header)): ?><?php echo $header;?><?php endif; ?></h3></div>
 <div class="boxBody">
 <?php
diff --git a/app/views/elements/system_view.ctp b/app/views/elements/system_view.ctp
new file mode 100644 (file)
index 0000000..dbc9e9b
--- /dev/null
@@ -0,0 +1,431 @@
+<div class="systems view">
+
+<div class="system_data">
+<?php
+       $header = $system['System']['name'];
+?>
+<?php if ($isAdmin): ?>
+<?php
+       $header .= $html->tag('span', 
+               $select->get_i18n_public_flag($system['System']['public_flag'], $public_flags),
+               array(
+                       'class' => 'text publicFlag',
+               )
+       );
+       if ($system['System']['set_npc']) {
+               $npc_status = __('NPC Setting: Use', true);
+       } else {
+               $npc_status = __('NPC Setting: No Use', true);
+       }
+       $header .= $html->tag('span', 
+               $npc_status,
+               array(
+                       'class' => 'text',
+               )
+       );
+
+       $header .= $html->tag('span',
+                       '['. $html->link(__('Edit', true), array(
+                               'action' => 'edit', $system['System']['id']
+                               )
+                       ). ']'
+               ).
+               $html->tag('span',
+                       '['. $html->link(__('Delete', true), array(
+                               'action' => 'delete', $system['System']['id']
+                               )
+                       ). ']'
+               );
+?>
+<?php endif; ?>
+
+<?php
+       /* Body */
+       // システム説明
+       $body = $html->div('', 
+               $system['System']['detail'], array(
+                       'id' => 'SystemDetail',
+       ));
+
+       // SyStem画像:公式URL
+       $url = '';
+       $official_link = '';
+       if ($system['System']['url']) {
+               $url = $system['System']['url'];
+               $official_link .= sprintf('<div id="OfficialWeb">%s : %s</div>',
+                       __('Official Web Site', true),
+                       $html->link($url,
+                               $url,
+                               array('target'=>'_blank', 'escape' => false),
+                               false
+                       )
+               );
+       }
+       $body .= $official_link;
+
+       $file = $upfile->file(
+               'l', 
+               CorePlus::get_value($system, 'Attachment.0'),
+               array(
+                       'model_name' => 'System', 
+                       'mime_type' => 'original',
+               )
+       );
+       $system_img = $upfile->embed(
+               $file,
+               array(
+                       'linkTo' => $url,
+                       'alt' => CorePlus::get_value($system, 'Attachment.0.alternative'),
+                       'restrict' => array('image'),
+                       'htmlAttributes' => array(
+                               'target' => '_blank',
+                       ),
+               )
+       );
+       if (!empty($system_img)) {
+               $body = $html->tag('table', $html->tableCells(array(
+                       $system_img,
+                       $body
+               )));
+       }
+
+
+       // Information
+       $body .= $html->div('', 
+               '',
+               array(
+                       'id' => 'systemInformation'
+               )
+       );
+
+       // InsertHTML
+       $body .= $html->div('InsertHtml',
+               $system['System']['ad']
+       );
+
+       $footer = '';
+       // CopyRight
+       $footer .= $html->tag('div',
+               $system['System']['copyright']
+       );
+
+       echo $this->element('box', array(
+               'header' => $header,
+               'body' => $body,
+               'footer' => $footer,
+       ));
+?>
+</div>
+
+
+<div class="characters">
+<?php
+       $total =  $html->tag('span', sprintf(__('Total Characters %d', true), $system['System']['character_num']), array('class' => 'total_chara_num'));
+
+       echo $this->element('character_picture_table', array(
+               'header' => __('Characters', true). $total,
+               'characters' => $system['Character'],
+               'previewVersion' => 'xs',
+               'colNum' => 15,
+               'id' => null,
+               'isUser' => false,
+               'isCharacter' => false,
+               'isSystem' => false,
+               'isModified' => false,
+               'more_url' => array(
+                       'controller' => 'characters', 
+                       'action' => 'index',
+                       'system:'.$system['System']['id'],
+               ),
+       ));
+?>
+</div>
+
+<div class="character_sheets">
+<?php 
+       $header =  __('CharacterSheets', true).
+               $html->tag(
+                       'span',
+                       $html->link(
+                               __(' ...More', true),
+                               array(
+                                       'controller' => 'character_sheets',
+                                       'action' => 'index',
+                                       $system['System']['id'],
+                               )
+                       ),
+                       array(
+                               'class' => 'link',
+                       )
+               );
+       $header .= $html->tag(
+                       'span',
+                       $html->link(
+                               __('New CharacterSheet', true),
+                               array(
+                                       'controller' => 'character_sheets',
+                                       'action' => 'add',
+                                       $system['System']['id'],
+                               )
+                       ),
+                       array(
+                               'class' => 'link',
+                       )
+               );
+
+       $body = '';
+       if (isset($system['CharacterSheet'])) {
+               foreach($system['CharacterSheet'] as $characterSheet) {
+                       if ($isAdmin) {
+                               $characterSheet['name'] = $html->link($characterSheet['name'], 
+                                       array(
+                                               'controller' => 'character_sheets',
+                                               'action' => 'view',
+                                               $characterSheet['id'],
+                                       ), array('escape' => false), false
+                               );
+                       }
+
+                       $sheet = $characterSheet['name'];
+                       $body .= $html->tag(
+                               'span',
+                               $sheet,
+                               array(
+                                       'class' => 'characterSheet',
+                               )
+                       );
+               }
+       }
+
+       $footer = null;
+
+       echo $this->element('box', array(
+               'header' =>$header,
+               'body' => $body,
+               'footer' => $footer,
+       ));
+ ?>
+</div>
+
+<?php if ($isAdmin && (empty($site_configs['System.otherSetting']['value']) || $site_configs['System.otherSetting']['value'] != $system['System']['id'])) : ?>
+<div class="profiles">
+<div class="box">
+<div class="boxHeader"><h3>
+<?php
+       __('Profiles');
+
+       echo $html->tag('span',
+               "[".$html->link(__('New Profile', true), 
+                       array('controller' => 'profiles', 'action' => 'add', $system['System']['id']),
+                       array(
+                               'class' => 'link',
+                       )
+               )."]"
+       );
+?>
+<?php if (empty($system['Profile'])): ?>
+<?php
+       echo $html->tag('span',
+               "[".$html->link(__('Import', true), 
+                       array('controller' => 'profiles', 'action' => 'import_profiles', $system['System']['id']),
+                       array(
+                               'class' => 'link',
+                       )
+               )."]"
+       );
+?>
+<?php else: ?>
+<?php
+       echo $html->tag('span',
+               "[".$html->link(__('Export', true), 
+                       array('controller' => 'profiles', 'action' => 'export_profiles', $system['System']['id']),
+                       array(
+                               'class' => 'link',
+                       )
+               )."]"
+       );
+?>
+<?php endif; ?>
+</h3></div>
+<div>
+<?php echo $form->create('Profile', array('url' => array(
+       'controller' => 'profiles',
+       'action' => 'admin_edit_all',
+       $system['System']['id']
+)));?>
+<table class="CharacterSheet">
+<tr>
+<th>Id</th>
+<th>
+       <?php echo __('Order');?>
+</th>
+<th colspan="6">
+       <?php echo __('Detail');?>
+</th>
+</tr>
+<?php
+$i = 0;
+foreach ($system['Profile'] as $profile):
+       $class = null;
+       $profiledisp->set_profile_type4view($profile);
+?>
+<tr>
+<td rowspan="<?php if ($profiledisp->profile_type['is_subsetting']): ?>4<?php else: ?>3<?php endif; ?>">
+       <?php echo $profile['id']; ?>
+</td>
+<td rowspan="<?php if ($profiledisp->profile_type['is_subsetting']): ?>4<?php else: ?>3<?php endif; ?>">
+<?php
+       echo $form->input($profile['id'].'.sort_order', array(
+               'type' => 'text',
+               'label' => false,
+               'style' => 'ime-mode:inactive;',
+               'value' => $profile['sort_order'],
+               'class' => 'editAll',
+       ));
+?>
+</td>
+
+<th>
+       <?php echo __('Item Name', true);?>
+</th>
+<th>
+       <?php echo __('Key Name', true);?>
+</th>
+<th>
+       <?php echo __('Profile Type', true);?>
+</th>
+<th>
+       <?php echo __('Required', true);?>
+</th>
+<th>
+       <?php echo __('Show List', true);?>
+</th>
+<th>
+       <?php echo __('Search Target', true);?>
+</th>
+</tr>
+<tr>
+<td>
+       <?php echo $profile['name']; ?>
+</td>
+<td>
+       <?php echo $profile['key_name']; ?>
+</td>
+<td>
+<?php 
+       $profile_type = $profiledisp->get_i18n_profile_type($profile['profile_type'], $profile_types);
+       echo $profile_type;
+?>
+</td>
+<td class="boolean">
+<?php
+       echo $select->create_boolean_select($profile['id'].'.required', array('default' => $profile['required']));
+?>
+</td>
+<td class="boolean">
+<?php
+       if ($profile['profile_type'] == 'table' || $profile['profile_type'] == 's-table') {
+               $options =  array(
+                       false => __('OFF' ,true),
+               );
+       } else {
+               $options =  array(
+                       true => __('ON' ,true),
+                       false => __('OFF' ,true),
+               );
+       }
+       echo $select->create_boolean_select($profile['id'].'.show_list', array('default' => $profile['show_list'], 'options' => $options));
+?>
+</td>
+<td class="boolean">
+<?php
+       echo $select->create_boolean_select($profile['id'].'.search', array('default' => $profile['search']));
+?>
+</td>
+</tr>
+<tr>
+<td colspan="6" class="edit<?php if ($profiledisp->profile_type['is_table']): ?> table<?php endif; ?>">
+<?php 
+       if ($profile['profile_type'] == 's-table') {
+               if (isset($profile['ProfileTable'][0]['ProfileTableStatic'])) {
+                       $rows = count($profile['ProfileTable'][0]['ProfileTableStatic']);
+               } else {
+                       $rows = 2;
+               }
+       } else {
+               $rows = 2;
+       }
+       $profiledisp->disp_forms4profile_type($profile, $rows, 0);
+?>
+</td>
+</tr>
+<tr>
+<td colspan="8" class="actions">
+<?php if ($profiledisp->profile_type['is_select'] || $profiledisp->profile_type['is_radio'] || $profiledisp->profile_type['is_checkbox']): ?> 
+<?php 
+       echo $html->link(
+               __('Edit Items', true), 
+               array('controller' => 'profile_selects', 'action' => 'admin_listview', $profile['id'])
+       );
+?>
+<?php endif; ?>
+<?php if ($profiledisp->profile_type['is_table']): ?> 
+<?php
+       echo $html->link(
+               __('Edit Table', true), 
+               array('controller' => 'profile_tables', 'action' => 'admin_listview', $profile['id'])
+       );
+?>
+<?php endif; ?>
+<?php
+       echo $html->link(
+               __('Edit', true), 
+               array('controller' => 'profiles', 'action' => 'edit', $profile['id'])
+       );
+       echo $html->link(
+               __('Delete', true), 
+               array('controller' => 'profiles', 'action' => 'delete', $profile['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $profile['name'])
+       );
+?>
+</td>
+</tr>
+<?php endforeach; ?>
+</table>
+<?php  echo $token->create(); ?>
+<?php echo $form->end(__('Edit All', true));?>
+</div>
+
+<div class="boxFooter">
+<div class="actions">
+<ul>
+<li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add', $system['System']['id'])); ?></li>
+<li>
+<?php if (empty($system['Profile'])): ?>
+<?php
+       echo $html->link(__('Import', true), 
+               array('controller' => 'profiles', 'action' => 'import_profiles', $system['System']['id']),
+               array(
+                       'class' => 'link',
+               )
+       );
+?>
+<?php else: ?>
+<?php
+       echo $html->link(__('Export', true), 
+               array('controller' => 'profiles', 'action' => 'export_profiles', $system['System']['id']),
+               array(
+                       'class' => 'link',
+               )
+       );
+?>
+<?php endif; ?>
+</li>
+</ul>
+</div>
+<?php // echo $html->div('', ' * '. __('Import is available only No Profiles.', true)); ?>
+</div>
+</div>
+</div>
+<?php endif; ?>
+
+</div>
\ No newline at end of file
index d3bc511..d0ebd29 100644 (file)
@@ -10,7 +10,7 @@ $(function() {
 
 <ul class="tabs">
 <li><?php echo $html->link(__('Basic', true), "#basic", array('onclick' => 'return false;')) ?></li>
-<li><?php echo $html->link(__('Information', true), "#info", array('onclick' => 'return false;')) ?></li>
+<li><?php echo $html->link(__('Site Information', true), "#info", array('onclick' => 'return false;')) ?></li>
 <li><?php echo $html->link(__('User Setting', true), "#user", array('onclick' => 'return false;')) ?></li>
 <li><?php echo $html->link(__('Character', true), "#character", array('onclick' => 'return false;')) ?></li>
 <li><?php echo $html->link(__('Upload', true), "#upload", array('onclick' => 'return false;')) ?></li>
index 2ff3307..6bf55c2 100644 (file)
@@ -37,7 +37,7 @@
        echo $form->input('url', array(
                'type' => 'text',
                'class' => 'longInput',
-               'label' => 'URL',
+               'label' => __('Official Web Site', true),
                'style' => 'ime-mode:inactive;',
        ));
        echo $form->input('copyright', array(
index a3be03b..4434973 100644 (file)
@@ -40,7 +40,7 @@
        echo $form->input('url', array(
                'type' => 'text',
                'class' => 'longInput',
-               'label' => 'URL',
+               'label' => __('Official Web Site', true),
                'style' => 'ime-mode:inactive;',
        ));
        echo $form->input('copyright', array(
index 7948a5e..b2c9cf7 100644 (file)
@@ -1,398 +1,5 @@
-<div class="systems view">
-
-<div class="system_data">
 <?php
-       $system_name = $system['System']['name'];
-
-       $url = null;
-       if ($system['System']['url']) {
-               $url = $system['System']['url'];
-       }
-
-       $system_link = null;
-       if (isset($system['System']['url'])) {
-               $system_link = $html->tag('span', 
-                       "[".$html->link('URL', $system['System']['url'], array('target'=>'_blank', 'escape' => false), false)."]",
-                       array(
-                               'class' => 'link',
-                       )
-               );
-       }
-       $public = $html->tag('span', 
-               $select->get_i18n_public_flag($system['System']['public_flag'], $public_flags),
-               array(
-                       'class' => 'text publicFlag',
-               )
-       );
-       if ($system['System']['set_npc']) {
-               $npc_status = __('NPC Setting: Use', true);
-       } else {
-               $npc_status = __('NPC Setting: No Use', true);
-       }
-       $npc_use = $html->tag('span', 
-               $npc_status,
-               array(
-                       'class' => 'text',
-               )
-       );
-
-       $body = $system['System']['detail'];
-       $body .= $html->div('InsertHtml',
-               $system['System']['ad']
-       );
-
-       $file = $upfile->file(
-               'l', 
-               CorePlus::get_value($system, 'Attachment.0'),
-               array(
-                       'model_name' => 'System', 
-                       'mime_type' => 'original',
-               )
-       );
-       $system_img = $upfile->embed(
-               $file,
-               array(
-                       'linkTo' => $url,
-                       'alt' => CorePlus::get_value($system, 'Attachment.0.alternative'),
-                       'restrict' => array('image'),
-                       'htmlAttributes' => array(
-                               'target' => '_blank',
-                       ),
-               )
-       );
-       if (!empty($system_img)) {
-               $body = $html->tag('table', $html->tableCells(array(
-                       $system_img,
-                       $body
-               )));
-       }
-
-       $footer = $html->tag(
-               'blockquote', 
-               $system['System']['copyright'],
-               array(
-                       'class' => 'Copyright', 
-                       'id' => 'systemCopyright', 
-               )
-       );
-       $footer .= '<ul>'.
-               '<li>'.$html->link(__('Edit System', true), array('action' => 'edit', $system['System']['id'])).'</li>'.
-               '<li>'.$html->link(__('Delete System', true), array('action' => 'delete', $system['System']['id'])).'</li>'.
-               '</ul>';
-
-       echo $this->element('box', array(
-               'header' => $system_name. $public. $system_link. $npc_use,
-               'body' => $body,
-               'footer' => $footer,
-       ));
-?>
-</div>
-
-<div class="characters">
-<?php
-       $total =  $html->tag('span', sprintf(__('Total Characters %d', true), $system['System']['character_num']), array('class' => 'total_chara_num'));
-
-       echo $this->element('character_picture_table', array(
-               'header' => __('Characters', true). $total,
-               'characters' => $system['Character'],
-               'previewVersion' => 'xs',
-               'colNum' => 15,
-               'id' => null,
-               'isUser' => false,
-               'isCharacter' => false,
-               'isSystem' => false,
-               'isModified' => false,
-               'more_url' => array(
-                       'controller' => 'characters', 
-                       'action' => 'index',
-                       'system:'.$system['System']['id'],
-               ),
-       ));
-?>
-</div>
-
-<div class="character_sheets">
-<?php 
-       $header =  __('CharacterSheets', true).
-               $html->tag(
-                       'span',
-                       $html->link(
-                               __(' ...More', true),
-                               array(
-                                       'controller' => 'character_sheets',
-                                       'action' => 'index',
-                                       $system['System']['id'],
-                               )
-                       ),
-                       array(
-                               'class' => 'link',
-                       )
-               );
-       $header .= $html->tag(
-                       'span',
-                       $html->link(
-                               __('New CharacterSheet', true),
-                               array(
-                                       'controller' => 'character_sheets',
-                                       'action' => 'add',
-                                       $system['System']['id'],
-                               )
-                       ),
-                       array(
-                               'class' => 'link',
-                       )
-               );
-
-       $body = '';
-       if (isset($system['CharacterSheet'])) {
-               foreach($system['CharacterSheet'] as $characterSheet) {
-                       $sheet = $html->link(
-                               $characterSheet['name'],
-                               array(
-                                       'controller' => 'character_sheets',
-'action' => 'view',
-$characterSheet['id'],
-                               ), array('escape' => false), false
-                       );
-                       $body .= $html->tag(
-                               'span',
-                               $sheet,
-                               array(
-                                       'class' => 'characterSheet',
-                               )
-                       );
-               }
-       }
-
-       $footer = null;
-
-       echo $this->element('box', array(
-               'header' =>$header,
-               'body' => $body,
-               'footer' => $footer,
-       ));
- ?>
-</div>
-
-<?php if (empty($site_configs['System.otherSetting']['value']) || $site_configs['System.otherSetting']['value'] != $system['System']['id']) : ?>
-<div class="profiles">
-<div class="box">
-<div class="boxHeader"><h3>
-<?php
-       __('Profiles');
-
-       echo $html->tag('span',
-               "[".$html->link(__('New Profile', true), 
-                       array('controller' => 'profiles', 'action' => 'add', $system['System']['id']),
-                       array(
-                               'class' => 'link',
-                       )
-               )."]"
-       );
-?>
-<?php if (empty($system['Profile'])): ?>
-<?php
-       echo $html->tag('span',
-               "[".$html->link(__('Import', true), 
-                       array('controller' => 'profiles', 'action' => 'import_profiles', $system['System']['id']),
-                       array(
-                               'class' => 'link',
-                       )
-               )."]"
-       );
-?>
-<?php else: ?>
-<?php
-       echo $html->tag('span',
-               "[".$html->link(__('Export', true), 
-                       array('controller' => 'profiles', 'action' => 'export_profiles', $system['System']['id']),
-                       array(
-                               'class' => 'link',
-                       )
-               )."]"
-       );
-?>
-<?php endif; ?>
-</h3></div>
-<div>
-<?php echo $form->create('Profile', array('url' => array(
-       'controller' => 'profiles',
-       'action' => 'admin_edit_all',
-       $system['System']['id']
-)));?>
-<table class="CharacterSheet">
-<tr>
-<th>Id</th>
-<th>
-       <?php echo __('Order');?>
-</th>
-<th colspan="6">
-       <?php echo __('Detail');?>
-</th>
-</tr>
-<?php
-$i = 0;
-foreach ($system['Profile'] as $profile):
-       $class = null;
-       $profiledisp->set_profile_type4view($profile);
-?>
-<tr>
-<td rowspan="<?php if ($profiledisp->profile_type['is_subsetting']): ?>4<?php else: ?>3<?php endif; ?>">
-       <?php echo $profile['id']; ?>
-</td>
-<td rowspan="<?php if ($profiledisp->profile_type['is_subsetting']): ?>4<?php else: ?>3<?php endif; ?>">
-<?php
-       echo $form->input($profile['id'].'.sort_order', array(
-               'type' => 'text',
-               'label' => false,
-               'style' => 'ime-mode:inactive;',
-               'value' => $profile['sort_order'],
-               'class' => 'editAll',
-       ));
-?>
-</td>
-
-<th>
-       <?php echo __('Item Name', true);?>
-</th>
-<th>
-       <?php echo __('Key Name', true);?>
-</th>
-<th>
-       <?php echo __('Profile Type', true);?>
-</th>
-<th>
-       <?php echo __('Required', true);?>
-</th>
-<th>
-       <?php echo __('Show List', true);?>
-</th>
-<th>
-       <?php echo __('Search Target', true);?>
-</th>
-</tr>
-<tr>
-<td>
-       <?php echo $profile['name']; ?>
-</td>
-<td>
-       <?php echo $profile['key_name']; ?>
-</td>
-<td>
-<?php 
-       $profile_type = $profiledisp->get_i18n_profile_type($profile['profile_type'], $profile_types);
-       echo $profile_type;
-?>
-</td>
-<td class="boolean">
-<?php
-       echo $select->create_boolean_select($profile['id'].'.required', array('default' => $profile['required']));
-?>
-</td>
-<td class="boolean">
-<?php
-       if ($profile['profile_type'] == 'table' || $profile['profile_type'] == 's-table') {
-               $options =  array(
-                       false => __('OFF' ,true),
-               );
-       } else {
-               $options =  array(
-                       true => __('ON' ,true),
-                       false => __('OFF' ,true),
-               );
-       }
-       echo $select->create_boolean_select($profile['id'].'.show_list', array('default' => $profile['show_list'], 'options' => $options));
-?>
-</td>
-<td class="boolean">
-<?php
-       echo $select->create_boolean_select($profile['id'].'.search', array('default' => $profile['search']));
-?>
-</td>
-</tr>
-<tr>
-<td colspan="6" class="edit<?php if ($profiledisp->profile_type['is_table']): ?> table<?php endif; ?>">
-<?php 
-       if ($profile['profile_type'] == 's-table') {
-               if (isset($profile['ProfileTable'][0]['ProfileTableStatic'])) {
-                       $rows = count($profile['ProfileTable'][0]['ProfileTableStatic']);
-               } else {
-                       $rows = 2;
-               }
-       } else {
-               $rows = 2;
-       }
-       $profiledisp->disp_forms4profile_type($profile, $rows, 0);
-?>
-</td>
-</tr>
-<tr>
-<td colspan="8" class="actions">
-<?php if ($profiledisp->profile_type['is_select'] || $profiledisp->profile_type['is_radio'] || $profiledisp->profile_type['is_checkbox']): ?> 
-<?php 
-       echo $html->link(
-               __('Edit Items', true), 
-               array('controller' => 'profile_selects', 'action' => 'admin_listview', $profile['id'])
-       );
-?>
-<?php endif; ?>
-<?php if ($profiledisp->profile_type['is_table']): ?> 
-<?php
-       echo $html->link(
-               __('Edit Table', true), 
-               array('controller' => 'profile_tables', 'action' => 'admin_listview', $profile['id'])
-       );
-?>
-<?php endif; ?>
-<?php
-       echo $html->link(
-               __('Edit', true), 
-               array('controller' => 'profiles', 'action' => 'edit', $profile['id'])
-       );
-       echo $html->link(
-               __('Delete', true), 
-               array('controller' => 'profiles', 'action' => 'delete', $profile['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $profile['name'])
-       );
-?>
-</td>
-</tr>
-<?php endforeach; ?>
-</table>
-<?php  echo $token->create(); ?>
-<?php echo $form->end(__('Edit All', true));?>
-</div>
-
-<div class="boxFooter">
-<div class="actions">
-<ul>
-<li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add', $system['System']['id'])); ?></li>
-<li>
-<?php if (empty($system['Profile'])): ?>
-<?php
-       echo $html->link(__('Import', true), 
-               array('controller' => 'profiles', 'action' => 'import_profiles', $system['System']['id']),
-               array(
-                       'class' => 'link',
-               )
-       );
-?>
-<?php else: ?>
-<?php
-       echo $html->link(__('Export', true), 
-               array('controller' => 'profiles', 'action' => 'export_profiles', $system['System']['id']),
-               array(
-                       'class' => 'link',
-               )
-       );
-?>
-<?php endif; ?>
-</li>
-</ul>
-</div>
-<?php // echo $html->div('', ' * '. __('Import is available only No Profiles.', true)); ?>
-</div>
-</div>
-</div>
-<?php endif; ?>
-
-</div>
\ No newline at end of file
+echo $this->element('system_view', array(
+       'system' => $system,
+       'isAdmin' => true,
+));
index ff7b645..2f66375 100644 (file)
@@ -1,159 +1,5 @@
-<div class="systems view">
-
-<div class="system_data">
 <?php
-       $system_name = $system['System']['name'];
-
-       $url = null;
-       if ($system['System']['url']) {
-               $url = $system['System']['url'];
-       }
-
-       $body = $system['System']['detail'];
-       $body .= $html->div('InsertHtml',
-               $system['System']['ad']
-       );
-
-       $file = $upfile->file(
-               'l', 
-               CorePlus::get_value($system, 'Attachment.0'),
-               array(
-                       'model_name' => 'System', 
-                       'mime_type' => 'original',
-               )
-       );
-       $system_img = $upfile->embed(
-               $file,
-               array(
-                       'linkTo' => $url,
-                       'alt' => CorePlus::get_value($system, 'Attachment.0.alternative'),
-                       'restrict' => array('image'),
-                       'htmlAttributes' => array(
-                               'target' => '_blank',
-                       ),
-               )
-       );
-       if (!empty($system_img)) {
-               $body = $html->tag('table', $html->tableCells(array(
-                       $system_img,
-                       $body
-               )));
-       }
-
-       $system_link = null;
-       if (isset($system['System']['url'])) {
-               $system_link = $html->tag('span', 
-                       "[".$html->link('URL', $system['System']['url'], array('target'=>'_blank', 'escape' => false), false)."]",
-                       array(
-                               'class' => 'link',
-                       )
-               );
-       }
-
-       $footer = null;
-
-       echo $this->element('box', array(
-               'header' => $system_name. $system_link,
-               'body' => $body,
-               'footer' => $footer,
-       ));
-?>
-</div>
-
-<div class="characters">
-<?php
-       $total =  $html->tag('span', sprintf(__('Total Characters %d', true), $system['System']['character_num']), array('class' => 'total_chara_num'));
-
-       $add_link =  $html->tag('span', $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add', 'system_id:'.$system['System']['id'])), array('class' => 'addLink'));
-
-       echo $this->element('character_picture_table', array(
-               'header' => __('Characters', true). $total. $add_link,
-               'characters' => $system['Character'],
-               'previewVersion' => 'xs',
-               'colNum' => 15,
-               'id' => null,
-               'isUser' => false,
-               'isCharacter' => false,
-               'isSystem' => false,
-               'isModified' => false,
-               'more_url' => array(
-                       'controller' => 'characters', 
-                       'action' => 'index',
-                       'system:'.$system['System']['id'],
-               ),
-       ));
-?>
-</div>
-
-<div class="character_sheets">
-<?php 
-       $header =  __('CharacterSheets', true).
-               $html->tag(
-                       'span',
-                       $html->link(
-                               __(' ...More', true),
-                               array(
-                                       'controller' => 'character_sheets',
-                                       'action' => 'index',
-                                       $system['System']['id'],
-                               )
-                       ),
-                       array(
-                               'class' => 'link',
-                       )
-               );
-       if ($site_configs['System.allowUserSheet']['value']) {
-               $header .= $html->tag(
-                       'span',
-                       $html->link(
-                               __('New CharacterSheet', true),
-                               array(
-                                       'controller' => 'character_sheets',
-                                       'action' => 'add',
-                                       $system['System']['id'],
-                               )
-                       ),
-                       array(
-                               'class' => 'link',
-                       )
-               );
-       }
-
-       $body = '';
-       if (isset($system['CharacterSheet'])) {
-               foreach($system['CharacterSheet'] as $characterSheet) {
-                       if (!empty($site_configs['System.allowUserSheet']['value'])) {
-                               $sheet = $html->link(
-                                       $characterSheet['name'],
-                                       array(
-                                               'controller' => 'character_sheets',
-                                               'action' => 'view',
-                                               $characterSheet['id'],
-                                       ), array('escape' => false), false
-                               );
-                       } else {
-                               $sheet = $characterSheet['name'];
-                       }
-
-                       $body .= $html->tag(
-                               'span',
-                               $sheet,
-                               array(
-                                       'class' => 'characterSheet',
-                               )
-                       );
-               }
-       }
-
-       $footer = null;
-
-       echo $this->element('box', array(
-               'header' =>$header,
-               'body' => $body,
-               'footer' => $footer,
-       ));
- ?>
-</div>
-
-
-</div>
+echo $this->element('system_view', array(
+       'system' => $system,
+       'isAdmin' => false,
+));
index 206dfd5..6ac1bd3 100644 (file)
@@ -294,6 +294,14 @@ span.characterSheet {
 div.systems .profiles .box table {
        margin-top: 5px;
 }
+div.systems .system_data div#systemInformation {
+       margin-top: 15px;
+}
+div#OfficialWeb {
+       margin-top: 15px;
+       font-size: 130%;
+}
+
 div.characterProfileArchives .boxBody {
        width: 720px;
        padding: 10px;