return false;
}
+ function checkEditOtherSystem($system_id = null)
+ {
+ if ($this->isOtherSystem($system_id)) {
+ $this->Session->setFlash(__('Other System cannot have ANY PROFILE SETTINGS.', true));
+ $this->redirect(array('controller' => 'systems', 'action'=>'view', $system_id));
+ }
+ }
+ function isOtherSystem($system_id = null)
+ {
+ if (empty($system_id)) {
+ return false;
+ }
+
+ if (empty($this->site_configs['System.otherSetting']['value']) || $this->site_configs['System.otherSetting']['value'] != $system_id) {
+ return false;
+ }
+
+ return true;
+ }
+
}
/*
// Systemチェック
// Systemあり
if (isset($character['System']) && !empty($character['System'])) {
+ // 「その他」設定
+ if ($this->isOtherSystem($character['System']['id'])) {
+ $this->set('isChange', true);
// 公開状態は変更不可
- if ($this->check_public_flag($character['System'])) {
+ } elseif ($this->check_public_flag($character['System'])) {
$this->redirect(array('action'=>'edit', $id));
// System非公開
} else {
$this->redirect(array('controller' => 'systems', 'action'=>'admin_index'));
}
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($profile['Profile']['system_id']);
+
if (isset($this->data['ProfileSelect']) || !empty($this->data['ProfileSelect'])) {
$error = false;
$this->redirect(array('controller'=>'systems', 'action'=>'admin_index'));
}
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($profileTable['Profile']['system_id']);
+
foreach ($profileTable['ProfileTableStatic'] as $k => $v) {
if (isset($v['sort_order']) && !empty($v['sort_order'])) {
$sort_order[$k] = $v['sort_order'];
$this->redirect(array('controller' => 'systems', 'action'=>'admin_index'));
}
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($profile['Profile']['system_id']);
+
$newdata = array(
'title' => null,
'tablekey_name' => null,
}
}
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($system_id);
+
$data['system_id'] = $system_id;
if (!$this->Profile->validSystemId($data, false)) {
$this->Session->setFlash(__('Invalid System.', true));
}
$old_profile_type = $profile['Profile']['profile_type'];
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($profile['Profile']['system_id']);
+
if (!empty($this->data)) {
$new_profile_type = $this->data['Profile']['profile_type'];
unset($this->data['CharactersHasProfile']);
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($system_id);
+
$error = false;
foreach ($this->data['Profile'] as $id => $v) {
if ($id == '__Token') {
$this->redirect(array('controller' => 'systems', 'action'=>'admin_index'));
}
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($system_id);
+
unset($this->Profile->System->hasMany['Profile']['fields']);
$system = $this->Profile->System->find('first', array(
'conditions' => array(
$this->redirect(array('controller' => 'systems', 'action'=>'admin_index'));
}
+ // 「その他」システム設定
+ $this->checkEditOtherSystem($system_id);
+
$system = $this->Profile->System->find('first', array(
'conditions' => array(
'System.id' => $system_id,
}
}
-?>
\ No newline at end of file
+
msgid "No System."
msgstr "システムが存在しません。"
+msgid "Other System cannot have ANY PROFILE SETTINGS."
+msgstr "「その他」システムにはプロフィール設定を作成できません。"
+
#: /controllers/users_controller.php:79;83;206;210
#: /views/elements/admin_character_sidenav.ctp:36
#: /views/elements/admin_system_sidenav.ctp:31
msgid "%s Change System"
msgstr "%sのシステムを変更"
+msgid "Change System"
+msgstr "システム変更"
+
+msgid "You can select New System."
+msgstr "システムを「その他」から変更できます。"
+
+msgid "Notice! Once you have changed from OTHER SYSTEM, you CANNOT changed again."
+msgstr "ただし、一度「その他」の設定から他に変更すると、再度別のシステムに変更する事は、基本的にできません。"
+
#: /views/characters/edit.ctp:2
msgid "Edit %s"
msgstr "%s 編集"
msgid "Allow User Character-sheet"
msgstr "一般ユーザによるキャラクターシート表示スキン追加"
+msgid "Id of OTHER Setting System"
+msgstr "「その他」設定のシステムID"
+
#: /views/site_configs/admin_edit.ctp:
msgid "Single System"
msgstr "単一システム"
'value' => '1000'
),
- 'System.singleSystem' => array(
+ 'System.allowUserSheet' => array(
'id' => null,
'value' => 0
),
-
- 'System.allowUserSheet' => array(
+ 'System.otherSetting' => array(
'id' => null,
'value' => 0
),
+ 'System.singleSystem' => array(
+ 'id' => null,
+ 'value' => ''
+ ),
'Design.customCss' => array(
'id' => null,
?>
+<?php if (empty($site_configs['System.otherSetting']['value']) || $site_configs['System.otherSetting']['value'] != $character['System']['id']) : ?>
<?php
echo $html->div('notice',
__('Previous System is unpubic or deleted. You can select New system.', true)
);
?>
<?php endif; ?>
+<?php else: ?>
+<?php
+ echo $html->div('notice',
+ __('You can select New System.', true)
+ );
+ ?>
+
+<?php
+ echo $html->div('notice',
+ __('Notice! Once you have changed from OTHER SYSTEM, you CANNOT changed again.', true)
+ );
+ ?>
+<?php endif; ?>
<fieldset>
<legend>
'action' => 'view',
$character['Character']['id']
), array('escape' => false), false
- );
+ ));
?>
</legend>
<?php
'SystemName',
$this->data['System']['name']
);
+
+ if (!empty($site_configs['System.otherSetting']['value']) && $site_configs['System.otherSetting']['value'] == $this->data['Character']['system_id']) {
+ echo $html->div(
+ 'link',
+ $html->link(__('Change System', true), array(
+ 'action' => 'change_system',
+ $this->data['Character']['id'],
+ ))
+ );
+ }
+
?>
</td>
<td>
</tr>
<tr>
+<th><?php echo __('Id of OTHER Setting System') ?></th>
+<td id="System_otherSetting">
+<input name="data[SiteConfig][System.otherSetting][value]" type="text" value="<?php echo $this->data['SiteConfig']['System.otherSetting']['value'];?>" style="ime-mode:inactive;">
+<input name="data[SiteConfig][System.otherSetting][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['System.otherSetting']['id'];?>">
+</td>
+</tr>
+
+<tr>
<th><?php echo __('Single System') ?></th>
<td id="System_singleSystem">
<?php echo $html->div('caption', __('Use the only one System. Make the system before setting.', true)); ?>
?>
</div>
+<?php if (empty($site_configs['System.otherSetting']['value']) || $site_configs['System.otherSetting']['value'] != $system['System']['id']) : ?>
<div class="profiles">
<div class="box">
<div class="boxHeader"><h3>
<?php // echo $html->div('', ' * '. __('Import is available only No Profiles.', true)); ?>
</div>
</div>
+</div>
+<?php endif; ?>
</div>
\ No newline at end of file