detail_floor.html 2.29 KB
Newer Older
1
{% extends 'layouts/base.html' %}
2
{% load humanize %}
David Haynes's avatar
David Haynes committed
3
{% load cache %}
4 5
{% block title %} SRCT Roomlist • {{ floor.building.name }} {{ floor.number|ordinal }}{% endblock %}
{% block content %}
6

7 8 9
<div class="page-header" id="banner">
  <div class="row">
    <div class="col-lg-12 text-center">
10 11
      <h1><strong>SRCT</strong>ROOMLIST</h1>
      <p class="lead"><strong>{{ floor.building.name }} {{ floor.number|ordinal }}</strong></p>
12
    </div>
13
    <div class="col-md-10 col-md-offset-1">
Sherif's avatar
Sherif committed
14 15 16 17 18 19 20
      <ol id="breadcrumbs" class="breadcrumb">
        <li><a href="/">Home</a></li>
        <li><a href="{% url 'list_buildings' %}">Buildings</a></li>
        <li><a href="{{ floor.building.get_absolute_url }}">{{ floor.building.name }}</a></li>
        <li class="active">{{ floor.number|ordinal }} Floor</li>
      </ol>
    </div>
21 22 23
  </div>
</div>

24 25
{% load gravatar %}

26
<div class="row">
David Haynes's avatar
David Haynes committed
27
  {% cache 900 students request.user.username %}
28
  {% for student in students %}
29
  <div class="col-sm-3 text-center">
30
    <img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_first_name_or_uname }} profile picture">
31
    <h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.get_full_name_or_uname }}</strong></a></h4>
32
    <h5><a href="{{ student.major.get_absolute_url }}"><em>{{ student.major.name }}</em></a></h5>
Daniel W Bond's avatar
Daniel W Bond committed
33
    <h5><a href="{{ student.room.get_absolute_url }}">{{ student.room }}</a></h5>
34 35 36
    {% if student.get_flag_count %}
      <p><em>*a number of other floormates say this info is incorrect</em></p>
    {% endif %}
37
  </div>
Daniel W Bond's avatar
Daniel W Bond committed
38 39 40 41 42
  {% if forloop.counter|divisibleby:4 %}
</div>
<br />
<div class="row">
  {% endif %}
43 44
  {% endfor %}
</div>
45

46 47 48 49
<br />

<div class="row">
  <div class="col-md-8 col-md-offset-2">
50 51 52 53 54 55
    <div class="alert alert-info text-center"><strong><em>
    {% if notOnFloor %}
    You don't live on this floor. Depending on individual privacy settings, not all students may be displayed.
    {% elif notInBuilding %}
    You don't live in this building. Depending on individual privacy settings, not all students may be displayed.
    {% else %}
Daniel W Bond's avatar
Daniel W Bond committed
56
    Don't see someone you know who lives here? Tell them about SRCT Roomlist!
57 58
    {% endif %}
    </em></strong></div>
59 60 61
  </div>
</div>

62 63 64 65
<br />
<legend></legend>
{% include 'disclaimer.html' %}

David Haynes's avatar
David Haynes committed
66
{% endcache %}
67
{% endblock %}