rhymix/modules/editor/tpl/setup_component.html

112 lines
4.7 KiB
HTML

<load target="css/editor.css" />
<load target="css/editor_admin.css" />
<load target="js/editor_admin.js" />
<div class="x_page-header">
<h1>{$lang->editor}</h1>
</div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/editor/tpl/setup_component/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<section class="section">
<h1>{$lang->cmd_setup}</h1>
<form ruleset="setupComponent" action="./" method="post" class="x_form-horizontal">
<input type="hidden" name="module" value="editor" />
<input type="hidden" name="act" value="procEditorAdminSetupComponent" />
<input type="hidden" name="component_name" value="{$component_name}" />
<input type="hidden" name="xe_validator_id" value="modules/editor/tpl/setup_component/1" />
<div class="x_control-group">
<label class="x_control-label">{$lang->component_name}</label>
<div class="x_controls">{$component->title}({$component->component_name}) ver. {$component->version}</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->component_author}</label>
<div class="x_controls">
<!--@foreach($component->author as $author)-->
{$author->name} (<a href="{$author->homepage}" target="_blank" rel="noopener">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
<!--@endforeach-->
</div>
</div>
<div class="x_control-group" cond="$component->link">
<label class="x_control-label">{$lang->component_link}</label>
<div class="x_controls">
<a href="#" onclick="winopen('{$component->link}');return false;">{$component->link}</a>
</div>
</div>
<block cond="$component->extra_vars">
<block loop="$component->extra_vars => $id, $var">
<block cond="$group != $var->group">
<h2>{$var->group}</h2>
{@$group = $var->group}
</block>
{@$not_first = true}
<div class="x_control-group" cond="!$not_first && $group != $var->group"></div>
<div class="x_control-group">
<label class="x_control-label" for="{$var->name}"|cond="$var->type != 'textarea'" for="lang_{$var->name}"|cond="$var->type == 'textarea'">{$var->title}</label>
<div class="x_controls">
<input cond="$var->type == 'text'" type="text" name="{$var->name}" id="{$var->name}" value="{escape($var->value, false)}">
<textarea cond="$var->type == 'textarea'" name="{$var->name}" id="{$var->name}" rows="8" cols="42">{escape($var->value, false)}</textarea>
<select cond="$var->type == 'select'" name="{$var->name}" id="{$var->name}">
<option loop="$var->options => $option" value="{$option->value}" selected="selected"|cond="$var->value == $option->value">{$option->title}</option>
</select>
<span class="x_help-inline">{nl2br($var->description)}</span>
</div>
</div>
</block>
</block>
<div class="x_control-group">
<label class="x_control-label">{$lang->grant}</label>
<div class="x_controls">
<label class="x_inline" loop="$group_list=>$key,$val">
<input type="checkbox" name="target_group[]" value="{$key}" <!--@if(in_array($key, $component->target_group))-->checked="checked"<!--@end--> id="group_{$key}"> {$val->title}
</label>
</div>
</div>
<div class="x_control-group" cond="$mid_list">
<label class="x_control-label">
{$lang->module}
</label>
<div class="x_controls">
<span class="x_help-block">{$lang->about_component_mid}</span>
<label class="checked" for="check_all"> <input id="check_all" type="checkbox"/> Check all</label>
<!--@foreach($mid_list as $module_category_srl => $modules)-->
<!--@if(count($mid_list) > 1)-->
<fieldset>
<legend>
<input type="checkbox" />
<!--@if($modules->title)-->{$modules->title}<!--@else-->{$lang->none_category}<!--@end-->
</legend>
<!--@end-->
<div id="section_{$module_category_srl}">
<!--@foreach($modules->list as $key => $val)-->
<label>
<input type="checkbox" value="{$key}" name="mid_list[]" id="chk_mid_list_{$key}" <!--@if(in_array($key, $component->mid_list))-->checked="checked"<!--@end--> />
{$key} ({$val->browser_title})
</label>
<!--@end-->
</div>
<!--@if(count($mid_list) > 1)-->
</fieldset>
<!--@end-->
<!--@end-->
</div>
</div>
<div class="x_clearfix btnArea">
<a class="x_btn x_pull-left" href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminIndex')}" >{$lang->cmd_back}</a>
<button type="submit" class="x_btn x_btn-primary x_pull-right">{$lang->cmd_save}</button>
</div>
</form>
</section>
<script>
(function($){
$('#check_all')
.bind('click', function(e){
if (this.checked){
$('input[name=mid_list\\[\\]]').attr('checked', 'checked');
}else{
$('input[name=mid_list\\[\\]]').removeAttr('checked');
}
});
})(jQuery);
</script>