detailStudent.html 6.12 KB
Newer Older
1
2
3
4
{% extends 'layouts/base.html' %}
{% block title %} SRCT Roomlist | {{ student.user.first_name }} {{ student.user.last_name }} {% endblock title %}
{% block content %}
{% load socialaccount %}
Daniel W Bond's avatar
Daniel W Bond committed
5
{% load gravatar %}
6
7
8
{% load cache %}
{% cache 4 student_page request.user.username %}

9
{% get_social_accounts student.user as accounts %}
10
11
<div class="page-header" id="banner">
  <div class="row">
12
    <div class="col-md-2 col-md-offset-1 text-center">
13
      <img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_full_name_or_uname }} profile picture">
14
    </div>
15

16
    <div class="col-md-6 text-center">
17
      <h1><strong>{{ student.get_full_name_or_uname }}</strong></h1>
Daniel W Bond's avatar
Daniel W Bond committed
18
      {% if shares %}
19
        <p class="lead"><strong>
20
21
22
        {% if not student.on_campus %}
          {{ student.get_first_name_or_uname }} doesn't live on campus.
        {% elif student.room == None %}
23
          {{ student.get_first_name_or_uname }} hasn't set their room yet.
24
25
26
27
        {% else %}
          <a href="{{ student.room.get_absolute_url }}">{{ student.room }}</a>
          {% if same_floor %}
            {% if has_flagged %}
28
              <a href="{% url 'deleteConfirmation' student.slug my_flag.slug %}">
29
30
31
32
33
34
35
36
37
38
39
40
41
                <small><span style="padding-left:15px" class="fa-stack fa-lg">
                  <i class="fa fa-flag fa-stack-1x"></i>
                  <i class="fa fa-ban fa-stack-2x text-danger"></i>
                </span></small>
              </a>
            {% else %}
              <a href="{% url 'createConfirmation' student.slug %}">
                <i style="padding-left:15px" class="fa fa-flag"></i>
              </a>
            {% endif %}
          {% endif %}
        {% endif %}
        </strong></p>
42
43
44
        {% if student.get_flag_count > 4 %}
        <p><em>* a number of other floormates say this room info is incorrect</em></p>
        {% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
45
      {% endif %}
46
47
48
49
50
51
      {% if student.on_campus %}
        <p>
          <em>shares room with</em>:
          <span class="label label-default"><strong>{{ student.privacy }}</strong></span>
        </p>
      {% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
52
53
54
55
    </div>
  </div>
</div>

56
57
{% load accounts_extras %}

Daniel W Bond's avatar
Daniel W Bond committed
58
<div class="row">
59
60
61
62
  <div class="col-md-5 col-md-offset-1">
    <table class="table table-hover text-center">
      <tbody>
        <tr>
63
64
65
66
67
68
69
          <td><h4><strong>Major</strong>:
            {% if student.major %}
              {{ student.major.name }}
            {% else %}
              &nbsp;&mdash;
            {% endif %}
          </h4></td>
70
        </tr>
Daniel W Bond's avatar
Daniel W Bond committed
71

72
73
74
75
76
77
78
79
80
        <tr>
          <td><h4><strong>Class of</strong>:
          {% if student.graduating_year == None %}
              &nbsp;&mdash;
          {% else %}
             {{ student.graduating_year|bc }}
          {% endif %}</h4></td>
        </tr>

81
82
83
        <tr>
          <td><h4><strong>Email</strong>: {{ student.user.email }}</h4></td>
        </tr>
84
85
86
87
88
89
90
91
        {% if student.show_gender %}
          <tr>
            <td><h4><strong>Gender</strong>:
              {% for gender in student.gender %}
                {% if gender == 'female' %}
                  <i class="fa fa-venus"></i>
                {% elif gender == 'male' %}
                  <i class="fa fa-mars"></i>
92
                {% elif gender == 'intersex' %}
93
                  <i class="fa fa-transgender"></i>
94
                {% elif gender == 'trans' %}
95
                  <i class="fa fa-transgender-alt"></i>
96
97
98
99
                {% elif gender == 'genderless' %}
                  <i class="fa fa-genderless"></i>
                {% elif gender == 'other' %}
                  <i class="fa fa-mars-stroke-v"></i>
100
101
102
103
104
                {% endif %}
              {% endfor %}
            </h4></td>
          </tr>
        {% endif %}
105
106
107
      </tbody>
    </table>
  </div>
Daniel W Bond's avatar
Daniel W Bond committed
108

109
110
111
112
  <div class="col-md-5">
    <table class="table table-hover text-center">
      <tbody>
        <tr>
113
          <td class="col-md-4">
114
115
           <h4><i class="fa fa-facebook fa-lg"></i></h4>
          </td>
116
          <td class="col-md-8">
117
            {% if accounts.facebook and shares %} <h4><a href="https://facebook.com/{{ accounts.facebook.0.uid }}" target="_blank">Facebook account</a></h4> {% else %} <h4>&mdash;</h4> {% endif %}
118
119
          </td>
        </tr>
Daniel W Bond's avatar
Daniel W Bond committed
120

121
122
123
124
        <tr>
          <td>
            <h4><i class="fa fa-google fa-lg"></i></h4>
          </td>
125
          <td>{% if accounts.google and shares %} <h4><a href="https://plus.google.com/{{ accounts.google.0.uid }}" target="_blank">Google+ account</a></h4> {% else %} <h4>&mdash;</h4> {% endif %}
126
127
          </td>
        </tr>
128

129
130
131
132
133
        <tr>
          <td>
            <h4><i class="fa fa-twitter fa-lg"></i></h4>
          </td>
          <td>
134
            {% if accounts.twitter and shares %} <h4><a href="https://twitter.com/{{ accounts.twitter.0.extra_data.screen_name }}" target="_blank">@{{ accounts.twitter.0.extra_data.screen_name }}</a></h4> {% else %} <h4>&mdash;</h4> {% endif %}
135
136
137
138
139
140
141
142
          </td>
        </tr>

        <tr>
          <td>
            <h4><i class="fa fa-instagram fa-lg"></i></h4>
          </td>
          <td>
143
            {% if accounts.instagram and shares %} <h4><a href="https://instagram.com/{{ accounts.instagram.0.extra_data.username }}" target="_blank">@{{ accounts.instagram.0.extra_data.username }}</a></h4> {% else %} <h4>&mdash;</h4> {% endif %}
144
145
          </td>
        </tr>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

        <tr>
          <td>
            <h4><i class="fa fa-tumblr fa-lg"></i></h4>
          </td>
          <td>
            {% if accounts.tumblr and shares %} <h4><a href="https://{{ accounts.tumblr.0.extra_data.name }}.tumblr.com" target="_blank">@{{ accounts.tumblr.0.extra_data.name }}</a></h4> {% else %} <h4>&mdash;</h4> {% endif %}
          </td>
        </tr>

        <tr>
          <td>
            <h4><i class="fa fa-github fa-lg"></i></h4>
          </td>
          <td>
            {% if accounts.github and shares %} <h4><a href="https://github.com/{{ accounts.github.0.extra_data.login }}" target="_blank">{{ accounts.github.0.extra_data.login }}</a></h4> {% else %} <h4>&mdash;</h4> {% endif %}
          </td>
        </tr>
164
165
      </tbody>
    </table>
166
167
168
  </div>
</div>

169
170
171
172
<br />
<legend></legend>
{% include 'disclaimer.html' %}

173
174
{% endcache %}
{% endblock content %}