<?php
/**
 * Calalog services (websig side)
 * @author Fred
 * @version 1.0.1
 * @package Backend\SIG
 */

$em_g = new EntityManager('services_groups', 'WEBSIG');
$list_g = $em_g->load(' 1=1 order by name ');

$em = new EntityManager('services', 'WEBSIG');
$list_services = $em->load('');
?>


<div class="row">					 
    <div class="col-sm-3">
        <label><?= R('label_ows_groupname') ?></label>
        <select id="mmc_serviceGroup" class="form-control" name = "mmc_serviceGroup">
            <option ></option>
            <?php foreach ($list_g as $obj) { ?>
                <option ><?= $obj->name ?></option>
            <?php } ?>
        </select>
    </div>
    <div class="col-sm-9">
        <label><?= R("label_ows_name") ?> </label>
        <select id="mmc_cbx_services" class="form-control" name="mmc_cbx_services">
            <option ></option>
            <?php foreach ($list_services as $obj) { ?>
                <option ws_url="<?= $obj->service_url ?>"><?= $obj->service_name ?></option>
            <?php } ?>
        </select>
    </div>
</div>
<div class="row">
    <div class="col-sm-12">
        <label><?= R('l_url') ?></label>
        <div class="input-group col-sm-11">
            <input type="text" class="form-control" id="mmc_wmsUrl" >
        </div>
    </div>

</div>
<div class="row">					 
    <div class="col-sm-3">
        <label><?= R('l_type') ?></label>
        <select id="mmc_serviceType" class="form-control">
            <option value="wms" selected="selected">WMS</option>
            <!--<option value="wmts">WMTS</option>-->
            <option value="wfs">WFS</option>
        </select>
    </div>
    <div class="col-sm-3">
        <label><?= R('l_version') ?></label>
        <select id="mmc_serviceVersion" class="form-control">
            <!--<option value="1.0.0">1.0.0</option>-->
            <option value="1.1.0">1.1.0</option>
            <option value="1.1.1" selected="selected">1.1.1</option>
            <option value="2.0.0">2.0.0</option>
            <option value="1.3.0">1.3.0</option>
        </select>
    </div>
    <div class="col-sm-3">
        <label>&nbsp;</label>
        <button type="button" class="btn btn-primary form-control" id="mmc_btnGetCatalogLayers">
            <?= R('l_get_layers') ?>                                                     
        </button>
    </div>
    <div class="col-sm-3">
        <label>&nbsp;</label>
        <button type="button" class="btn btn-primary form-control" class="btn btn-default" id="mmc_btnGetMetadata" >
            <span class="fa fa-list"></span>&nbsp;<?= R('l_get_metadata') ?>
        </button>
    </div>

</div>
<p></p>
<div class="row">
    <div id="div-wms-results-glass"></div>
    <div class="col-sm-12" id="div-wms-results">
        <table class="table table-bordered table-striped" id="table-wms-results">
            <tr>
                <td></td>
            </tr>
        </table>
    </div>					
</div>




