Statistics
| Branch: | Tag: | Revision:

root / djnro / templates / edumanage / catenroll.html @ 1d70dbce

History | View | Annotate | Download (3.4 kB)

1
{% extends "edumanage/welcome.html"%}
2
{% load i18n %}
3
{% load staticfiles %}
4

    
5
{% block crumbs %}
6
<li><a href="{% url manage %}">{% trans "Home" %}</a><span class="divider">/</span></li>
7
<li class="active">{% trans "CAT Enroll" %}</li>
8
{% endblock %}
9

    
10
{% block extrahead %}
11
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
12
<script src="{% static 'js/bootstrap.min.js' %}"></script>
13
{% endblock %}
14

    
15
{% block homeactive %}{% endblock %}
16
{% block catactive %}class="active"{% endblock %}
17
{% block management_content %}
18

    
19
 <h4>eduroam CAT enroll</h4>
20
 {% if messages %}
21
                    <table class="table table-condensed">
22
                        {% for message in messages %}
23
                        <tr {% if  %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
24
                        {% endfor %}
25
                    </table>
26
                {% endif %}
27
<hr>
28
{% if current_enrollments %}
29
<div class="row">
30
<div class="span12">
31
                      <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
32
                                        <thead>
33
                                        <tr>
34
                                                <th>{% trans "CAT Institution ID" %}</th>
35
                                                <th>{% trans "CAT configuration profiles" %}</th>
36
                                                <th>{% trans "URL/Status" %}</th>
37
                                                <th>{% trans "CAT instance" %}</th>
38
                                                <th>{% trans "Applier" %}</th>
39
                                        </tr>
40
                                        </thead>
41

    
42
                                        <tbody>
43
                        {% for enrollment in current_enrollments %}
44
                              <tr class="GradeC">
45
                                <td>{{enrollment.cat_inst_id}}</td>
46
                                <td>{% if enrollment.cat_configuration_url %}<a href="{{enrollment.cat_configuration_url}}" target="_blank">CAT url</a>{% else %}-{% endif %}</td>
47
                                <td>{% if not enrollment.cat_active %}{% if enrollment.url %}<a href="{{enrollment.url}}" target="_blank">{{enrollment.url|truncatechars:50}}</a>{% else %}-{% endif %}{% else %}ACTIVE{% endif %}</td>
48
                                <td>{{enrollment.cat_instance}}</td>
49
                                <td>{{enrollment.applier.first_name}} {{enrollment.applier.last_name}}</td>
50
                        </tr>
51
                              {% endfor %}
52
                              </tbody>
53
                      </table>
54
                      </div>
55
                      </div>
56
{% endif %}
57
{% if cat_instances %}
58
<div class="row">
59
<div class="span6 well">
60
<form method="POST" class="form-horizontal" id="catenroll_form" action="{% url catenroll %}">
61
        {% csrf_token %}
62
        <div class="control-group">
63
                <label class="control-label" for="id_catinstance"><b>{% trans "CAT instance" %}</b></label>
64
                <div class="controls">
65
                        <select id="catinstance" name="catinstance">
66
                                {% for instance in cat_instances %}
67
                                <option value="{{instance.0}}">{{instance.1}}</option>
68
                                {% endfor %}
69
                                </select>
70
                </div>
71
        </div>
72
        <div class="control-group">
73
                <div class="controls">
74
                        <button type="submit" id="applybutton" value="Apply" class="btn btn-primary">
75
                        {% trans "Apply" %}</button>
76
                </div>
77
        </div>
78
</form>
79
</div></div>
80
{% endif %}
81
{% if response_status %}
82
<div class="row">
83
<div class="span12">
84
        <div class="alert {% if response_status == 'Error' %}alert-error{% else %}alert-success{% endif %}">
85
        <div><strong>Status:</strong> {{response_status}}</div>
86
        {% if not cat_url %}
87
        <div><strong>Response:</strong> {{response}}</div>
88
        {% else %}
89
        <div><strong>Institution Id:</strong> {{inst_uid}}</div>
90
        <div><strong>CAT url:</strong> <a href="{{cat_url}}" target="_blank">{{cat_url}}</a></div>
91
        {% endif %}
92
        </div>
93
</div>
94
</div>
95
{% endif %}
96
{% endblock %}
97