OSDN Git Service

入力欄追加リンク
authorCake <cake_67@users.sourceforge.jp>
Tue, 3 Aug 2010 07:41:37 +0000 (16:41 +0900)
committerCake <cake_67@users.sourceforge.jp>
Tue, 3 Aug 2010 07:41:37 +0000 (16:41 +0900)
app/controllers/characters_controller.php
app/locale/jpn/LC_MESSAGES/default.po
app/views/characters/add_milti_profiles.ctp

index c18ec88..6616fc3 100644 (file)
@@ -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']);
        }
 
index ef3101b..61825b2 100644 (file)
@@ -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"
index a0e87de..be57f88 100644 (file)
@@ -1,5 +1,27 @@
 <div class="characters form edit">
-<h2><?php echo __('Add Profiles'); ?></h2>
+<?php 
+$num = $form_nums + 3;
+$header = __('Add Profiles', true);
+$header .= $html->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',
+       )
+);
+?>
+
+<div class="box">
+<div class="boxHeader"><h3><?php echo $header ?></h3></div>
+<div class="boxBody">
 <p>
 <?php echo $form->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');
 ?>
 </div>
 
+</p>
+</div>
+</div>