You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
310 lines
9.8 KiB
310 lines
9.8 KiB
<div class="title"> |
|
<h5>{#mod_title#}</h5> |
|
</div> |
|
|
|
|
|
<div class="widget" style="margin-top: 0px;"> |
|
<div class="body"> |
|
{#mod_description#} |
|
</div> |
|
</div> |
|
|
|
|
|
<div class="breadCrumbHolder module"> |
|
<div class="breadCrumb module"> |
|
<ul> |
|
<li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li> |
|
<li><a href="index.php?do=modules&cp={$sess}">{#MODULES_SUB_TITLE#}</a></li> |
|
<li><a href="index.php?do=modules&action=modedit&mod=workdocs&moduleaction=1&cp={$sess}">{#mod_title#}</a></li> |
|
<li>{#mod_edit_breadcrumb#}</li> |
|
<li>{if $work.title}{$work.title}{else}{$smarty.request.title}{/if}</li> |
|
</ul> |
|
</div> |
|
</div> |
|
|
|
|
|
<form id="saveForm" action="index.php?do=modules&action=modedit&mod=workdocs&moduleaction=save&cp={$sess}" method="post" class="mainForm"> |
|
|
|
<input type="hidden" id="work_id" name="work_id" value="{$work_id}"> |
|
<input type="hidden" id="rubric_id" name="rubric_id" value="{$rubric_id}"> |
|
|
|
<div class="widget first"> |
|
<div class="head"> |
|
<h5>{#mod_edit_settings#}</h5> |
|
<div class="num hideBtn" {if ! $work_id}style="display: none"{/if}> |
|
<a class="basicNum topDir" href="index.php?do=modules&action=modedit&mod=workdocs&moduleaction=run&rubric_id={$rubric_id}&work_id={$work_id}&cp={$sess}">{#mod_edit_btn_run#}</a> |
|
</div> |
|
</div> |
|
<fieldset> |
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
|
<col width="400" /> |
|
<col /> |
|
|
|
<thead> |
|
<tr> |
|
<td colspan="2">{#mod_edit_settings_work#}</td> |
|
</tr> |
|
</thead> |
|
|
|
<tr> |
|
<td>{#mod_edit_settings_name#}</td> |
|
<td><input class="mousetrap" name="title" type="text" id="title" value="{$work.title}" placeholder="{#mod_edit_settings_name#}" style="width: 400px" autocomplete="off"></td> |
|
</tr> |
|
|
|
<tr> |
|
<td>{#mod_edit_settings_desc#}</td> |
|
<td> |
|
<input class="mousetrap" name="description" type="text" id="title" value="{$work.description}" placeholder="{#mod_edit_settings_desc#}" autocomplete="off"> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td>{#mod_edit_settings_rub#}</td> |
|
<td> |
|
<select id="rubric_id_select" name="rubric_id_select" class="mousetrap" disabled> |
|
<option value="">{#mod_edit_settings_rub_sel#}</option> |
|
{foreach from=$rubrics item=rub} |
|
<option value="{$rub.Id}" {if $rubric_id == $rub.Id}selected{/if}>{$rub.rubric_title|escape}</option> |
|
{/foreach} |
|
</select> |
|
</td> |
|
</tr> |
|
|
|
<thead> |
|
<tr> |
|
<td colspan="2">{#mod_edit_settings_doc#}</td> |
|
</tr> |
|
</thead> |
|
|
|
<tr> |
|
<td>{#mod_edit_settings_doc_1#}</td> |
|
<td> |
|
<div class="pr12"> |
|
<input type="radio" name="save_enable" value="1"{if $work.save_enable == 1} checked{/if} /><label style="cursor: pointer;">{#mod_yes#}</label> |
|
<input type="radio" name="save_enable" value="0"{if $work.save_enable == 0} checked{/if} /><label style="cursor: pointer;">{#mod_no#}</label> |
|
</div> |
|
</td> |
|
</tr> |
|
|
|
<tr> |
|
<td>{#mod_edit_settings_doc_2#}</td> |
|
<td> |
|
<div class="pr12"> |
|
<input type="radio" name="code_enable" value="1"{if $work.code_enable == 1} checked{/if} /><label style="cursor: pointer;">{#mod_yes#}</label> |
|
<input type="radio" name="code_enable" value="0"{if $work.code_enable == 0} checked{/if} /><label style="cursor: pointer;">{#mod_no#}</label> |
|
</div> |
|
</td> |
|
</tr> |
|
|
|
<tr> |
|
<td>{#mod_edit_settings_doc_3#}</td> |
|
<td> |
|
<div class="pr12"> |
|
<input type="radio" name="revisions_enable" value="1"{if $work.revisions_enable == 1} checked{/if} /><label style="cursor: pointer;">{#mod_yes#}</label> |
|
<input type="radio" name="revisions_enable" value="0"{if $work.revisions_enable == 0} checked{/if} /><label style="cursor: pointer;">{#mod_no#}</label> |
|
</div> |
|
</td> |
|
</tr> |
|
|
|
<tr> |
|
<td>{#mod_edit_settings_doc_4#}</td> |
|
<td> |
|
<div class="pr12"> |
|
<input type="radio" name="logs_enable" value="1"{if $work.logs_enable == 1} checked{/if} /><label style="cursor: pointer;">{#mod_yes#}</label> |
|
<input type="radio" name="logs_enable" value="0"{if $work.logs_enable == 0} checked{/if} /><label style="cursor: pointer;">{#mod_no#}</label> |
|
</div> |
|
</td> |
|
</tr> |
|
</table> |
|
<div class="rowElem" id="saveBtn"> |
|
<div class="saveBtn"> |
|
<input class="basicBtn" type="submit" value="Сохранить" /> |
|
ИЛИ |
|
<input type="submit" class="blackBtn SaveWork" value="Применить (CTRL + S)" /> |
|
</div> |
|
</div> |
|
</fieldset> |
|
</div> |
|
|
|
|
|
<div class="widget first"> |
|
<div class="head"> |
|
<h5>{#mod_edit_code_header#}</h5> |
|
<div class="num hideBtn" {if ! $work_id}style="display: none"{/if}> |
|
<a class="basicNum topDir" href="index.php?do=modules&action=modedit&mod=workdocs&moduleaction=step&rubric_id={$rubric_id}&work_id={$work_id}&cp={$sess}" target="_blank">Запустить тест</a> |
|
</div> |
|
</div> |
|
|
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
|
<col width="50%"> |
|
<col width="50%"> |
|
<thead> |
|
<tr> |
|
<td>{#mod_edit_code_header_b#}</td> |
|
<td>{#mod_edit_code_header_a#}</td> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<tr> |
|
<td> |
|
<div class="pr12"> |
|
<textarea name="code_before" type="text" id="code_before" value="" style="height:400px;" />{$work.code_before}</textarea> |
|
</div> |
|
</td> |
|
<td> |
|
<div class="pr12"> |
|
<textarea name="code_after" type="text" id="code_after" value="" style="height:400px;" />{$work.code_after}</textarea> |
|
</div> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{#mod_edit_code_header_hint#} |
|
</td> |
|
<td> |
|
{#mod_edit_code_header_hint#} |
|
</td> |
|
</tr> |
|
</tbody> |
|
</table> |
|
</div> |
|
|
|
<div class="widget first"> |
|
<div class="head closed activ"> |
|
<h5>{#mod_edit_code_sql_h#}</h5> |
|
</div> |
|
<div style="display: block"> |
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
|
<col width="50%"> |
|
<col width="50%"> |
|
<thead> |
|
<tr> |
|
<td>{#mod_edit_code_sql_hint#}</td> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<tr> |
|
<td> |
|
<div class="pr12"> |
|
<textarea name="self_sql" type="text" id="self_sql" value="" style="height:400px;" />{$work.self_sql}</textarea> |
|
</div> |
|
</td> |
|
</tr> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
|
|
|
|
<div class="widget first"> |
|
<div class="head closed activ"> |
|
<h5>{#mod_edit_fields#}</h5> |
|
</div> |
|
<div style="display: block"> |
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
|
<col width="30"> |
|
<col> |
|
<col width="100"> |
|
<col width="200"> |
|
<thead> |
|
<tr> |
|
<td>{#mod_edit_fields_table_id#}</td> |
|
<td>{#mod_edit_fields_table_name#}</td> |
|
<td>{#mod_edit_fields_table_alias#}</td> |
|
<td>{#mod_edit_fields_table_type#}</td> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
{foreach from=$fields_list item=field_group} |
|
|
|
{if $groups_count > 1} |
|
<tr class="grey"> |
|
<td colspan="4"> |
|
<h5>{if $field_group.group_title}{$field_group.group_title}{else}{#mod_edit_fields_unknow#}{/if}</h5> |
|
</td> |
|
</tr> |
|
{/if} |
|
|
|
{foreach from=$field_group.fields item=field} |
|
<tr> |
|
<td align="center"> |
|
<strong class="code">{$field.Id}</strong> |
|
</td> |
|
<td> |
|
<strong>{$field.rubric_field_title}</strong> |
|
</td> |
|
<td align="center"> |
|
{if $field.rubric_field_alias}<strong class="code">{$field.rubric_field_alias}</strong>{/if} |
|
</td> |
|
<td> |
|
{section name=field_name loop=$field_array} |
|
{if $field.rubric_field_type == $field_array[field_name].id}{$field_array[field_name].name}{/if} |
|
{/section} |
|
</td> |
|
</tr> |
|
{/foreach} |
|
|
|
{/foreach} |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
|
|
<div class="widget first"> |
|
<div class="head closed active"> |
|
<h5>{#mod_edit_rub_code_h#}</h5> |
|
</div> |
|
<div style="display: block"> |
|
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic"> |
|
<col width="50%"> |
|
<col width="50%"> |
|
<thead> |
|
<tr> |
|
<td>{#mod_edit_rub_code_t1#}</td> |
|
<td>{#mod_edit_rub_code_t2#}</td> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<tr> |
|
<td> |
|
<div class="pr12"> |
|
<textarea name="rubric_code_start" type="text" id="rubric_code_start" value="" style="height:300px;" />{$rubric.rubric_code_start}</textarea> |
|
</div> |
|
</td> |
|
<td> |
|
<div class="pr12"> |
|
<textarea name="rubric_code_end" type="text" id="rubric_code_end" value="" style="height:300px;" />{$rubric.rubric_code_end}</textarea> |
|
</div> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
{#mod_edit_rub_code_hint1#} |
|
</td> |
|
<td> |
|
{#mod_edit_rub_code_hint2#} |
|
</td> |
|
</tr> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
</form> |
|
|
|
<script type="text/javascript" src="{$ABS_PATH}modules/workdocs/js/workdocs.js"></script> |
|
|
|
{literal} |
|
<script type="text/javascript" language="JavaScript"> |
|
$(document).ready(function() { |
|
"use strict"; |
|
ModuleWorkDocs.init(); |
|
ModuleWorkDocs.edit(); |
|
}); |
|
</script> |
|
{/literal} |
|
|
|
{include file="$codemirror_connect"} |
|
{include file="$codemirror_editor" conn_id="sql" textarea_id='self_sql' ctrls='ModuleWorkDocs.saveWork();' height=300} |
|
{include file="$codemirror_editor" conn_id="rfs" textarea_id='code_before' ctrls='ModuleWorkDocs.saveWork();' height=400} |
|
{include file="$codemirror_editor" conn_id="rfe" textarea_id='code_after' ctrls='ModuleWorkDocs.saveWork();' height=400} |
|
{include file="$codemirror_editor" conn_id="rcs" textarea_id='rubric_code_start' ctrls='ModuleWorkDocs.saveWork();' height=300} |
|
{include file="$codemirror_editor" conn_id="rce" textarea_id='rubric_code_end' ctrls='ModuleWorkDocs.saveWork();' height=300} |