detail_room.html 2.31 KB
Newer Older
1
{% extends 'layouts/base.html' %}
2
{% block title %} SRCT Roomlist • {{ room.floor.building.name }} {{ room.number }}{% endblock %}
3
{% block content %}
4
{% load cache %}
5 6
{% cache 120 room_students request.user.username room %}
{% load humanize %}
Sherif's avatar
Sherif committed
7

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

Daniel W Bond's avatar
Daniel W Bond committed
26 27
{% load gravatar %}

28 29
<div class="row">
  {% for student in students %}
Daniel W Bond's avatar
Daniel W Bond committed
30
  <div class="col-sm-3 text-center">
31
    <img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_first_name_or_uname }} profile picture">
32
    <h4><a href="{{ student.get_absolute_url }}"><strong>{{ student.get_full_name_or_uname }}</strong></a></h4>
33
    <h5><a href="{{ student.major.get_absolute_url }}"><em>{{ student.major.name }}</em></a></h5>
34 35 36
    {% 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
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 45
  {% endfor %}
</div>

Daniel W Bond's avatar
Daniel W Bond committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<br />

<div class="row">
  <div class="col-md-8 col-md-offset-2">
    <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 %}
    Don't see one of your roommates? Tell them about SRCT Roomlist!
    {% endif %}
    </em></strong></div>
  </div>
</div>

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

66
{% endcache %}
67
{% endblock content %}