xoopscube/altsys

View on GitHub
xoops_trust_path/libs/altsys/templates/main_blocks_admin_edit.html

Summary

Maintainability
Test Coverage
<div class="ui-dev-mode"><{$smarty.template}></div>

<h2><{$smarty.const._MD_A_MYBLOCKSADMIN_BLOCKADMIN}> <{if $target_mname_bread}>» <{$target_mname_bread|ucfirst}><{else}>» <{$target_mname|ucfirst}><{/if}></h2>

<{if $smarty.get.dirname eq '__CustomBlocks__'}>
<div class="tips">
    <{$smarty.const._MD_A_MYBLOCKSADMIN_CUSTOM_TIPS}>
</div>
<{/if}>

<article id="admin-block">

    <{if $block.content_preview}>
    <div class="ui-block-admin-preview">
        <{$block.content_preview}>
    </div>
    <{/if}>

<form name="blockform" id="blockform" action="<{$xoops_url}>/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin&amp;dirname=<{$target_dirname}>&amp;bid=<{$block.bid}>" method="post">

<table class="outer">
    <thead>
    <tr>
        <th colspan="2"><{$form_title}></th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td><{$smarty.const._MD_A_MYBLOCKSADMIN_NAME}></td>
        <td>
            <{$block.name_raw|escape}>
        </td>
    </tr>
    <tr>
        <td><{$smarty.const._MD_A_MYBLOCKSADMIN_TITLE}></td>
        <td>
            <input type="text" name="titles[<{$block.bid}>]" value="<{$block.title_raw|escape}>" size="40">
        </td>
    </tr>
    <tr>
        <td><{$smarty.const._MD_A_MYBLOCKSADMIN_SIDE}></td>
        <td class="ui-block-side">
            <{$block.cell_position}>
        </td>
    </tr>
    <tr>
        <td><{$smarty.const._MD_A_MYBLOCKSADMIN_WEIGHT}></td>
        <td>
            <input type="text" name="weights[<{$block.bid}>]" value="<{$block.weight}>" size="3" maxlength="5">
        </td>
    </tr>
    <tr>
        <td><{$smarty.const._MD_A_MYBLOCKSADMIN_VISIBLEIN}></td>
        <td>
            <{$block.cell_module_link}>
            <{$block.cell_group_perm}>
        </td>
    </tr>


    <{if $block.is_custom}>

        <tr>
            <td> <{$smarty.const._MD_A_MYBLOCKSADMIN_CONTENT}></td>
            <td>
                <{if $xoops_cube_legacy}>

                    <{if $block.ctype == 'P'}>
                    <script type="text/javascript" src="<{$xoops_url}>/modules/ckeditor4/ckeditor/ckeditor.js"></script>

                    <textarea name="contents[<{$block.bid}>]" id="textarea_content" style="width: 100%;" rows="20"><{$block.content_raw|escape}></textarea>
                    <style>
                        .cke_chrome {
                            border: none!important;
                        }
                        .cke_top {
                            border-bottom: 1px solid #000000!important;
                            background: hsl(220deg 30% 5%)!important;
                            padding: 6px 8px 2px;
                            white-space: normal;
                        }
                        a.cke_button{
                            background: #363d49;
                            border-color: hsl(220deg 30% 5%);
                            margin-right: 0.25rem;
                        }
                        a.cke_button_off:hover, a.cke_button_off:focus, a.cke_button_off:active {
                            background-color: var(--button-active)!important;
                            border-color: var(--link-hover)!important;
                        }
                        .cke_button_on {
                            background-color: transparent!important;
                            border-color: var(--link-hover)!important;
                        }
                        .cke_button_icon {
                            background: #363d49;
                        }
                    </style>
                    <script type="text/javascript">
                        CKEDITOR.replace( 'textarea_content', {
                            customConfig: '<{$xoops_url}>/modules/ckeditor4/ckeditor/config_php.js',
                        });
                    </script>

                    <{elseif $block.ctype == 'H' || empty($block.ctype)}>
                        <{xoops_dhtmltarea cols=74 rows=15 name="contents[`$block.bid`]" id="textarea_content" value="`$block.content_raw`" class=html editor=html}>
                    <{else}>

                        <{xoops_dhtmltarea cols=74 rows=15 name="contents[`$block.bid`]" id="textarea_content" value="`$block.content_raw`" myckeditor=true class=bbcode editor=bbcode}>
                    <{/if}>

                <{/if}>
            </td>
        </tr>
        <tr>
            <td><{$smarty.const._MD_A_MYBLOCKSADMIN_CTYPE}></td>
            <td>
                <select name="ctypes[<{$block.bid}>]" size="1">
                    <{html_options options=$ctype_options selected=$block.ctype}>
                </select>
            </td>
        </tr>

    <{else}>

        <{if $block.template_tplset}>
        <tr>
            <td><{$smarty.const._MD_A_MYBLOCKSADMIN_CONTENT}></td>
            <td>
                <a href="?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file=<{$block.template}>&amp;tpl_tplset=<{$block.template_tplset}>"><{$smarty.const._MD_A_MYBLOCKSADMIN_EDITTPL}></a>
            </td>
        </tr>
        <{/if}>

        <tr>
            <td><{$smarty.const._MD_A_MYBLOCKSADMIN_OPTIONS}></td>
            <td>
                <{$block.cell_options}>
            </td>
        </tr>

    <{/if}>

    <tr>
        <td><{$smarty.const._MD_A_MYBLOCKSADMIN_BCACHETIME}></td>
        <td>
            <select name="bcachetimes[<{$block.bid}>]" size="1">
                <{html_options options=$cachetime_options selected=$block.bcachetime}>
            </select>
        </td>
    </tr>
    </tbody>
    <tfoot>
    <tr>
        <td></td>
        <td>
            <{if $block.is_custom}>
<!--                <input type="submit" class="formButton" name="preview"  id="preview" value="<{$smarty.const._PREVIEW}>">-->
            <button type="submit" class="button preview" name="preview"  id="preview" value="<{$smarty.const._PREVIEW}>"><{$smarty.const._PREVIEW}></button>
            <{/if}>
<!--            <input type="submit" class="formButton" name="submitblock"  id="submitblock" value="<{$submit_button}>">-->
            <button type="submit" class="button submit" name="submitblock"  id="submitblock" value="<{$submit_button}>"><{$submit_button}></button>
        </td>
    </tr>
    </tfoot>
</table>
<{$gticket_hidden}>
<input type="hidden" name="op" value="<{$op}>">
</form>

</article>