detail_major.html 3.91 KB
Newer Older
Daniel W Bond's avatar
Daniel W Bond committed
1
2
{% extends 'layouts/base.html' %}

3
{% block title %} SRCT Roomlist | Majors | {{ major.name }} {% endblock title %}
Daniel W Bond's avatar
Daniel W Bond committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

{% block content %}

<div class="page-header" id="banner">
  <div class="row">
    <div class="col-md-12 text-center">
      <h1><strong>SRCT</strong>ROOMLIST</h1>
      <p class="lead"><strong>{{ major.name }}</strong></p>
    </div>
  </div>
</div>

{% load gravatar %}

{% comment %} Sigh... three sections of largely duplicated code. {% endcomment %}

<legend><strong><a href="{% url 'list_buildings' %}#Aquia">Aquia</a></strong></legend>

<div class="row">
  <div class="col-md-12">
    {% regroup aq_location_visible by get_building as aq_students_by_building %}
    {% for building in aq_students_by_building %}
    <legend><a name="{{ building.grouper }}" href="{{ building.grouper.get_absolute_url }}">{{ building.grouper }}</a></legend>
    <div class="row">
      {% for student in building.list %}
        <div class="col-sm-3 text-center">
          <img class="img-circle img-responsive center center-block" src="{% gravatar_url student.user.email 100 %}" alt="{{ student.user.first_name }} Gravatar picture">
          <h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.user.first_name }} {{ student.user.last_name }}</strong></a></h4>
        </div>
     {% endfor %}
   </div>
   {% empty %}
   No visible students in the database. :'-(
   {% endfor %}
  </div>
</div>

<br />

<legend><strong><a href="{% url 'list_buildings' %}#Rappahannock">Rappahannock</a></strong></legend>

<div class="row">
  <div class="col-md-12">
    {% regroup ra_location_visible by get_building as ra_students_by_building %}
    {% for building in ra_students_by_building %}
    <legend><a name="{{ building.grouper }}" href="{{ building.grouper.get_absolute_url }}">{{ building.grouper }}</a></legend>
    <div class="row">
      {% for student in building.list %}
        <div class="col-sm-3 text-center">
          <img class="img-circle img-responsive center center-block" src="{% gravatar_url student.user.email 100 %}" alt="{{ student.user.first_name }} Gravatar picture">
          <h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.user.first_name }} {{ student.user.last_name }}</strong></a></h4>
        </div>
     {% endfor %}
   </div>
   {% empty %}
   No visible students in the database. :'-(
   {% endfor %}
  </div>
</div>

<br />

<legend><strong><a href="{% url 'list_buildings' %}#Shenandoah">Shenandoah</a></strong></legend>

<div class="row">
  <div class="col-md-12">
    {% regroup sh_location_visible by get_building as sh_students_by_building %}
    {% for building in sh_students_by_building %}
    <legend><a name="{{ building.grouper }}" href="{{ building.grouper.get_absolute_url }}">{{ building.grouper }}</a></legend>
    <div class="row">
      {% for student in building.list %}
        <div class="col-sm-3 text-center">
          <img class="img-circle img-responsive center center-block" src="{% gravatar_url student.user.email 100 %}" alt="{{ student.user.first_name }} Gravatar picture">
          <h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.user.first_name }} {{ student.user.last_name }}</strong></a></h4>
        </div>
     {% endfor %}
   </div>
   {% empty %}
   No visible students in the database. :'-(
   {% endfor %}
  </div>
</div>

<br />

<legend class="text-center">Location not visible because of student <a href="{% url 'currentStudentSettings' %}">privacy settings</a></legend>
<div class="row">
  <div class="col-md-12">
    {% for student in location_hidden %}
      <div class="col-sm-3 text-center">
        <img class="img-circle img-responsive center center-block" src="{% gravatar_url student.user.email 100 %}" alt="{{ student.user.first_name }} Gravatar picture">
        <h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.user.first_name }} {{ student.user.last_name }}</strong></a></h4>
      </div>

    {% endfor %}
  </div>
</div>

{% endblock content %}