detail_major.html 4.45 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

{% 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">
30
31
          <img class="img-circle img-responsive center center-block" src="{% gravatar_url student.user.email 100 %}" alt="{{ student.get_first_name }} Gravatar picture">
          <h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.get_full_name }}</strong></a></h4>
32
33
34
          {% if student.get_flag_count > 4 %}
            <p><em>* a number of other floormates say this info is incorrect</em></p>
          {% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
        </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>
58
59
60
          {% if student.get_flag_count > 4 %}
            <p><em>* a number of other floormates say this info is incorrect</em></p>
          {% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
        </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>
84
85
86
          {% if student.get_flag_count > 4 %}
            <p><em>* a number of other floormates say this info is incorrect</em></p>
          {% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
87
88
89
90
91
92
93
94
95
96
97
        </div>
     {% endfor %}
   </div>
   {% empty %}
   No visible students in the database. :'-(
   {% endfor %}
  </div>
</div>

<br />

98
99
100
101
102
103
104
105
106
107
108
{% if location_hidden %}
  <legend class="text-center">Location not visible because of student <a href="{% url 'updateStudent' request.user.username %}">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>
Daniel W Bond's avatar
Daniel W Bond committed
109
  </div>
110
{% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
111

112
113
114
115
<br />
<legend></legend>
{% include 'disclaimer.html' %}

Daniel W Bond's avatar
Daniel W Bond committed
116
{% endblock content %}