Mini Shell

Direktori : /usr/share/l.v.e-manager/cpanel/lveversion/
Upload File :
Current File : //usr/share/l.v.e-manager/cpanel/lveversion/ruby-selector.html.tt

[%
    USE Api2;
    USE Dumper;

    SET CPANEL.CPVAR.dprefix = "../";
    SET security_id = "../../../";

    SET PageScripts = [
        "${security_id}3rdparty/cloudlinux/cl-message-handler.js",
        "${security_id}3rdparty/cloudlinux/alt-selector.js",
        "${security_id}3rdparty/cloudlinux/alt-ruby-selector.js"
    ];

    SET interpreters = Api2.exec('LVEInfo', 'getRubyInterpreters', {});
    SET home_dir = Api2.exec('LVEInfo', 'getHomeDir', {});
    SET selector = Api2.exec('LVEInfo', 'rubySelector', {});
    SET list_domains = Api2.exec("Email", "listmaildomains");
    SET is_ruby_enabled = Api2.exec('LVEInfo', 'isRubyEnabled', {});
%]

[% css_code = PROCESS css_block %]
[% js_code = PROCESS js_block %]

[% WRAPPER '_assets/master.html.tt'
    app_key = 'lverubysel' # file attribute from dynamicuiconf
    page_title = "Setup Ruby App" # title of your window
    include_legacy_stylesheets = 1
    include_legacy_scripts = 1
    page_js = js_code
    page_styles = css_code
-%]

[% IF is_ruby_enabled.0 %]
<div id="message-box" title="click to remove"></div>
[% INCLUDE 'ruby-selector-check.tmpl' %]
<div id="alt-projects" style="margin: 0 1em;font-size:1.2em;color:#32343A">
    <div id="project-control" style="border:1px solid #9B9B9B;border-radius:.2em;margin:1em;">
        <div style="text-align:center;font-size:1.1em;font-weight:bold;margin:.1em;border-radius:.1em;background-color:#D8D8D8;padding:.2em 0">
            Setup new application
        </div>
        <div>
            <table class="table table-striped">
                <tbody>
                    <tr>
                        <td style="text-align:right;padding-right:1em;">
                            Ruby version
                        </td>
                        <td style="padding:.2em 0;">
                            <select id="version-selector" class="form-control" style="width: 5em;">
                            [% FOREACH item IN interpreters %]
                                <option>[% item.version %]</option>
                            [% END #FOREACH %]
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:right;padding-right:1em;">
                            App Directory [% home_dir.0 %]/
                        </td>
                        <td style="padding:.2em 0;">
                            <input id="project-path-field"  class="form-control" style="width: 80%;" type="text"/>
                        </td>
                    </tr>
                    <tr>
                    <td style="text-align:right;padding-right:1em;">
                        App Domain/URI
                    </td>
                    <td style="padding:.2em 0;">
                        <select id="project-domain-field" name="domain" class="form-control" style="width: 35%; float:left;">
                            [% FOR l = list_domains %]
                                <option>[% l.domain %]</option>
                            [% END %]
                        </select>
                        <input id="project-uri-field" class="form-control" style="width: 45%;" type="text"/>
                    </td>
                    </tr>
                    <tr>
                        <td colspan="2" style="text-align:center;padding:.2em 0">
                            <button id="project-create-btn" class="btn btn-default">Setup</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div id="project-list" style="border-top:1px solid #B9BBBF;">
        [% INCLUDE "ruby-selector.tmpl" return_=selector %]
    </div>
    </div>
</div>
<div id="listpopup" style="position:absolute;width:100px;height:160px;top:100px;left:100px;background-color:#FFF;box-shadow:0 2px 5px #B7B7B7;border:1px solid #E0E0E0;font-size:1.2em;display:none"></div>

[% INCLUDE _assets/return_link.html.tt return_location='../index.html' return_link_text=locale.maketext('Go Back') %]
[% ELSE %]
Disabled
[% END %]
[% END # wrapper %]

[% BLOCK css_block %]
<style>
    .header { margin: 1em; }
</style>
[% END # css_block END %]

[% BLOCK js_block %]
<script>
    var moddesc = {},
        security_id = '[% security_id %]',
        host_uri = window.location.protocol + '//' + window.location.host,
        backend_uri = security_id + '3rdparty/cloudlinux/cl-selector.cgi',
        message_box = document.getElementById('message-box'),
        ie = navigator.userAgent.toLowerCase().indexOf('msie') >= 0 ? true : false,
        modlist = [];
</script>
[% END # js_block END %]

[%- # Page specific javascript files -%]
[%- FOR source IN PageScripts %]
<script type="text/javascript" src="[% source %]"></script>
[% END -%]

Zerion Mini Shell 1.0