Revision 4772922a djnro/templates/edumanage/catenroll.html

b/djnro/templates/edumanage/catenroll.html
2 2
{% load i18n %}
3 3
{% load staticfiles %}
4 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 5
{% block homeactive %}{% endblock %}
16 6
{% block catactive %}class="active"{% endblock %}
17
{% block management_content %}
18 7

  
19
 <h4>eduroam CAT enroll</h4>
8
{% block management_content %}
9
 <h4>eduroam {% trans 'CAT enroll' %}</h4>
20 10
 {% if messages %}
21
                    <table class="table table-condensed">
22
                        {% for message in messages %}
23
                        <tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
24
                        {% endfor %}
25
                    </table>
26
                {% endif %}
11
    <table class="table table-condensed">
12
        {% for message in messages %}
13
        <tr {% if message.tags %} class="{{ message.tags }}"{% endif %}><td>{{ message }}<td></tr>
14
        {% endfor %}
15
    </table>
16
{% endif %}
27 17
<hr>
28 18
{% if current_enrollments %}
29 19
<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>
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>
41 31

  
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>
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>
56 46
{% endif %}
47

  
57 48
{% if cat_instances %}
58 49
<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>
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>
77 71
	</div>
78
</form>
79
</div></div>
72
</div>
80 73
{% endif %}
74

  
81 75
{% if response_status %}
82 76
<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 %}
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>
92 87
	</div>
93 88
</div>
94
</div>
95 89
{% endif %}
96 90
{% endblock %}
97 91

  

Also available in: Unified diff