OSDN Git Service

SystemImage表示の変更
authorCake <cake_67@users.sourceforge.jp>
Fri, 23 Apr 2010 07:44:34 +0000 (16:44 +0900)
committerCake <cake_67@users.sourceforge.jp>
Fri, 23 Apr 2010 07:44:34 +0000 (16:44 +0900)
app/views/character_sheets/admin_index.ctp
app/views/systems/admin_index.ctp
app/views/systems/admin_view.ctp
app/views/systems/index.ctp
app/views/systems/view.ctp

index 157742c..ff1199a 100644 (file)
@@ -84,3 +84,20 @@ foreach ($characterSheets as $characterSheet):
  | <?php echo $paginator->numbers();?> | 
 <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
 </div>
+
+<div class="action">
+<?php 
+       if (isset($this_system['System']['id'])) {
+               $system_id = $this_system['System']['id'];
+       } else {
+               $system_id = null;
+       }
+       $url = array(
+               'controller' => 'character_sheets',
+               'action' => 'add',
+               $system_id
+       );
+       echo $form->create('CharacterSheet', array('url' => $url, 'type' => 'get'));
+?>
+<?php echo $form->end(__('New CharacterSheet', true));?>
+</div>
index 4984d85..1efed07 100644 (file)
@@ -27,32 +27,12 @@ foreach ($systems as $system):
 </td>
 <td>
 <?php
-       $file = $upfile->file(
-               'filter/xs', 
-               CorePlus::get_value($system, 'Attachment.0'),
-               array(
-                       'model_name' => 'System', 
-                       'mime_type' => 'original',
-                       'nodata' => 'image',
-               )
-       );
-       $system_img = $upfile->embed(
-               $file,
-               array(
-                       'alt' => CorePlus::get_value($system, 'Attachment.0.alternative'),
-                       'restrict' => array('image'),
-                       'htmlAttributes' => array(
-                               'target' => '_blank',
-                       ),
-               )
-       );
-
        $system_name =  $html->link($system['System']['name'], array('action' => 'view', $system['System']['id']), array(), false, false);
 
        $total =  $html->tag('span', sprintf(__('Total Characters %d', true), $system['System']['character_num']), array('class' => 'total_chara_num'));
 
        echo $this->renderElement('character_picture_table', array(
-               'header' => $system_img. $system_name. $total,
+               'header' => $system_name. $total,
                'characters' => $system['Character'],
                'previewVersion' => 's',
                'colNum' => 5,
index 4893f04..0696128 100644 (file)
@@ -8,26 +8,6 @@
        if ($system['System']['url']) {
                $url = $system['System']['url'];
        }
-       $file = $upfile->file(
-               'filter/xs', 
-               CorePlus::get_value($system, 'Attachment.0'),
-               array(
-                       'model_name' => 'System', 
-                       'mime_type' => 'original',
-                       'nodata' => 'image',
-               )
-       );
-       $system_img = $upfile->embed(
-               $file,
-               array(
-                       'linkTo' => $url,
-                       'alt' => CorePlus::get_value($system, 'Attachment.0.alternative'),
-                       'restrict' => array('image'),
-                       'htmlAttributes' => array(
-                               'target' => '_blank',
-                       ),
-               )
-       );
 
        $system_link = null;
        if (isset($system['System']['url'])) {
                )
        );
 
+       $body = $system['System']['detail']."&nbsp;";
+       $file = $upfile->file(
+               'filter/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'],
@@ -69,8 +76,8 @@
                '</ul>';
 
        echo $this->renderElement('box', array(
-               'header' => $system_img. $system_name. $public. $system_link. $npc_use,
-               'body' => $system['System']['detail']."&nbsp;",
+               'header' => $system_name. $public. $system_link. $npc_use,
+               'body' => $body,
                'footer' => $footer,
        ));
 ?>
@@ -139,6 +146,8 @@ $characterSheet['id'],
                }
        }
 
+       $footer = null;
+
        echo $this->renderElement('box', array(
                'header' =>$header,
                'body' => $body,
index ff333f9..7209002 100644 (file)
@@ -16,32 +16,12 @@ echo $paginator->counter(array(
 ?>
 <div class="systemList">
 <?php
-       $file = $upfile->file(
-               'filter/xs', 
-               CorePlus::get_value($system, 'Attachment.0'),
-               array(
-                       'model_name' => 'System', 
-                       'mime_type' => 'original',
-                       'nodata' => 'image',
-               )
-       );
-       $system_img = $upfile->embed(
-               $file,
-               array(
-                       'alt' => CorePlus::get_value($system, 'Attachment.0.alternative'),
-                       'restrict' => array('image'),
-                       'htmlAttributes' => array(
-                               'target' => '_blank',
-                       ),
-               )
-       );
-
        $system_name =  $html->link($system['System']['name'], array('action' => 'view', $system['System']['id']), array(), false, false);
 
        $total =  $html->tag('span', sprintf(__('Total Characters %d', true), $system['System']['character_num']), array('class' => 'total_chara_num'));
 
        echo $this->renderElement('character_picture_table', array(
-               'header' => $system_img. $system_name. $total,
+               'header' => $system_name. $total,
                'characters' => $system['Character'],
                'previewVersion' => 's',
                'colNum' => 8,
index 0c6ddbe..2ee8e13 100644 (file)
@@ -8,13 +8,14 @@
        if ($system['System']['url']) {
                $url = $system['System']['url'];
        }
+
+       $body = $system['System']['detail']."&nbsp;";
        $file = $upfile->file(
-               'filter/xs', 
+               'filter/l', 
                CorePlus::get_value($system, 'Attachment.0'),
                array(
                        'model_name' => 'System', 
                        'mime_type' => 'original',
-                       'nodata' => 'image',
                )
        );
        $system_img = $upfile->embed(
                        ),
                )
        );
+       if (!empty($system_img)) {
+               $body = $html->tag('table', $html->tableCells(array(
+                       $system_img,
+                       $body
+               )));
+       }
 
        $system_link = null;
        if (isset($system['System']['url'])) {
@@ -42,8 +49,8 @@
        $footer = null;
 
        echo $this->renderElement('box', array(
-               'header' => $system_img. $system_name. $system_link,
-               'body' => $system['System']['detail']."&nbsp;",
+               'header' => $system_name. $system_link,
+               'body' => $body,
                'footer' => $footer,
        ));
 ?>