`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`character_id` INTEGER UNSIGNED NOT NULL,
`profile_id` INTEGER UNSIGNED NOT NULL,
- `profile_selects_id` INTEGER UNSIGNED NOT NULL,
- `profile_tables_id` INTEGER UNSIGNED NOT NULL,
+ `profile_select_id` INTEGER UNSIGNED NULL,
+ `profile_table_id` INTEGER UNSIGNED NULL,
`value` TEXT NOT NULL,
`public_flag` ENUM('public', 'private') NOT NULL DEFAULT 'public',
`link_value` TEXT NOT NULL,
CONSTRAINT `fk_profiles-characters_has_profiles`
FOREIGN KEY (`profile_id`) REFERENCES `profiles` (`id`) ON DELETE CASCADE,
CONSTRAINT `fk_profile_selects-characters_has_profiles`
- FOREIGN KEY (`profile_selects_id`) REFERENCES `profile_selects` (`id`) ON DELETE CASCADE,
+ FOREIGN KEY (`profile_select_id`) REFERENCES `profile_selects` (`id`) ON DELETE CASCADE,
CONSTRAINT `fk_profile_tables-characters_has_profiles`
- FOREIGN KEY (`profile_tables_id`) REFERENCES `profile_tables` (`id`) ON DELETE CASCADE
+ FOREIGN KEY (`profile_table_id`) REFERENCES `profile_tables` (`id`) ON DELETE CASCADE
) TYPE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `acos` WRITE;
/*!40000 ALTER TABLE `acos` DISABLE KEYS */;
INSERT INTO `acos` VALUES
-(1,NULL,'',NULL,'controllers',1,16),
+(1,NULL,'',NULL,'controllers',1,18),
(2,1,'',NULL,'Users',2,3),
(3,1,'',NULL,'Groups',4,5),
-(4,NULL,'',NULL,'prefix',17,24),
-(5,4,'',NULL,'admin',18,19),
-(6,4,'',NULL,'pc',20,21),
-(7,4,'',NULL,'m',22,23),
+(4,NULL,'',NULL,'prefix',19,26),
+(5,4,'',NULL,'admin',20,21),
+(6,4,'',NULL,'pc',22,23),
+(7,4,'',NULL,'m',24,25),
(8,1,'',NULL,'Systems',6,7),
(9,1,'',NULL,'Characters',8,9),
(10,1,'',NULL,'Profiles',10,11),
(11,1,'',NULL,'ProfileSelects',12,13),
-(12,1,'',NULL,'ProfileTables',14,15);
+(12,1,'',NULL,'ProfileTables',14,15),
+(13,1,'',NULL,'CharactersHasProfile',16,17);
/*!40000 ALTER TABLE `acos` ENABLE KEYS */;
UNLOCK TABLES;
(26,3,11,'0','1','0','0'),
(27,4,11,'0','1','0','0'),
(28,3,12,'0','1','0','0'),
-(29,4,12,'0','1','0','0');
+(29,4,12,'0','1','0','0'),
+(30,3,13,'1','1','1','1'),
+(31,4,13,'1','1','1','1');
/*!40000 ALTER TABLE `aros_acos` ENABLE KEYS */;
UNLOCK TABLES;
'conditions' => $conditions,
'contain' => array(
'User',
- 'CharactersHasProfiles',
+ 'CharactersHasProfile',
'System' => array(
'Profile' => array(
'ProfileSelect',
$this->redirect(array('action'=>'index'));
}
+ $this->unsetData('edit', false);
+
if (!empty($this->data)) {
- if ($this->Character->save($this->data)) {
- $this->Session->setFlash(__('The Character has been saved', true));
- $this->redirect(array('action'=>'index'));
- } else {
- $this->Session->setFlash(__('The Character could not be saved. Please, try again.', true));
+
+ /* validate */
+ $this->Character->CharactersHasProfile->validate['profile_id']['validProfileId'] = array(
+ 'rule' => array('validProfileId', $character['System']['id']),
+ );
+ $this->Character->CharactersHasProfile->validate['profile_select_id']['validProfileSelectId'] = array(
+ 'rule' => array('validProfileSelectId', $character['System']['id']),
+ 'allowEmpty' => true,
+ );
+ $this->Character->CharactersHasProfile->validate['profile_table_id']['validProfiletableId'] = array(
+ 'rule' => array('validProfiletableId', $character['System']['id']),
+ 'allowEmpty' => true,
+ );
+
+ if ($this->Character->saveAll($this->data, array('validate' => 'only'))) {
+
+ /* 空のProfile設定削除 */
+ if (isset($this->data['CharactersHasProfile'])) {
+ foreach ($this->data['CharactersHasProfile'] as $k => $v) {
+ if (empty($v['value'])) {
+ unset($this->data['CharactersHasProfile'][$k]);
+ continue;
+ }
+ if (isset($v['profile_select_id'])) {
+ $this->data['CharactersHasProfile'][$k]['value'] = null;
+ }
+
+ }
+ }
+
+ // 現在のhas_profiles削除
+ $this->Character->CharactersHasProfile->deleteAll(array(
+ 'CharactersHasProfile.character_id' => $id
+ ));
+
+
+ /* 保存 */
$this->data['Character']['id'] = $id;
+ if ($this->Character->saveAll($this->data, array('validate' => false, 'atomic' => true))) {
+ $this->Session->setFlash(__('The Character has been saved', true));
+ $this->redirect(array('action'=>'view', $id));
+ } else {
+ $this->Session->setFlash(__('The Character could not be saved. Please, try again.', true));
+ }
}
+ $this->data['Character']['id'] = $id;
}
+
if (empty($this->data)) {
$this->data = $character;
$this->data['Character'] = $this->_restore_html_character($this->data['Character']);
}
- $systems = $this->Character->System->find('list');
- $this->set('systems', $systems);
}
function delete($id = null) {
)
),
*/
- 'CharactersHasProfiles',
+ 'CharactersHasProfile',
'CharacterProfileArchive',
),
));
+++ /dev/null
-<?php
-class CharactersHasProfilesController extends AppController {
-
- var $name = 'CharactersHasProfiles';
- var $helpers = array('Html', 'Form');
-
- function index() {
- $this->CharactersHasProfile->recursive = 0;
- $this->set('charactersHasProfiles', $this->paginate());
- }
-
- function view($id = null) {
- if (!$id) {
- $this->Session->setFlash(__('Invalid CharactersHasProfile.', true));
- $this->redirect(array('action'=>'index'));
- }
- $this->set('charactersHasProfile', $this->CharactersHasProfile->read(null, $id));
- }
-
- function add() {
- if (!empty($this->data)) {
- $this->CharactersHasProfile->create();
- if ($this->CharactersHasProfile->save($this->data)) {
- $this->Session->setFlash(__('The CharactersHasProfile has been saved', true));
- $this->redirect(array('action'=>'index'));
- } else {
- $this->Session->setFlash(__('The CharactersHasProfile could not be saved. Please, try again.', true));
- }
- }
- $characters = $this->CharactersHasProfile->Character->find('list');
- $profiles = $this->CharactersHasProfile->Profile->find('list');
- $profileSelects = $this->CharactersHasProfile->ProfileSelect->find('list');
- $profileTables = $this->CharactersHasProfile->ProfileTable->find('list');
- $this->set(compact('characters', 'profiles', 'profileSelects', 'profileTables'));
- }
-
- function edit($id = null) {
- if (!$id && empty($this->data)) {
- $this->Session->setFlash(__('Invalid CharactersHasProfile', true));
- $this->redirect(array('action'=>'index'));
- }
- if (!empty($this->data)) {
- if ($this->CharactersHasProfile->save($this->data)) {
- $this->Session->setFlash(__('The CharactersHasProfile has been saved', true));
- $this->redirect(array('action'=>'index'));
- } else {
- $this->Session->setFlash(__('The CharactersHasProfile could not be saved. Please, try again.', true));
- }
- }
- if (empty($this->data)) {
- $this->data = $this->CharactersHasProfile->read(null, $id);
- }
- $characters = $this->CharactersHasProfile->Character->find('list');
- $profiles = $this->CharactersHasProfile->Profile->find('list');
- $profileSelects = $this->CharactersHasProfile->ProfileSelect->find('list');
- $profileTables = $this->CharactersHasProfile->ProfileTable->find('list');
- $this->set(compact('characters','profiles','profileSelects','profileTables'));
- }
-
- function delete($id = null) {
- if (!$id) {
- $this->Session->setFlash(__('Invalid id for CharactersHasProfile', true));
- $this->redirect(array('action'=>'index'));
- }
- if ($this->CharactersHasProfile->del($id)) {
- $this->Session->setFlash(__('CharactersHasProfile deleted', true));
- $this->redirect(array('action'=>'index'));
- }
- }
-
-
- function admin_index() {
- $this->CharactersHasProfile->recursive = 0;
- $this->set('charactersHasProfiles', $this->paginate());
- }
-
- function admin_view($id = null) {
- if (!$id) {
- $this->Session->setFlash(__('Invalid CharactersHasProfile.', true));
- $this->redirect(array('action'=>'index'));
- }
- $this->set('charactersHasProfile', $this->CharactersHasProfile->read(null, $id));
- }
-
- function admin_add() {
- if (!empty($this->data)) {
- $this->CharactersHasProfile->create();
- if ($this->CharactersHasProfile->save($this->data)) {
- $this->Session->setFlash(__('The CharactersHasProfile has been saved', true));
- $this->redirect(array('action'=>'index'));
- } else {
- $this->Session->setFlash(__('The CharactersHasProfile could not be saved. Please, try again.', true));
- }
- }
- $characters = $this->CharactersHasProfile->Character->find('list');
- $profiles = $this->CharactersHasProfile->Profile->find('list');
- $profileSelects = $this->CharactersHasProfile->ProfileSelect->find('list');
- $profileTables = $this->CharactersHasProfile->ProfileTable->find('list');
- $this->set(compact('characters', 'profiles', 'profileSelects', 'profileTables'));
- }
-
- function admin_edit($id = null) {
- if (!$id && empty($this->data)) {
- $this->Session->setFlash(__('Invalid CharactersHasProfile', true));
- $this->redirect(array('action'=>'index'));
- }
- if (!empty($this->data)) {
- if ($this->CharactersHasProfile->save($this->data)) {
- $this->Session->setFlash(__('The CharactersHasProfile has been saved', true));
- $this->redirect(array('action'=>'index'));
- } else {
- $this->Session->setFlash(__('The CharactersHasProfile could not be saved. Please, try again.', true));
- }
- }
- if (empty($this->data)) {
- $this->data = $this->CharactersHasProfile->read(null, $id);
- }
- $characters = $this->CharactersHasProfile->Character->find('list');
- $profiles = $this->CharactersHasProfile->Profile->find('list');
- $profileSelects = $this->CharactersHasProfile->ProfileSelect->find('list');
- $profileTables = $this->CharactersHasProfile->ProfileTable->find('list');
- $this->set(compact('characters','profiles','profileSelects','profileTables'));
- }
-
- function admin_delete($id = null) {
- if (!$id) {
- $this->Session->setFlash(__('Invalid id for CharactersHasProfile', true));
- $this->redirect(array('action'=>'index'));
- }
- if ($this->CharactersHasProfile->del($id)) {
- $this->Session->setFlash(__('CharactersHasProfile deleted', true));
- $this->redirect(array('action'=>'index'));
- }
- }
-
-}
-?>
\ No newline at end of file
'profileType' => __('Invalid Type.', true),
'publicFlag' => __('Incorrect value.', true),
'url' => __('Please input URL.', true),
+ 'validProfileId' => __('Invalid Profile.', true),
+ 'validProfileSelectId' => __('Invalid ProfileSelect.', true),
+ 'validProfiletableId' => __('Invalid ProfileTable.', true),
'validSystemId' => __('Invalid System.', true),
'validStatus' => __('Invalid Status.', true),
);
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
- )
- );
-
- var $hasAndBelongsToMany = array(
- 'CharactersHasProfiles' => array(
- 'className' => 'CharactersHasProfiles',
- 'joinTable' => 'characters_has_profiles',
+ ),
+ 'CharactersHasProfile' => array(
+ 'className' => 'CharactersHasProfile',
'foreignKey' => 'character_id',
- 'associationForeignKey' => 'profile_id',
- 'unique' => false,
- 'conditions' => array('CharactersHasProfiles.public_flag' => 'public'),
+ 'dependent' => false,
+ 'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
+ 'exclusive' => '',
'finderQuery' => '',
- 'deleteQuery' => '',
- 'insertQuery' => ''
+ 'counterQuery' => ''
)
);
var $name = 'CharactersHasProfile';
+ var $fields = array(
+ 'id' => array(
+ 'auto' => true,
+ ),
+ 'profile_id' => array(
+ 'auto' => true,
+ ),
+ 'profile_select_id' => array(
+ 'auto' => true,
+ ),
+ 'profile_table_id' => array(
+ 'auto' => true,
+ ),
+ 'value' => array(
+ 'auto' => false,
+ 'add' => true,
+ 'edit' => true,
+ 'escape' => array(
+ 'html' => true,
+ 'all' => true,
+ ),
+ ),
+ 'public_flag' => array(
+ 'auto' => false,
+ 'add' => true,
+ 'edit' => true,
+ ),
+ 'link_value' => array(
+ 'auto' => false,
+ 'add' => true,
+ 'edit' => true,
+ ),
+ );
+
+ var $validate = array(
+/* 'profile_id' => array(
+ 'validProfileId' => array(
+ 'rule' => 'validProfileId'
+ ),
+ ),
+ 'profile_select_id' => array(
+ 'validProfileSelectId' => array(
+ 'rule' => 'validProfileSelectId',
+ 'allowEmpty' => true,
+ ),
+ ),
+ 'profile_table_id' => array(
+ 'validProfiletableId' => array(
+ 'rule' => 'validProfiletableId',
+ 'allowEmpty' => true,
+ ),
+ ),*/
+ 'public_flag' => array(
+ 'publicFlag' => array(
+ 'rule' => 'publicFlag',
+ 'allowEmpty' => true,
+ ),
+ ),
+ 'link_value' => array(
+ 'url' => array(
+ 'rule' => 'url',
+ 'allowEmpty' => true,
+ ),
+ ),
+ );
+
+
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $belongsTo = array(
'Character' => array(
),
'ProfileSelects' => array(
'className' => 'ProfileSelects',
- 'foreignKey' => 'profile_selects_id',
+ 'foreignKey' => 'profile_select_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'ProfileTables' => array(
'className' => 'ProfileTables',
- 'foreignKey' => 'profile_tables_id',
+ 'foreignKey' => 'profile_table_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
+ /* Validation */
+ function validProfileId($data, $system_id)
+ {
+ return (bool)$this->Profile->find('count', array(
+ 'conditions' => array(
+ 'Profile.id' => $data['profile_id'],
+ 'Profile.system_id' => $system_id,
+ ),
+ 'recursive' => -1,
+ ));
+ }
+
+ function validProfileSelectId($data, $system_id)
+ {
+ return $this->Profile->ProfileSelect->find('count', array(
+ 'conditions' => array(
+ 'ProfileSelect.id' => $data['profile_select_id'],
+ 'Profile.system_id' => $system_id,
+ ),
+ ));
+ }
+
+ function validProfiletableId($data, $system_id)
+ {
+ return $this->Profile->ProfileTable->find('count', array(
+ 'conditions' => array(
+ 'ProfileTable.id' => $data['profile_table_id'],
+ 'Profile.system_id' => $system_id,
+ ),
+ ));
+ }
+
}
?>
\ No newline at end of file
'finderQuery' => '',
'counterQuery' => ''
),
- 'CharactersHasProfiles' => array(
- 'className' => 'CharactersHasProfiles',
+ 'CharactersHasProfile' => array(
+ 'className' => 'CharactersHasProfile',
'foreignKey' => 'profile_id',
'associationForeignKey' => 'id',
'dependent' => true,
)
);
+ var $hasMany = array(
+ 'CharactersHasProfile' => array(
+ 'className' => 'CharactersHasProfile',
+ 'foreignKey' => 'profile_select_id',
+ 'associationForeignKey' => 'id',
+ 'dependent' => true,
+ 'conditions' => '',
+ 'fields' => array('id', 'value', 'public_flag'),
+ 'order' => '',
+ 'limit' => 10,
+ 'offset' => '',
+ 'finderQuery' => '',
+ 'deleteQuery' => '',
+ 'insertQuery' => ''
+ )
+ );
+
/* コールバックメソッド */
function beforeSave($options = array())
{
)
);
+ var $hasMany = array(
+ 'CharactersHasProfile' => array(
+ 'className' => 'CharactersHasProfile',
+ 'foreignKey' => 'profile_table_id',
+ 'associationForeignKey' => 'id',
+ 'dependent' => true,
+ 'conditions' => '',
+ 'fields' => array('id', 'value', 'public_flag'),
+ 'order' => '',
+ 'limit' => 10,
+ 'offset' => '',
+ 'finderQuery' => '',
+ 'deleteQuery' => '',
+ 'insertQuery' => ''
+ )
+ );
+
/* validation Rule */
/* 同じProfileに同tablekey_nameは不可 */
);
echo $form->input('system_id', array(
'label' => __('System', true),
+ 'after' => $html->tag(
+ 'div',
+ __('No Editable', true),
+ array('class' => 'required')
+ )
)
);
echo $form->input('sort_order', array(
- 'label' => __('Sort Order', true)
+ 'label' => __('Order', true)
)
);
echo $select->create_status_select($status, 'status', array(
</tr>
<!-- Profiles -->
-<?php foreach($this->data['System']['Profile'] as $profile): ?>
+<?php
+//if (!empty($this->data['CharactersHasProfile'])) {
+// $profiles = $this->data['CharactersHasProfile'];
+//} else {
+ $profiles = $this->data['System']['Profile'];
+//}
+?>
+<?php foreach($profiles as $profile): ?>
<?php
$profiledisp->set_profile_type4view($profile);
?>
</th>
<td colspan="3"<?php if ($profiledisp->profile_type['is_table']): ?> class="table"<?php endif; ?>>
<?php
- $profiledisp->disp_forms4profile_type($profile, false, 0);
+ $profiledisp->disp_forms4profile_type($profile, false, 2, 0);
?>
</td>
</tr>
+++ /dev/null
-<div class="charactersHasProfiles form">
-<?php echo $form->create('CharactersHasProfile');?>
- <fieldset>
- <legend><?php __('Add CharactersHasProfile');?></legend>
- <?php
- echo $form->input('character_id');
- echo $form->input('profile_id');
- echo $form->input('profile_selects_id');
- echo $form->input('profile_tables_id');
- echo $form->input('value');
- echo $select->create_publicflag_select($public_flags, 'public_flag', array(
- 'label' => __('Public Flag', true)
- )
- );
- echo $form->input('link_value');
- ?>
- </fieldset>
-<?php echo $form->end('Submit');?>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('List CharactersHasProfiles', true), array('action' => 'index'));?></li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
+++ /dev/null
-<div class="charactersHasProfiles form">
-<?php echo $form->create('CharactersHasProfile');?>
- <fieldset>
- <legend><?php __('Add CharactersHasProfile');?></legend>
- <?php
- echo $form->input('character_id');
- echo $form->input('profile_id');
- echo $form->input('profile_selects_id');
- echo $form->input('profile_tables_id');
- echo $form->input('value');
- echo $select->create_publicflag_select($public_flags, 'public_flag', array(
- 'label' => __('Public Flag', true)
- )
- );
- echo $form->input('link_value');
- ?>
- </fieldset>
-<?php echo $form->end('Submit');?>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('List CharactersHasProfiles', true), array('action' => 'index'));?></li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
+++ /dev/null
-<div class="charactersHasProfiles form">
-<?php echo $form->create('CharactersHasProfile');?>
- <fieldset>
- <legend><?php __('Edit CharactersHasProfile');?></legend>
- <?php
- echo $form->input('id');
- echo $form->input('character_id');
- echo $form->input('profile_id');
- echo $form->input('profile_selects_id');
- echo $form->input('profile_tables_id');
- echo $form->input('value');
- echo $select->create_publicflag_select($public_flags, 'public_flag', array(
- 'label' => __('Public Flag', true)
- )
- );
- echo $form->input('link_value');
- ?>
- </fieldset>
-<?php echo $form->end('Submit');?>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('CharactersHasProfile.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('CharactersHasProfile.id'))); ?></li>
- <li><?php echo $html->link(__('List CharactersHasProfiles', true), array('action' => 'index'));?></li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
+++ /dev/null
-<div class="charactersHasProfiles index">
-<h2><?php __('CharactersHasProfiles');?></h2>
-<p>
-<?php
-echo $paginator->counter(array(
-'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
-));
-?></p>
-<table cellpadding="0" cellspacing="0">
-<tr>
- <th><?php echo $paginator->sort('id');?></th>
- <th><?php echo $paginator->sort('character_id');?></th>
- <th><?php echo $paginator->sort('profile_id');?></th>
- <th><?php echo $paginator->sort('profile_selects_id');?></th>
- <th><?php echo $paginator->sort('profile_tables_id');?></th>
- <th><?php echo $paginator->sort('value');?></th>
- <th><?php echo $paginator->sort('public_flag');?></th>
- <th><?php echo $paginator->sort('link_value');?></th>
- <th class="actions"><?php __('Actions');?></th>
-</tr>
-<?php
-$i = 0;
-foreach ($charactersHasProfiles as $charactersHasProfile):
- $class = null;
- if ($i++ % 2 == 0) {
- $class = ' class="altrow"';
- }
-?>
- <tr<?php echo $class;?>>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['id']; ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['Character']['name'], array('controller' => 'characters', 'action' => 'view', $charactersHasProfile['Character']['id'])); ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['Profile']['name'], array('controller' => 'profiles', 'action' => 'view', $charactersHasProfile['Profile']['id'])); ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['ProfileSelects']['id'], array('controller' => 'profile_selects', 'action' => 'view', $charactersHasProfile['ProfileSelects']['id'])); ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['ProfileTables']['title'], array('controller' => 'profile_tables', 'action' => 'view', $charactersHasProfile['ProfileTables']['id'])); ?>
- </td>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['value']; ?>
- </td>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['public_flag']; ?>
- </td>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['link_value']; ?>
- </td>
- <td class="actions">
- <?php echo $html->link(__('View', true), array('action' => 'view', $charactersHasProfile['CharactersHasProfile']['id'])); ?>
- <?php echo $html->link(__('Edit', true), array('action' => 'edit', $charactersHasProfile['CharactersHasProfile']['id'])); ?>
- <?php echo $html->link(__('Delete', true), array('action' => 'delete', $charactersHasProfile['CharactersHasProfile']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $charactersHasProfile['CharactersHasProfile']['id'])); ?>
- </td>
- </tr>
-<?php endforeach; ?>
-</table>
-</div>
-<div class="paging">
- <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
- | <?php echo $paginator->numbers();?>
- <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('New CharactersHasProfile', true), array('action' => 'add')); ?></li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
+++ /dev/null
-<div class="charactersHasProfiles view">
-<h2><?php __('CharactersHasProfile');?></h2>
- <dl><?php $i = 0; $class = ' class="altrow"';?>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['id']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Character'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['Character']['name'], array('controller' => 'characters', 'action' => 'view', $charactersHasProfile['Character']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Profile'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['Profile']['name'], array('controller' => 'profiles', 'action' => 'view', $charactersHasProfile['Profile']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Profile Selects'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['ProfileSelects']['id'], array('controller' => 'profile_selects', 'action' => 'view', $charactersHasProfile['ProfileSelects']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Profile Tables'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['ProfileTables']['title'], array('controller' => 'profile_tables', 'action' => 'view', $charactersHasProfile['ProfileTables']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Value'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['value']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Public Flag'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['public_flag']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Link Value'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['link_value']; ?>
-
- </dd>
- </dl>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('Edit CharactersHasProfile', true), array('action' => 'edit', $charactersHasProfile['CharactersHasProfile']['id'])); ?> </li>
- <li><?php echo $html->link(__('Delete CharactersHasProfile', true), array('action' => 'delete', $charactersHasProfile['CharactersHasProfile']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $charactersHasProfile['CharactersHasProfile']['id'])); ?> </li>
- <li><?php echo $html->link(__('List CharactersHasProfiles', true), array('action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New CharactersHasProfile', true), array('action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
+++ /dev/null
-<div class="charactersHasProfiles form">
-<?php echo $form->create('CharactersHasProfile');?>
- <fieldset>
- <legend><?php __('Edit CharactersHasProfile');?></legend>
- <?php
- echo $form->input('id');
- echo $form->input('character_id');
- echo $form->input('profile_id');
- echo $form->input('profile_selects_id');
- echo $form->input('profile_tables_id');
- echo $form->input('value');
- echo $select->create_publicflag_select($public_flags, 'public_flag', array(
- 'label' => __('Public Flag', true)
- )
- );
- echo $form->input('link_value');
- ?>
- </fieldset>
-<?php echo $form->end('Submit');?>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('CharactersHasProfile.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('CharactersHasProfile.id'))); ?></li>
- <li><?php echo $html->link(__('List CharactersHasProfiles', true), array('action' => 'index'));?></li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
+++ /dev/null
-<div class="charactersHasProfiles index">
-<h2><?php __('CharactersHasProfiles');?></h2>
-<p>
-<?php
-echo $paginator->counter(array(
-'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
-));
-?></p>
-<table cellpadding="0" cellspacing="0">
-<tr>
- <th><?php echo $paginator->sort('id');?></th>
- <th><?php echo $paginator->sort('character_id');?></th>
- <th><?php echo $paginator->sort('profile_id');?></th>
- <th><?php echo $paginator->sort('profile_selects_id');?></th>
- <th><?php echo $paginator->sort('profile_tables_id');?></th>
- <th><?php echo $paginator->sort('value');?></th>
- <th><?php echo $paginator->sort('public_flag');?></th>
- <th><?php echo $paginator->sort('link_value');?></th>
- <th class="actions"><?php __('Actions');?></th>
-</tr>
-<?php
-$i = 0;
-foreach ($charactersHasProfiles as $charactersHasProfile):
- $class = null;
- if ($i++ % 2 == 0) {
- $class = ' class="altrow"';
- }
-?>
- <tr<?php echo $class;?>>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['id']; ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['Character']['name'], array('controller' => 'characters', 'action' => 'view', $charactersHasProfile['Character']['id'])); ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['Profile']['name'], array('controller' => 'profiles', 'action' => 'view', $charactersHasProfile['Profile']['id'])); ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['ProfileSelects']['id'], array('controller' => 'profile_selects', 'action' => 'view', $charactersHasProfile['ProfileSelects']['id'])); ?>
- </td>
- <td>
- <?php echo $html->link($charactersHasProfile['ProfileTables']['title'], array('controller' => 'profile_tables', 'action' => 'view', $charactersHasProfile['ProfileTables']['id'])); ?>
- </td>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['value']; ?>
- </td>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['public_flag']; ?>
- </td>
- <td>
- <?php echo $charactersHasProfile['CharactersHasProfile']['link_value']; ?>
- </td>
- <td class="actions">
- <?php echo $html->link(__('View', true), array('action' => 'view', $charactersHasProfile['CharactersHasProfile']['id'])); ?>
- <?php echo $html->link(__('Edit', true), array('action' => 'edit', $charactersHasProfile['CharactersHasProfile']['id'])); ?>
- <?php echo $html->link(__('Delete', true), array('action' => 'delete', $charactersHasProfile['CharactersHasProfile']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $charactersHasProfile['CharactersHasProfile']['id'])); ?>
- </td>
- </tr>
-<?php endforeach; ?>
-</table>
-</div>
-<div class="paging">
- <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
- | <?php echo $paginator->numbers();?>
- <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('New CharactersHasProfile', true), array('action' => 'add')); ?></li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
+++ /dev/null
-<div class="charactersHasProfiles view">
-<h2><?php __('CharactersHasProfile');?></h2>
- <dl><?php $i = 0; $class = ' class="altrow"';?>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['id']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Character'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['Character']['name'], array('controller' => 'characters', 'action' => 'view', $charactersHasProfile['Character']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Profile'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['Profile']['name'], array('controller' => 'profiles', 'action' => 'view', $charactersHasProfile['Profile']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Profile Selects'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['ProfileSelects']['id'], array('controller' => 'profile_selects', 'action' => 'view', $charactersHasProfile['ProfileSelects']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Profile Tables'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $html->link($charactersHasProfile['ProfileTables']['title'], array('controller' => 'profile_tables', 'action' => 'view', $charactersHasProfile['ProfileTables']['id'])); ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Value'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['value']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Public Flag'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['public_flag']; ?>
-
- </dd>
- <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Link Value'); ?></dt>
- <dd<?php if ($i++ % 2 == 0) echo $class;?>>
- <?php echo $charactersHasProfile['CharactersHasProfile']['link_value']; ?>
-
- </dd>
- </dl>
-</div>
-<div class="actions">
- <ul>
- <li><?php echo $html->link(__('Edit CharactersHasProfile', true), array('action' => 'edit', $charactersHasProfile['CharactersHasProfile']['id'])); ?> </li>
- <li><?php echo $html->link(__('Delete CharactersHasProfile', true), array('action' => 'delete', $charactersHasProfile['CharactersHasProfile']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $charactersHasProfile['CharactersHasProfile']['id'])); ?> </li>
- <li><?php echo $html->link(__('List CharactersHasProfiles', true), array('action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New CharactersHasProfile', true), array('action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Characters', true), array('controller' => 'characters', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Character', true), array('controller' => 'characters', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profiles', true), array('controller' => 'profiles', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile', true), array('controller' => 'profiles', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Selects', true), array('controller' => 'profile_selects', 'action' => 'add')); ?> </li>
- <li><?php echo $html->link(__('List Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'index')); ?> </li>
- <li><?php echo $html->link(__('New Profile Tables', true), array('controller' => 'profile_tables', 'action' => 'add')); ?> </li>
- </ul>
-</div>
var $profile_type = array();
+ var $character_has_profile_num = 0;
+
/**
* profile_typeの設定をview表示形式に変換
*/
if ($profile['profile_type'] == 'textarea') {
$option['type'] = 'textarea';
+ } else {
+ $option['type'] = 'text';
}
$option = array_merge(array(
), $option
);
- echo $this->Form->input($profile['key_name'], $option);
+ $profile_tag =
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.value', $option).
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.profile_id', array(
+ 'type' => 'hidden',
+ 'value' => $profile['id'],
+ ));
+
+ echo $profile_tag;
+ $this->character_has_profile_num++;
}
/* profile_selectsの設定をプルダウンで出力 */
$option
);
- echo $this->Form->input('ProfileSelect.'.$profile_selects[0]['profile_id'].'.profile_type', $option);
+ $profile_select_tag =
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.value', $option).
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.profile_id', array(
+ 'type' => 'hidden',
+ 'value' => $profile_selects[0]['profile_id'],
+ )).
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.profile_select_id', array(
+ 'type' => 'hidden',
+ 'value' => $profile_selects[0]['id'],
+ ));
+ echo $profile_select_tag;
+ $this->character_has_profile_num++;
}
/* profile_selectsの設定をラジオボタンで出力 */
/* profile_selectsの設定をチェックボックスで出力 */
function disp_checkbox4profile_selects($profile_selects, $label = false, $legend = false)
{
- $this->disp_select4profile_selects(
- $profile_selects,
- array(
- 'multiple' => 'checkbox',
- 'label' => $label,
- 'legend' => $legend,
- 'div' => array(
- 'class' => 'input checkbox inline'
- ),
- )
- );
+ if (empty($profile_selects)) {
+ return null;
+ }
+
+ foreach($profile_selects as $v) {
+ $profile_select[0] = $v;
+ $this->disp_select4profile_selects(
+ $profile_select,
+ array(
+ 'multiple' => 'checkbox',
+ 'label' => $label,
+ 'legend' => $legend,
+ 'div' => array(
+ 'class' => 'input checkbox inline'
+ ),
+ )
+ );
+ }
}
/* profile_tablesの設定からtableHeadersを出力 */
}
$forms = array();
- foreach ($profile_tables as $v) {
- $forms[] = $this->Form->input('ProfileTable.'.$v['id'], array(
- 'type' => 'text',
- 'label' => false,
- 'class' => array($v['tablekey_name'])
- ));
+ foreach ($profile_tables as $k => $v) {
+ $forms[] =
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.value', array(
+ 'type' => 'text',
+ 'label' => false,
+ )).
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.profile_id', array(
+ 'type' => 'hidden',
+ 'value' => $v['profile_id'],
+ )).
+ $this->Form->input('CharactersHasProfile.'.$this->character_has_profile_num.'.profile_table_id', array(
+ 'type' => 'hidden',
+ 'value' => $v['id'],
+ ));
+ $this->character_has_profile_num++;
}
$this->disp_td4characters_has_profiles($forms, $tr_options, $td_options);
/* profile_typeの設定に応じてフォーム表示
* set_profile_type4view($profile)チェック済み前提。
*/
- function disp_forms4profile_type($profile, $admin = false, $table_blank = 2)
+ function disp_forms4profile_type($profile, $admin = false, $form_num = 2, $table_blank = 2)
{
if ($this->profile_type['is_select'] || $this->profile_type['is_radio'] || $this->profile_type['is_checkbox']) {
if ($this->profile_type['is_select']) {
} elseif ($this->profile_type['is_table']) {
echo '<table>';
$this->disp_th4profile_tables($profile['ProfileTable']);
- $this->disp_form4profile_tables($profile['ProfileTable']);
- if (intval($table_blank) && empty($profile['CharacterHasProfile'])) {
+ if (empty($profile['CharacterHasProfile'])) {
echo '<tbody>';
- $this->disp_blank_td4profile_tables($profile['ProfileTable'], intval($table_blank));
+ if (intval($form_num) > 0) {
+ for ($i=0; $i<$form_num; $i++) {
+ $this->disp_form4profile_tables($profile['ProfileTable']);
+ }
+ }
+ if (intval($table_blank) > 0) {
+ $this->disp_blank_td4profile_tables($profile['ProfileTable'], intval($table_blank));
+ }
echo '</tbody>';
}
-
echo '</table>';
if ($admin === true) {
echo '<div class="edit_link">'.$this->Html->link(__('Edit Table', true), array('controller' => 'profile_tables', 'action' => 'admin_listview', $profile['id'])).'</div>';
<?php echo __('ID', true);?>
</th>
<th>
- <?php echo __('Sort Order');?>
+ <?php echo __('Order');?>
</th>
<th colspan="6">
<?php echo __('Detail');?>
<tr>
<td colspan="6"<?php if($profiledisp->profile_type['is_table']): ?> class="table"<?php endif; ?>>
<?php
- $profiledisp->disp_forms4profile_type($profile, true, 0);
+ $profiledisp->disp_forms4profile_type($profile, true, 1, 0);
?>
</td>
</tr>
</td>
<td<?php if($profiledisp->profile_type['is_table']): ?> class="table"<?php endif; ?>>
<?php
- $profiledisp->disp_forms4profile_type($profile, false, 0);
+ $profiledisp->disp_forms4profile_type($profile, false, 1, 0);
?>
</td>
</tr>
td.table table {
padding: 0;
margin: 0;
+ border-top: 0 none;
border-bottom: 0 none;
}
td.table th,
td.table td
{
- border-top: 0 none;
}
.blank {
min-height: 1em;