`name` VARCHAR(255) NOT NULL,
`sort_order` INTEGER UNSIGNED NOT NULL DEFAULT '0',
`url` TEXT NOT NULL,
+ `copyright` TEXT NOT NULL,
`set_npc` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`public_flag` ENUM('public','private') NOT NULL DEFAULT 'public',
`detail` TEXT NOT NULL,
/* システム情報取得 */
- function _restore_html_system($data, $nl2br = false) {
+ function _restore_html_system($data) {
if (isset($data['System']['name']) && !empty($data['System']['name'])) {
$data['System']['name'] = $this->{$this->modelClass}->restore_html($data['System']['name'], false, false, false);
}
+ if (isset($data['System']['copyright']) && !empty($data['System']['copyright'])) {
+ $data['System']['copyright'] = $this->{$this->modelClass}->restore_html($data['System']['copyright']);
+ }
if (isset($data['System']['url']) && !empty($data['System']['url'])) {
$data['System']['url'] = $this->{$this->modelClass}->restore_html($data['System']['url'], false, false, false);
}
$this->Session->setFlash(__('Invalid System.', true));
$this->redirect(array('controller' => 'systems', 'action' => 'index'));
}
+ $this_system = $this->_restore_html_system($this_system);
$this->set('this_system', $this_system);
} else {
#: /views/systems/admin_add.ctp:44
#: /views/systems/admin_edit.ctp:51
+msgid "Copy Right"
+msgstr "著作権表示"
+
+#: /views/systems/admin_add.ctp:44
+#: /views/systems/admin_edit.ctp:51
+msgid "HTML tag OK."
+msgstr "HTMLタグ使用可"
+
+#: /views/systems/admin_add.ctp:44
+#: /views/systems/admin_edit.ctp:51
msgid "Use NPC"
msgstr "NPC設定を使う"
'fields' => array(
'System.id',
'System.name',
- 'System.public_flag'
+ 'System.public_flag',
+ 'System.copyright',
),
),
'User' => array(
var $name = 'System';
var $fields = array(
- 'add' => array('name', 'sort_order', 'url', 'set_npc', 'public_flag', 'detail'),
- 'edit' => array('name', 'sort_order', 'url', 'set_npc', 'public_flag', 'detail'),
+ 'add' => array('name', 'sort_order', 'url', 'copyright', 'set_npc', 'public_flag', 'detail'),
+ 'edit' => array('name', 'sort_order', 'url', 'copyright', 'set_npc', 'public_flag', 'detail'),
'image' => array(
'user_id',
'model',
'html' => true,
'all' => true,
),
+ 'copyright' => array(
+ 'html' => false,
+ 'images' => true,
+ 'sctipts' => true,
+ ),
'detail' => array(
'html' => true,
'images' => true,
<?php endif; ?>
<div id="footer">
+
+<?php
+if (isset($character['System']['copyright'])) {
+ $copyright = $character['System']['copyright'];
+} elseif (isset($system['System']['copyright'])) {
+ $copyright = $system['System']['copyright'];
+} elseif (isset($this_system['System']['copyright'])) {
+ $copyright = nl2br($this_system['System']['copyright']);
+} else {
+ $copyright = null;
+}
+?>
+<?php if (!empty($copyright)): ?>
+<?php echo $html->div('systemCopyright', $copyright); ?>
+<?php endif; ?>
+
<?php
echo $this->renderElement('version',
array(
'type' => 'text',
'label' => 'URL',
));
+ echo $form->input('copyright', array(
+ 'label' => __('Copy Right', true),
+ 'after' => $html->tag('div',
+ __('HTML tag OK.', true),
+ array('class' => 'attention')
+ )
+ ));
echo $select->create_publicflag_select($public_flags, 'public_flag', array(
'label' => __('Public Flag', true),
'selected' => 'public',
'type' => 'text',
'label' => 'URL',
));
+ echo $form->input('copyright', array(
+ 'label' => __('Copy Right', true),
+ 'after' => $html->tag('div',
+ __('HTML tag OK.', true),
+ array('class' => 'attention')
+ )
+ ));
echo $select->create_publicflag_select($public_flags, 'public_flag', array(
'label' => __('Public Flag', true),
'after' => $html->tag(
)
);
- $footer = '<ul>'.
+ $footer = $html->tag(
+ 'blockquote',
+ $system['System']['copyright'],
+ array(
+ 'class' => 'systemCopyright',
+ )
+ );
+ $footer .= '<ul>'.
'<li>'.$html->link(__('Edit System', true), array('action' => 'edit', $system['System']['id'])).'</li>'.
'<li>'.$html->link(__('Delete System', true), array('action' => 'delete', $system['System']['id'])).'</li>'.
'</ul>';
);
}
}
- $footer = '<div class="actions"><ul>'.
-
- '</ul></div>';
echo $this->renderElement('box', array(
'header' =>$header,
dl#ArchiveList dd.title {
margin-left: 12em;
}
+
+/* システム著作権表示 */
+.systemCopyright {
+ font-size: 90%;
+ padding-left: 15px;
+ margin-bottom: 10px;
+}