rhymix/modules/rss/tpl/rss_admin_index.html

128 lines
5.4 KiB
HTML

<div class="x_page-header">
<h1>RSS</h1>
</div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/rss/tpl/rss_admin_index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<section class="section">
<h1>{$lang->total_feed} {$lang->cmd_management}</h1>
<form ruleset="insertRssConfig" action="./" method="post" enctype="multipart/form-data" class="x_form-horizontal">
<input type="hidden" name="module" value="rss" />
<input type="hidden" name="act" value="procRssAdminInsertConfig" />
<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="{$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="$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="$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="{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">{escape($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">
<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" />
<button type="button" class="_delete_rss_image">{$lang->cmd_delete}</button>
</div>
</div>
<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="{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="1000" name="feed_document_count" value="{$config->feed_document_count ?: 20}" id="feed_document_count" />
</div>
</div>
<div class="btnArea x_clearfix">
<button type="submit" class="x_btn x_btn-primary x_pull-right">{$lang->cmd_save}</button>
</div>
</form>
</section>
<section class="section">
<h1 style="margin-bottom:0">{$lang->module_feed_management}</h1>
<form action="./" method="post">
<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>
<th>{$lang->mid}</th>
<th>{$lang->description}</th>
<th>{$lang->open_rss}</th>
<th>{$lang->open_feed_to_total}</th>
</tr>
</thead>
<tbody>
<tr loop="$rss_list => $module_srl,$module_config">
<td>
<b>{$module_config->browser_title}</b>
<br><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" 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="!$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>
</form>
</section>
<script>
jQuery(function($){
$("._delete_rss_image").click(function(){
$.exec_json('rss.procRssAdminDeleteFeedImage', {}, function(){
$("._rss_image_container").hide();
});
});
});
</script>