list_majors.html 1.06 KB
Newer Older
Daniel W Bond's avatar
Daniel W Bond committed
1
2
3
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
{% extends 'layouts/base.html' %}

{% block title %} SRCT RoomList | Majors {% endblock title %}

{% 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>Majors</strong></p>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-md-10 col-md-offset-1">
    {% regroup majors by first_letter as majors_by_letter %}
    {% for letter in majors_by_letter %}
    <legend><a name="{{ letter.grouper }}" href="#{{ letter.grouper }}">{{ letter.grouper }}</a></legend>
      <div class="row">
      {% for major in letter.list %}
          <div class="col-md-6 text-center">
            <a href="#" class="btn btn-primary btn-lg btn-block">{{ major.name }}</a>
          </div>
        {% if forloop.counter|divisibleby:2 %}
        </div>
        <br />
      <div class="row">
      {% endif %}
      {% endfor %}
    </div>
    <br />
    {% empty %}
    No majors in the database. :'-(
    {% endfor %}
  </div>
</div>

{% endblock content %}