<!DOCTYPE html>
<html ng-app="gsschema">
{% load staticfiles %}


<link rel="stylesheet" type="text/css" href="{% static 'gsschema/css/style.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'gsschema/lib/bootstrap/css/bootstrap.css' %}" />
<script type="text/javascript" src="{% static 'gsschema/lib/jquery/js/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'gsschema/lib/angular/js/angular.js' %}"></script>
<script type="text/javascript" src="{% static 'gsschema/lib/angular-cookies/js/angular-cookies.js' %}"></script>
<script type="text/javascript" src="{% static 'gsschema/lib/bootstrap/js/bootstrap.js' %}"></script>

<script type="text/javascript" src="{% static 'gsschema/js/script.js' %}"></script>

<body>
    {%verbatim%}
    <div class="container" ng-controller="gsschema_ctrl">
        <div class="page-header">
          <h2 class="page-title">Edit Schema</h2>
        </div>
        <br/>

        <fieldset>
            <h4>Select Layer</h4>
            <select id="default_style" name="default_style" required="required" ng-model="layerSelector" ng-change="hasValidFile()"
                    ng-options="layer as layer for layer in layerList">
                <option value="">Select a Layer</option>
            </select>
            <button type="button" ng-click="reloadLayers()" class="btn btn-default btn-sm ng-scope"
                    title="Refresh Layers" data-toggle="tooltip">
              <i class="glyphicon glyphicon-repeat"></i>
            </button>
            <div ng-show="showButtons()">
                <br/>
                <br/>
                <button id="describe-feature-type-button" class="btn btn-sm btn-success" ng-click="describe()"
                        title="Download the currently used schema for this layer" data-toggle="tooltip">Describe FeatureType</button>
                <br/>
                <br/>
                <button id="download-button" class="btn btn-sm btn-default" ng-click="download()" ng-disabled="!hasValidSchema"
                        title="Download the schema LOCAL to your machine (previously uploaded by you)" data-toggle="tooltip">Download</button>
                <button id="remove-button" class="btn btn-sm btn-danger" ng-click="remove()" ng-disabled="!canRemoveFile"
                        title="Remove the schema LOCAL to your machine" data-toggle="tooltip">Remove</button>
                <br/>
                <br/>
                <br/>
                <input type="file" file-model="myFile"/>
                <br/>
                <button id="upload-button" class="btn btn-sm btn-default" ng-click="upload()" ng-disabled="!hasUploadFile"
                        title="Upload Schema" data-toggle="tooltip" data-placement="right">Upload</button>
            </div>
        </fieldset>
    </div>
    {%endverbatim%}
</body>
</html>