示例#1
0
    /**
     * Admin page for visual editor
     * @return void
     * @package minima
     */
    function getAdminPage()
    {
        ?>
        <div class="wrap ti-appear-wrap">
            <?php 
        minima_admin_leftmenu();
        ?>
            <div class="ti-admin-icon">></div>
            <h2 class="sp-admin-title">Appearance Editor</h2>
            
            <div class="ti-appear-menu">
                <?php 
        $i = 0;
        $j = 0;
        foreach ($this->app_list['sections'] as $section) {
            ?>
                    <span><a href="#elem-list-<?php 
            echo $i;
            ?>
" class="ti-appear-section"><span class="ti-icon">V</span><?php 
            echo $section['name'];
            ?>
</a></span>
                    <ul class="ti-appear-list sp-hide" id="elem-list-<?php 
            echo $i;
            ?>
">
                        <?php 
            foreach ($section['elements'] as $element) {
                ?>
                        <li><a href="#sp-appear-<?php 
                echo $j;
                ?>
" class="ti-appear-item"><?php 
                echo $element['name'];
                ?>
</a></li>
                            <?php 
                $j++;
            }
            ?>
                    </ul>
                    <?php 
            $i++;
        }
        ?>
            </div>
            <div class="sp-admin-area">
                <form class="sp-appear-form">
                <?php 
        minima_upgrade_nag('You are running lite version of minima, for more editable elements please upgrade to pro!');
        ?>
                </form>
                <div id="fm-unavailable" style="display: none;">
                    <?php 
        minima_upgrade_nag('Font manager is only available in pro version of minima, for font manager and more features please upgrade to pro!');
        ?>
                </div>
                <div class="sp-hide sp-appear-forms">
                    <?php 
        $i = 0;
        foreach ($this->app_list['sections'] as $section) {
            ?>
                        <?php 
            foreach ($section['elements'] as $element) {
                ?>
<div id="sp-appear-<?php 
                echo $i;
                ?>
" class="sp-appearance">
                                <form method="post" class="sp-appear-form sp-hide">
                                    <?php 
                switch ($element['editor']) {
                    case 'background':
                        minima_admin_background(array('slug' => 'sp-bg-' . $element['selector'], 'name' => $element['name']));
                        break;
                    case 'font':
                        minima_admin_font(array('slug' => 'sp-font-' . $element['selector'], 'name' => $element['name']));
                        break;
                    case 'both':
                        minima_admin_font(array('slug' => 'sp-font-' . $element['selector'], 'class' => 'appearance-common ti-font-2c', 'name' => $element['name']));
                        minima_admin_background(array('slug' => 'sp-bg-' . $element['selector'], 'class' => 'appearance-common ti-bg-2c', 'name' => $element['name']));
                        break;
                    case 'fontcolor':
                        minima_admin_fontcolor(array('slug' => 'sp-font-' . $element['selector'], 'name' => $element['name']));
                        break;
                }
                ?>
                                    <div class="sp-form-row"><label>&nbsp;</label><button class="button blue button-primary appearance-save"><i>.</i>Save</button></div>

                                </form>
                            </div>
                            <?php 
                $i++;
            }
        }
        ?>
                </div>
            </div>
            <span class="sp-clear"></span>
        </div>
        <?php 
    }
示例#2
0
    function minima_admin_panel($panel)
    {
        ?>
        <div class='wrap'>
                    <?php 
        minima_upgrade_nag('You are running lite version of minima, for tile slider and more features please upgrade to pro!');
        ?>
                    <?php 
        minima_admin_leftmenu();
        ?>
            <div class="sp-admin-area">
                <div class="ti-admin-icon"><?php 
        echo $panel['icon'];
        ?>
</div>
                <h2 class="sp-admin-title"><?php 
        echo $panel['title'];
        ?>
</h2>

                <form method="post">
        <?php 
        foreach ($panel['options'] as $option) {
            minima_admin_formelem($option);
        }
        ?>

                    <p class="sp-form-row sp-update"><label>&nbsp;</label>
                        <button class="button button-primary"><i>.</i><?php 
        _e('Save', 'minima');
        ?>
</button>
                        <input type="hidden" name="min-admin" value="1"/>
                    </p>
                </form>
            </div>
        </div>
        <?php 
    }