From: Cake Date: Tue, 23 Mar 2010 14:48:34 +0000 (+0900) Subject: $text->truncate周りの改修 X-Git-Tag: version-alpha~95 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a4d1d33352010934caceefbf27ce7814f7cd3b43;p=trpgtools-onweb%2Fcake-frame.git $text->truncate周りの改修 --- diff --git a/app/controllers/app_controller.php b/app/controllers/app_controller.php index aabb4a0..ec61cea 100644 --- a/app/controllers/app_controller.php +++ b/app/controllers/app_controller.php @@ -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'); } diff --git a/app/views/characters/admin_index.ctp b/app/views/characters/admin_index.ctp index 0a7dcfe..964d9b4 100644 --- a/app/views/characters/admin_index.ctp +++ b/app/views/characters/admin_index.ctp @@ -10,16 +10,14 @@ echo $paginator->counter(array( sort('id');?> sort('name');?> - + sort('system_id');?> - sort('modified');?> sort('user_id');?> - sort('sort_order');?> + sort('modified');?> sort('status');?> sort('public_flag');?> - counter(array( - link($character['Character']['name'], array('action' => 'view', $character['Character']['id'])); ?> + link($text->truncate($character['Character']['name'], 32), array('action' => 'view', $character['Character']['id'])); ?> 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( link($character['System']['name'], array('controller' => 'systems', 'action' => 'view', $character['System']['id'])); ?>  - - - link($character['User']['name'], array('controller' => 'characters', 'action' => 'admin_index', $character['User']['id']), array(), false, false); ?> - + niceShort($character['Character']['modified'], array('format' => 'Y/m/d H:i')); ?> get_i18n_status($character['Character']['status'], $status); ?> diff --git a/app/views/characters/index.ctp b/app/views/characters/index.ctp index 6a42b2a..97c2b47 100644 --- a/app/views/characters/index.ctp +++ b/app/views/characters/index.ctp @@ -9,12 +9,12 @@ echo $paginator->counter(array( - + - + > - +
sort('name');?> sort('system_id');?>sort('status');?> sort('user_id');?> sort('status');?>
- link($character['Character']['name'], array('action' => 'view', $character['Character']['id'])); ?> + link($text->truncate($character['Character']['name'], 32), array('action' => 'view', $character['Character']['id'])); ?> get_i18n_public_flag($character['Character']['public_flag'], $public_flags) ?> @@ -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): link($character['System']['name'], array('controller' => 'systems', 'action' => 'view', $character['System']['id'])); ?> - get_i18n_status($character['Character']['status'], $status); ?> - link($character['User']['name'], array('controller' => 'characters', 'action' => 'index', $character['User']['id']), array(), false, false); ?> + get_i18n_status($character['Character']['status'], $status); ?> +
diff --git a/app/views/elements/character_sidenav.ctp b/app/views/elements/character_sidenav.ctp index eea123e..1d1a6a8 100644 --- a/app/views/elements/character_sidenav.ctp +++ b/app/views/elements/character_sidenav.ctp @@ -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; } diff --git a/app/views/elements/character_view.ctp b/app/views/elements/character_view.ctp index eaf576b..c8c4ce9 100644 --- a/app/views/elements/character_view.ctp +++ b/app/views/elements/character_view.ctp @@ -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), ) )); ?> diff --git a/app/views/elements/home_left.ctp b/app/views/elements/home_left.ctp index 15cb092..f95d81c 100644 --- a/app/views/elements/home_left.ctp +++ b/app/views/elements/home_left.ctp @@ -1,13 +1,10 @@
-
+
diff --git a/app/views/elements/pc_header_intro.ctp b/app/views/elements/pc_header_intro.ctp index 8bbf1e6..70581fb 100644 --- a/app/views/elements/pc_header_intro.ctp +++ b/app/views/elements/pc_header_intro.ctp @@ -12,9 +12,10 @@ if (isset($site_configs['Site.siteName'])) {
  • スキン型キャラクターシート管理&公開システム
  • +
  • - さん +