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

David Haynes's avatar
David Haynes committed
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

{% 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>

16
17
18
19
20
21
22
23
24
25
26
{% regroup majors by first_letter as majors_by_letter %}

<div class="row">
  <div class="col-md-10 col-md-offset-1 text-center"><h3>
    &middot;
    {% for letter in majors_by_letter %}
      <a href="#{{ letter.grouper }}">{{ letter.grouper }}</a> &middot;
    {% endfor %}
  </h3></div>
</div>

Daniel W Bond's avatar
Daniel W Bond committed
27
28
29
30
31
32
33
<div class="row">
  <div class="col-md-10 col-md-offset-1">
    {% 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">
34
            <a href="{{ major.get_absolute_url }}" class="btn btn-primary btn-lg btn-block">{{ major.name }}</a>
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
          </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 %}