Statistics
| Branch: | Tag: | Revision:

root / djnro / templates / edumanage / catenroll.html @ 4772922a

History | View | Annotate | Download (2.9 kB)

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

    
5
{% block homeactive %}{% endblock %}
6
{% block catactive %}class="active"{% endblock %}
7

    
8
{% block management_content %}
9
 <h4>eduroam {% trans 'CAT enroll' %}</h4>
10
 {% if messages %}
11
    <table class="table table-condensed">
12
        {% for message in messages %}
13
        <tr {% if  %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
14
        {% endfor %}
15
    </table>
16
{% endif %}
17
<hr>
18
{% if current_enrollments %}
19
<div class="row">
20
        <div class="col-md-12">
21
                <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" width="100%" id="table">
22
                        <thead>
23
                                <tr>
24
                                        <th>{% trans "CAT Institution ID" %}</th>
25
                                        <th>{% trans "CAT configuration profiles" %}</th>
26
                                        <th>{% trans "URL/Status" %}</th>
27
                                        <th>{% trans "CAT instance" %}</th>
28
                                        <th>{% trans "Applier" %}</th>
29
                                </tr>
30
                        </thead>
31

    
32
                        <tbody>
33
                        {% for enrollment in current_enrollments %}
34
                                <tr class="GradeC">
35
                                        <td>{{enrollment.cat_inst_id}}</td>
36
                                        <td>{% if enrollment.cat_configuration_url %}<a href="{{enrollment.cat_configuration_url}}" target="_blank">CAT url</a>{% else %}-{% endif %}</td>
37
                                        <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>
38
                                        <td>{{enrollment.cat_instance}}</td>
39
                                        <td>{{enrollment.applier.first_name}} {{enrollment.applier.last_name}}</td>
40
                                </tr>
41
                        {% endfor %}
42
                        </tbody>
43
                </table>
44
        </div>
45
</div>
46
{% endif %}
47

    
48
{% if cat_instances %}
49
<div class="row">
50
        <div class="col-md-6">
51
                <form method="POST" class="" id="catenroll_form" action="{% url catenroll %}">
52
                {% csrf_token %}
53
                        <div class="form-group">
54
                                <label class="control-label" for="id_catinstance"><b>{% trans "CAT instance" %}</b></label>
55
                                <div class="controls">
56
                                        <select id="catinstance" name="catinstance">
57
                                                {% for instance in cat_instances %}
58
                                                        <option value="{{instance.0}}">{{instance.1}}</option>
59
                                                {% endfor %}
60
                                        </select>
61
                                </div>
62
                        </div>
63
                        <div class="control-group">
64
                                <div class="controls">
65
                                        <button type="submit" id="applybutton" value="Apply" class="btn btn-primary">
66
                                                {% trans "Apply" %}
67
                                        </button>
68
                                </div>
69
                        </div>
70
                </form>
71
        </div>
72
</div>
73
{% endif %}
74

    
75
{% if response_status %}
76
<div class="row">
77
        <div class="col-md-12">
78
                <div class="alert {% if response_status == 'Error' %}alert-error{% else %}alert-success{% endif %}">
79
                        <div><strong>{%  trans 'Status' %}:</strong> {{response_status}}</div>
80
                {% if not cat_url %}
81
                        <div><strong>{% trans 'Response' %}:</strong> {{response}}</div>
82
                {% else %}
83
                        <div><strong>{% trans 'Institution Id' %}:</strong> {{inst_uid}}</div>
84
                        <div><strong>{% trans 'CAT url' %}:</strong> <a href="{{cat_url}}" target="_blank">{{cat_url}}</a></div>
85
                {% endif %}
86
                </div>
87
        </div>
88
</div>
89
{% endif %}
90
{% endblock %}
91