template-edit.html 1.95 KB
Newer Older
1 2
{% extends "dashboard/base.html" %}
{% load i18n %}
3
{% load sizefieldtags %}
4
{% load crispy_forms_tags %}
5 6 7

{% block title-page %}{% trans "Edit template" %}{% endblock %}

8 9 10
{% block content %}

<div class="row">
11
  <div class="col-md-7">
12 13
    <div class="panel panel-default">
      <div class="panel-heading">
14
        <a class="pull-right btn btn-default btn-xs" href="{% url "dashboard.views.template-list" %}">{% trans "Back" %}</a>
15
        <h3 class="no-margin"><i class="fa fa-puzzle-piece"></i> {% trans "Edit template" %}</h3>
16 17
      </div>
      <div class="panel-body">
18 19 20
        {% with form=form %}
          {% include "display-form-errors.html" %}
        {% endwith %}
21 22 23 24
        {% crispy form %}
      </div>
    </div>
  </div>
25

26
  <div class="col-md-5">
27 28
    <div class="panel panel-default">
      <div class="panel-heading">
29
        <h4 class="no-margin"><i class="fa fa-group"></i> {% trans "Manage access"  %}</h4>
30 31
      </div>
      <div class="panel-body">
32
        {% include "dashboard/_manage_access.html" with table_id="template-access-table" %}
33 34
      </div>
    </div>
35 36


37 38
    <div class="panel panel-default">
      <div class="panel-heading">
39
        <h4 class="no-margin"><i class="fa fa-file"></i> {% trans "Disk list" %}</h4>
40 41
      </div>
      <div class="panel-body">
42 43 44 45
        <ul class="template-disk-list">
        {% if not disks %}
          {% trans "No disks are added!" %}
        {% endif %}
46 47 48 49 50 51 52 53
        {% for d in disks %}
          <li>
            {% include "dashboard/_disk-list-element.html" %}
          </li>
        {% endfor %}
        </ul>
      </div>
    </div>
54 55
  </div><!-- .col-md-4 -->
</div><!-- .row -->
56

57

58 59 60 61 62 63 64 65
<style>
  fieldset {
    margin-top: 40px;
  }
  fieldset legend {
    font-weight: bold;
  }
</style>
66 67 68 69 70 71 72 73
{% endblock %}

{% block extra_js %}
  <script>
    $(function() {
      $("#hint_id_num_cores, #hint_id_priority, #hint_id_ram_size").hide();
    });
  </script>
74

75
  <script src="{{ STATIC_URL }}dashboard/disk-list.js"></script>
76
{% endblock %}