OSDN Git Service

$text->truncate周りの改修
authorCake <cake_67@users.sourceforge.jp>
Tue, 23 Mar 2010 14:48:34 +0000 (23:48 +0900)
committerCake <cake_67@users.sourceforge.jp>
Tue, 23 Mar 2010 14:48:34 +0000 (23:48 +0900)
app/controllers/app_controller.php
app/views/characters/admin_index.ctp
app/views/characters/index.ctp
app/views/elements/character_sidenav.ctp
app/views/elements/character_view.ctp
app/views/elements/home_left.ctp
app/views/elements/pc_header_intro.ctp

index aabb4a0..ec61cea 100644 (file)
@@ -39,6 +39,7 @@ class AppController extends Controller
                'Html',
                'Form',
                'Javascript',
+               'Text',
                'Time',
                'Settings',
                'Media.Medium',
@@ -241,12 +242,11 @@ class AppController extends Controller
                if (!is_array($contain)) {
                        $contain = array('');
                }
-               if (empty($recursive)) {
+               if (empty($contain)) {
                        $recursive = -1;
                } else {
                        $recursive = Set::countDim($contain);
                }
-
                if (empty($order)) {
                        $order = array('Character.modified' => 'DESC');
                }
index 0a7dcfe..964d9b4 100644 (file)
@@ -10,16 +10,14 @@ echo $paginator->counter(array(
 <tr>
        <th><?php echo $paginator->sort('id');?></th>
        <th><?php echo $paginator->sort('name');?></th>
-       <th><?php echo __('Picture', true);?></th>
+       <th><?php __('Picture');?></th>
        <th><?php echo $paginator->sort('system_id');?></th>
-       <th><?php echo $paginator->sort('modified');?></th>
 <?php if (empty($userSet)): ?>
        <th><?php echo $paginator->sort('user_id');?></th>
 <?php endif; ?>
-       <th><?php echo $paginator->sort('sort_order');?></th>
+       <th><?php echo $paginator->sort('modified');?></th>
        <th><?php echo $paginator->sort('status');?></th>
        <th><?php echo $paginator->sort('public_flag');?></th>
-</th>
 </tr>
 <?php
        $i = 0;
@@ -34,7 +32,7 @@ echo $paginator->counter(array(
        <?php echo $character['Character']['id']; ?>
 </td>
 <td>
-       <?php echo $html->link($character['Character']['name'], array('action' => 'view', $character['Character']['id'])); ?>
+       <?php echo $html->link($text->truncate($character['Character']['name'], 32), array('action' => 'view', $character['Character']['id'])); ?>
 </td>
 <td class="center">
 <?php
@@ -44,7 +42,7 @@ echo $paginator->counter(array(
                        'previewVersion' => 's',
                        'class' => '',
                        'url' => array('controller' => 'characters', 'action' => 'view', $character['Character']['id']),
-                       'alternative' => $character['Character']['name'],
+                       'alternative' => '',
                        'nodata' => '',
                )
        ));
@@ -55,16 +53,13 @@ echo $paginator->counter(array(
 <td>
        <?php echo $html->link($character['System']['name'], array('controller' => 'systems', 'action' => 'view', $character['System']['id'])); ?>&nbsp;
 </td>
-<td>
-       <?php echo $character['Character']['modified']; ?>
-</td>
 <?php if (empty($userSet)): ?>
 <td>
        <?php echo $html->link($character['User']['name'], array('controller' => 'characters', 'action' => 'admin_index', $character['User']['id']), array(), false, false); ?>
 </td>
 <?php endif; ?>
 <td>
-       <?php echo $character['Character']['sort_order']; ?>
+       <?php echo $time->niceShort($character['Character']['modified'], array('format' => 'Y/m/d H:i')); ?>
 </td>
 <td>
        <?php echo $select->get_i18n_status($character['Character']['status'], $status); ?>
index 6a42b2a..97c2b47 100644 (file)
@@ -9,12 +9,12 @@ echo $paginator->counter(array(
 <table>
 <tr>
        <th><?php echo $paginator->sort('name');?></th>
-       <th><?php echo __('Picture', true);?></th>
+       <th><?php __('Picture');?></th>
        <th><?php echo $paginator->sort('system_id');?></th>
-       <th><?php echo $paginator->sort('status');?></th>
 <?php if (empty($userSet)): ?>
        <th><?php echo $paginator->sort('user_id');?></th>
 <?php endif; ?>
+       <th><?php echo $paginator->sort('status');?></th>
 </th>
 </tr>
 <?php
@@ -27,7 +27,7 @@ foreach ($characters as $character):
 ?>
 <tr<?php echo $class;?>>
 <td>
-       <?php echo $html->link($character['Character']['name'], array('action' => 'view', $character['Character']['id'])); ?>
+       <?php echo $html->link($text->truncate($character['Character']['name'], 32), array('action' => 'view', $character['Character']['id'])); ?>
 <?php if ($isOwner_userSet && $character['Character']['public_flag'] != 'public'): ?>
        <?php echo $select->get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?>
 <?php endif; ?>
@@ -40,7 +40,7 @@ foreach ($characters as $character):
                        'previewVersion' => 's',
                        'class' => '',
                        'url' => array('controller' => 'characters', 'action' => 'view', $character['Character']['id']),
-                       'alternative' => $character['Character']['name'],
+                       'alternative' => '',
                        'nodata' => '',
                )
        ));
@@ -51,14 +51,14 @@ foreach ($characters as $character):
 <td>
        <?php echo $html->link($character['System']['name'], array('controller' => 'systems', 'action' => 'view', $character['System']['id'])); ?>
 </td>
-<td>
-       <?php echo $select->get_i18n_status($character['Character']['status'], $status); ?>
-</td>
 <?php if (empty($userSet)): ?>
 <td>
        <?php echo $html->link($character['User']['name'], array('controller' => 'characters', 'action' => 'index', $character['User']['id']), array(), false, false); ?>
 </td>
 <?php endif; ?>
+<td>
+       <?php echo $select->get_i18n_status($character['Character']['status'], $status); ?>
+</td>
 </tr>
 <?php endforeach; ?>
 </table>
index eea123e..1d1a6a8 100644 (file)
@@ -11,11 +11,11 @@ if (isset($characterPicture['Character']['id'])) {
 }
 
 if (isset($character['Character']['name'])) {
-       $character_name = $character['Character']['name'];
+       $character_name = $text->truncate($character['Character']['name'], 16);
 } elseif (isset($this->data['Character']['name'])) {
-       $character_name = $this->data['Character']['name'];
+       $character_name = $text->truncate($this->data['Character']['name'], 16);
 } elseif (isset($characterPicture['Character']['name'])) {
-       $character_name = $characterPicture['Character']['name'];
+       $character_name = $text->truncate($characterPicture['Character']['name'], 16);
 } else {
        $character_name = null;
 }
index eaf576b..c8c4ce9 100644 (file)
@@ -82,7 +82,7 @@ echo $this->renderElement('character_picture_full', array(
                'options' => array(
                        'class' => 'mainImage',
                        'url' => $url,
-                       'alt' => $character['Character']['name'],
+                       'alt' => $text->truncate($character['Character']['name'], 64),
                )
        ));
  ?>
index 15cb092..f95d81c 100644 (file)
@@ -1,13 +1,10 @@
 <div id="left">
 
 <div class="image160">
-<div class="userName">
+<div class="User">
 <?php
 if (isset($target_user)) {
        echo $target_user['User']['name'];
-} elseif (isset($user)) {
-       echo $user['User']['name'];
-
 }
 ?>
 </div>
index 8bbf1e6..70581fb 100644 (file)
@@ -12,9 +12,10 @@ if (isset($site_configs['Site.siteName'])) {
 </a>
 </h1></li>
 <li id="siteDescription">スキン型キャラクターシート管理&公開システム</li>
+
 <li id="loginMember">
 <?php if ($user['User']['id']): ?>
-<?php echo $user['User']['name'] ?> さん
+
 <?php else: ?>
 
 <?php endif; ?>