RSS 모듈 재정비

This commit is contained in:
conory 2017-09-02 21:42:24 +09:00
parent cc21af669f
commit 2440058557
27 changed files with 613 additions and 764 deletions

View file

@ -12,58 +12,54 @@
<input type="hidden" name="xe_validator_id" value="modules/rss/tpl/rss_admin_index/1" />
<div class="x_control-group">
<div class="x_control-label">{$lang->url}</div>
<div class="x_controls" style="padding-top:5px"><a href="{$total_config->url}" target="_blank">{$total_config->url}</a></div>
<div class="x_controls" style="padding-top:5px"><a href="{$general_rss_url}" target="_blank">{$general_rss_url}</a></div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->total_feed}</label>
<div class="x_controls">
<label class="x_inline">
<input type="radio" name="use_total_feed" value="Y" id="use_total_feed_yes" checked="checked"|cond="!$total_config->use_total_feed || $total_config->use_total_feed == 'Y'" /> {$lang->use}
<input type="radio" name="use_total_feed" value="Y" id="use_total_feed_yes" checked="checked"|cond="$config->use_total_feed == 'Y'" /> {$lang->use}
</label>
<label class="x_inline">
<input type="radio" name="use_total_feed" value="N" id="use_total_feed_no" checked="checked"|cond="$total_config->use_total_feed == 'N'" /> {$lang->notuse}
<input type="radio" name="use_total_feed" value="N" id="use_total_feed_no" checked="checked"|cond="$config->use_total_feed == 'N'" /> {$lang->notuse}
</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="feed_title">{$lang->title}</label>
<div class="x_controls">
<input type="text" name="feed_title" value="{htmlspecialchars($total_config->feed_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" id="feed_title" />
<input type="text" name="feed_title" value="{escape($config->feed_title)}" id="feed_title" />
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="feed_description">{$lang->description}</label>
<div class="x_controls">
<textarea name="feed_description" id="feed_description" rows="4" cols="42" style="float:left;margin-right:8px">{$total_config->feed_description}</textarea>
<textarea name="feed_description" id="feed_description" rows="4" cols="42" style="float:left;margin-right:8px">{$config->feed_description}</textarea>
<p class="x_help-block">{$lang->about_feed_description}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="image">{$lang->feed_image}</label>
<div class="x_controls">
<!--@if($total_config->image)-->
<div class="_rss_image_container">
<div class="x_thumbnail" cond="$total_config->image" style="display:inline-block;margin:0 0 5px 0">
<img src="../../../{$total_config->image}" alt="image" style="max-width:210px;max-height:150px" />
<input type="button" class="_delete_rss_image x_icon-remove" value="{$lang->cmd_delete}" style="width:14px" />
<div class="_rss_image_container" cond="$config->image">
<div class="x_thumbnail" style="display:inline-block;margin:0 0 5px 0">
<img src="{$config->image_url}" alt="image" style="max-width:210px;max-height:150px" />
<input type="button" class="_delete_rss_image x_icon-remove" value="{$lang->cmd_delete}" style="width:14px" />
</div>
</div>
</div>
<!--@end-->
<p><input type="file" name="image" value="" id="image" /></p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="feed_copyright">{$lang->feed_copyright}</label>
<div class="x_controls">
<input type="text" name="feed_copyright" value="{htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" id="feed_copyright" />
<input type="text" name="feed_copyright" value="{escape($config->feed_copyright)}" id="feed_copyright" />
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="feed_document_count">{$lang->feed_document_count}</label>
<div class="x_controls">
<input type="number" min="1" max="100" name="feed_document_count" value="{$total_config->feed_document_count}" id="feed_document_count" />
<input type="number" min="1" max="100" name="feed_document_count" value="{$config->feed_document_count}" id="feed_document_count" />
</div>
</div>
<div class="btnArea x_clearfix">
@ -77,6 +73,7 @@
<input type="hidden" name="act" value="procRssAdminInsertModuleConfig" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', $module, 'act', 'dispRssAdminIndex')}" />
<input type="hidden" name="xe_validator_id" value="modules/rss/tpl/rss_admin_index/1" />
<table class="x_table x_table-striped x_table-hover" style="border-top:0;margin-top:0">
<thead>
<tr>
@ -87,27 +84,33 @@
</tr>
</thead>
<tbody>
<tr loop="$feed_config => $key,$value">
<th cond="!$value['url']">
{$value['mid']}
</th>
<th cond="$value['url']">
<a href="{$value['url']}" target="_blank">{$value['mid']}</a>
</th>
<td class="title">{$value['feed_description']}<textarea name="feed_description[{$key}]" hidden>{$value['feed_description']}</textarea></td>
<tr loop="$rss_list => $module_srl,$module_config">
<td>
<label class="x_inline" loop="$lang->open_rss_types => $key2,$value2"><input type="radio" name="open_rss[{$key}]" value="{$key2}" checked="checked"|cond="$key2 == $value['open_feed']" /> {$value2}</label>
<a href="{$module_config->url}" target="_blank">{$module_config->mid}</a>
</td>
<td class="title">
<textarea name="feed_description[{$module_srl}]">{escape($module_config->feed_description)}</textarea>
</td>
<td>
<label class="x_inline"><input type="radio" name="open_total_feed[{$key}]" value="N" checked="checked"|cond="$value['open_total_feed'] != 'T_N'" /> {$lang->use}</label>
<label class="x_inline"><input type="radio" name="open_total_feed[{$key}]" value="T_N" checked="checked"|cond="$value['open_total_feed'] == 'T_N'" /> {$lang->notuse}</label>
<label class="x_inline" loop="$lang->open_rss_types => $key,$value">
<input type="radio" name="open_rss[{$module_srl}]" value="{$key}" checked="checked"|cond="$module_config->open_feed == $key" /> {$value}
</label>
</td>
<td>
<label class="x_inline">
<input type="radio" name="open_total_feed[{$module_srl}]" value="N" checked="checked"|cond="$module_config->open_total_feed != 'T_N'" /> {$lang->use}
</label>
<label class="x_inline">
<input type="radio" name="open_total_feed[{$module_srl}]" value="T_N" checked="checked"|cond="$module_config->open_total_feed == 'T_N'" /> {$lang->notuse}
</label>
</td>
</tr>
<tr cond="!$feed_config">
<td style="text-align:center">{$lang->no_data}</td>
<tr cond="!$rss_list">
<td colspan="4" style="text-align:center">{$lang->no_data}</td>
</tr>
</tbody>
</table>
<div class="x_clearfix">
<button type="submit" class="x_btn x_btn-primary x_pull-right">{$lang->cmd_save}</button>
</div>
@ -116,7 +119,7 @@
<script>
jQuery(function($){
$("._delete_rss_image").click(function(){
$.exec_json('rss.procRssAdminDeleteFeedImage', {del_image:'Y'}, function(){
$.exec_json('rss.procRssAdminDeleteFeedImage', {}, function(){
$("._rss_image_container").hide();
});
});