From f5d9eb03a86e0b1975dc813c72efb7eec72b8512 Mon Sep 17 00:00:00 2001 From: Cake Date: Tue, 3 Aug 2010 16:41:37 +0900 Subject: [PATCH] =?utf8?q?=E5=85=A5=E5=8A=9B=E6=AC=84=E8=BF=BD=E5=8A=A0?= =?utf8?q?=E3=83=AA=E3=83=B3=E3=82=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/controllers/characters_controller.php | 7 +++++++ app/locale/jpn/LC_MESSAGES/default.po | 4 ++++ app/views/characters/add_milti_profiles.ctp | 29 +++++++++++++++++++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/app/controllers/characters_controller.php b/app/controllers/characters_controller.php index c18ec88..6616fc3 100644 --- a/app/controllers/characters_controller.php +++ b/app/controllers/characters_controller.php @@ -328,6 +328,13 @@ class CharactersController extends AppController { $this->set('isOwner', true); + if (isset($this->params['named']['num'])) { + $form_nums = $this->params['named']['num']; + } else { + $form_nums = 3; + } + $this->set('form_nums', $form_nums); + $this->pageTitle .= " ". sprintf(__('Edit %s', true), $character['Character']['name']); } diff --git a/app/locale/jpn/LC_MESSAGES/default.po b/app/locale/jpn/LC_MESSAGES/default.po index ef3101b..61825b2 100644 --- a/app/locale/jpn/LC_MESSAGES/default.po +++ b/app/locale/jpn/LC_MESSAGES/default.po @@ -1067,6 +1067,10 @@ msgstr "備考" msgid "Add Profiles" msgstr "プロフィール追加" +#: /views/characters/add_milti_profiles.ctp:2 +msgid "Add Column" +msgstr "入力欄追加" + #: /views/characters/add_milti_profiles.ctp: #: /views/characters/edit.ctp: msgid "Save the Profile Archive" diff --git a/app/views/characters/add_milti_profiles.ctp b/app/views/characters/add_milti_profiles.ctp index a0e87de..be57f88 100644 --- a/app/views/characters/add_milti_profiles.ctp +++ b/app/views/characters/add_milti_profiles.ctp @@ -1,5 +1,27 @@
-

+tag('span', $html->link( + __('Add Column', true), + array( + 'action' => 'add_milti_profiles', + $this->data['Character']['id'], + 'profile_id:'.$this->params['named']['profile_id'], + 'num:'. $num + ), + null, + __('If some data have been changed, you should save before click it. OK?', true) + ), + array( + 'class' => 'text', + ) +); +?> + +
+

+

create('Character', array('url' => array( 'action' => 'add_milti_profiles', @@ -28,7 +50,7 @@ if ($profile['profile_type'] == 's-table') { $count = count($profile['ProfileTable'][0]['ProfileTableStatic']); } else { - $count = 5; + $count = $form_nums; } $profiledisp->disp_forms4profile_type($profile, $count, 0, false, null, true, array('div' => array('class' => 'input text inline'))); ?> @@ -84,3 +106,6 @@ echo $form->end('Cancel'); ?>

+

+
+
-- 2.11.0