OSDN Git Service

キャラクター一覧の画像表示切換え
authorCake <cake_67@users.sourceforge.jp>
Wed, 18 Aug 2010 08:11:58 +0000 (17:11 +0900)
committerCake <cake_67@users.sourceforge.jp>
Wed, 18 Aug 2010 08:11:58 +0000 (17:11 +0900)
app/locale/jpn/LC_MESSAGES/default.po
app/models/site_config.php
app/views/elements/character_index.ctp
app/views/site_configs/admin_edit.ctp

index c475fee..305d730 100644 (file)
@@ -844,7 +844,7 @@ msgstr "画像追加"
 #: /views/characters/admin_index.ctp:34
 #: /views/characters/index.ctp:34
 msgid "Picture"
-msgstr "キャラクター画像"
+msgstr "画像"
 
 #: /views/character_pictures/add.ctp:23
 #: /views/character_pictures/edit.ctp:20
@@ -1970,6 +1970,14 @@ msgid "Not Required"
 msgstr "不要"
 
 #: /views/site_configs/admin_edit.ctp:
+msgid "Information"
+msgstr "お知らせ設定"
+
+#: /views/site_configs/admin_edit.ctp:
+msgid "Site Description"
+msgstr "サイト紹介"
+
+#: /views/site_configs/admin_edit.ctp:
 msgid "Single System"
 msgstr "単一システム"
 
@@ -2030,6 +2038,18 @@ msgid "Maximum number of pictures for one character."
 msgstr "1キャラクターに設定可能な最大画像枚数"
 
 #: /views/site_configs/admin_edit.ctp:101
+msgid "Show Image at listview"
+msgstr "一覧画像表示"
+
+#: /views/site_configs/admin_edit.ctp:101
+msgid "String"
+msgstr "文字表示"
+
+#: /views/site_configs/admin_edit.ctp:101
+msgid "None"
+msgstr "なし"
+
+#: /views/site_configs/admin_edit.ctp:101
 msgid "Full-length View"
 msgstr "立ち絵表示設定"
 
index 251b5ab..d463417 100644 (file)
@@ -69,6 +69,14 @@ class SiteConfig extends AppModel {
                        'id' => null,
                        'value' => 8
                ),
+               'Character.listImage' => array(
+                       'id' => null,
+                       'value' => 2
+               ),
+               'Character.listImageString' => array(
+                       'id' => null,
+                       'value' => '\81\99'
+               ),
                'Character.fullLengthView' => array(
                        'id' => null,
                        'value' => 0
index 3bd2c54..d3b09df 100644 (file)
@@ -58,7 +58,9 @@ echo $paginator->counter(array(
 <tr>
        <th><?php echo $paginator->sort('id');?></th>
        <th><?php echo $paginator->sort('name');?></th>
+<?php if ($site_configs['Character.listImage']['value'] == 2 || $site_configs['Character.listImage']['value'] == 1): ?>
        <th><?php __('Picture');?></th>
+<?php endif; ?>
 <?php if (!isset($this_system) && !$site_configs['System.singleSystem']['value']): ?>
        <th><?php echo $paginator->sort('system_id');?></th>
 <?php endif; ?>
@@ -88,14 +90,16 @@ foreach ($characters as $character):
 <span class="publicFlag"><?php echo $select->get_i18n_unpublic_flag($character['Character']['public_flag'], $public_flags) ?></span>
 <?php endif; ?>
 </td>
+<?php if ($site_configs['Character.listImage']['value'] == 2 || $site_configs['Character.listImage']['value'] == 1): ?>
 <td class="center">
+<?php if ($site_configs['Character.listImage']['value'] == 2): ?>
 <?php
        $picture = $this->renderElement('character_picture_image', array(
                'basename' => $character['Character']['main_picture'],
                'options' => array(
                        'previewVersion' => 's',
                        'class' => '',
-                       'url' => array('controller' => 'characters', 'action' => 'view', $character['Character']['id']),
+                       'url' => array('controller' => 'character_pictures', 'action' => 'listview', $character['Character']['id']),
                        'alternative' => '',
                        'nodata' => '',
                )
@@ -103,7 +107,11 @@ foreach ($characters as $character):
 
        echo $html->div('attachments', $picture);
 ?>
+<?php elseif ($site_configs['Character.listImage']['value'] == 1 && !empty($character['Character']['main_picture'])): ?>
+<?php echo $html->link($site_configs['Character.listImageString']['value'], array('controller' => 'character_pictures', 'action' => 'listview', $character['Character']['id']), array(), false, false); ?>
+<?php endif; ?>
 </td>
+<?php endif; ?>
 <?php 
        $character_list_url = array(
                'controller' => 'characters', 
index aa775ae..756b956 100644 (file)
@@ -187,6 +187,23 @@ echo $html->div('submit',
 </tr>
 
 <tr>
+<th><?php echo __('Show Image at listview') ?></th>
+<td id="Character_listImage" class="sizeInput">
+<div class="input text inline">
+<div><input name="data[SiteConfig][Character.listImage][value]" type="radio" value="2"<?php if ($this->data['SiteConfig']['Character.listImage']['value'] == 2): ?> checked="checked"<?php endif; ?>><?php __('Picture') ?></div>
+<div><input name="data[SiteConfig][Character.listImage][value]" type="radio" value="1"<?php if ($this->data['SiteConfig']['Character.listImage']['value'] == 1): ?> checked="checked"<?php endif; ?>><?php __('String') ?>
+<input name="data[SiteConfig][Character.listImageString][value]" type="text" value="<?php echo $this->data['SiteConfig']['Character.listImageString']['value']; ?>"></div>
+<div>
+<input name="data[SiteConfig][Character.listImage][value]" type="radio" value="0"<?php if (empty($this->data['SiteConfig']['Character.listImage']['value'])): ?> checked="checked"<?php endif; ?>><?php __('None') ?></div>
+</div>
+<div class="input text inline">
+<input name="data[SiteConfig][Character.listImage][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Character.listImage']['id'];?>">
+<input name="data[SiteConfig][Character.listImageString][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Character.listImageString']['id'];?>">
+</div>
+</td>
+</tr>
+
+<tr>
 <th><?php echo __('Full-length View') ?></th>
 <td id="Character_fullLengthView">
 <div class="explanation"><?php __('Do you show the Full-length Picture on the default character sheet?') ?></div>