2012-08-28 18:44:51 +02:00
|
|
|
{% extends "zephyr/base.html" %}
|
|
|
|
|
2012-08-28 22:04:10 +02:00
|
|
|
{% block nav %}
|
2012-08-30 20:36:57 +02:00
|
|
|
<li><a href="/accounts/logout/?next=/">Log out</a></li>
|
2012-08-28 22:04:10 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2012-08-28 18:44:51 +02:00
|
|
|
{% block content %}
|
|
|
|
|
2012-08-30 17:28:15 +02:00
|
|
|
<script type="text/javascript" src="/static/jquery/jquery.form.js"></script>
|
2012-08-29 17:12:21 +02:00
|
|
|
<script type="text/javascript" src="/static/js/zephyr.js"></script>
|
2012-08-28 18:44:51 +02:00
|
|
|
|
2012-08-29 18:11:15 +02:00
|
|
|
<div class="row-fluid">
|
|
|
|
<div id="main_div" class="span12">
|
2012-08-29 17:56:51 +02:00
|
|
|
<table id="table">
|
|
|
|
{% for zephyr in zephyrs %}
|
|
|
|
<tr id={{ zephyr.id }}>
|
2012-08-29 21:14:55 +02:00
|
|
|
<td class="pointer">{% if user_profile.pointer == zephyr.id %}<p id="selected">▶{% else %}<p>{% endif %}</p></td>
|
2012-08-29 17:56:51 +02:00
|
|
|
<td class="zephyr">
|
2012-08-29 22:23:56 +02:00
|
|
|
<p>
|
2012-08-29 21:49:53 +02:00
|
|
|
|
|
|
|
{% if zephyr.recipient.type == 'class' %}
|
2012-08-29 23:03:18 +02:00
|
|
|
<span onclick="narrow('{{ zephyr.display_recipient }}', '{{ zephyr.id }}')" class="label zephyr_label_clickable zephyr_class">{{ zephyr.display_recipient }}</span>
|
|
|
|
<span onclick="narrow_instance('{{ zephyr.display_recipient }}', '{{ zephyr.instance }}', '{{ zephyr.id }}')" class="label zephyr_label_clickable zephyr_instance">{{ zephyr.instance }}</span>
|
2012-08-29 21:49:53 +02:00
|
|
|
{% else %}
|
2012-08-29 23:03:18 +02:00
|
|
|
<span onclick="narrow_personals('{{ zephyr.id }}')" class="label zephyr_label_clickable zephyr_personal_recipient">{{ zephyr.display_recipient }}</span>
|
2012-08-29 21:49:53 +02:00
|
|
|
←
|
|
|
|
{% endif %}
|
|
|
|
|
2012-08-29 23:03:18 +02:00
|
|
|
<span onclick="prepare_personal('{{ zephyr.sender.user.username }}')" class="label zephyr_label_clickable zephyr_sender">{{ zephyr.sender.user.username }}</span><br />
|
2012-08-29 22:47:53 +02:00
|
|
|
{{ zephyr.content|linebreaksbr }}
|
2012-08-29 17:56:51 +02:00
|
|
|
</p></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
2012-08-29 18:11:15 +02:00
|
|
|
</div>
|
|
|
|
|
2012-08-29 18:54:58 +02:00
|
|
|
<div class="row-fluid" id="narrow_bar">
|
2012-08-29 18:11:15 +02:00
|
|
|
<div class="span12">
|
2012-08-29 18:54:58 +02:00
|
|
|
<button id="unhide" class="btn" disabled=disabled onclick="unhide()">Show all</button>
|
|
|
|
<span id="narrow_indicator"></span>
|
2012-08-29 18:11:15 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr />
|
2012-08-29 17:56:51 +02:00
|
|
|
|
2012-08-29 01:05:57 +02:00
|
|
|
<div class="tabbable container">
|
2012-08-29 20:07:21 +02:00
|
|
|
<ul class="nav nav-tabs" id="zephyr-type-tabs">
|
2012-08-29 01:05:57 +02:00
|
|
|
<li class="active"><a href="#class-message" data-toggle="tab">Class message</a></li>
|
|
|
|
<li><a href="#personal-message" data-toggle="tab">Personal message</a></li>
|
2012-08-30 18:24:16 +02:00
|
|
|
<li class="alert pull-right" id="send-status"></li>
|
2012-08-29 01:05:57 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane active" id="class-message">
|
|
|
|
<form action="/zephyr/" method="post" class="zephyr">
|
|
|
|
{% csrf_token %}
|
|
|
|
<div class="row-fluid">
|
|
|
|
<div class="span6">
|
|
|
|
<label>Class</label>
|
|
|
|
<input type="text" name="class" id="class" value="" />
|
|
|
|
</div>
|
|
|
|
<div class="span6">
|
|
|
|
<label>Instance</label>
|
|
|
|
<input type="text" name="instance" id="instance" value="" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
|
|
<div class="span12">
|
|
|
|
<label>Content</label> <textarea rows="4" cols="60" name="new_zephyr" id="new_zephyr" value="" /></textarea>
|
2012-08-29 20:34:51 +02:00
|
|
|
<input type="submit" value="Zephyr" class="btn" />
|
2012-08-29 01:05:57 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane" id="personal-message">
|
|
|
|
<form action="/personal-zephyr/" method="post" class="zephyr">
|
|
|
|
{% csrf_token %}
|
|
|
|
<div class="row-fluid">
|
|
|
|
<div class="span6">
|
|
|
|
<label>User</label>
|
|
|
|
<input type="text" name="recipient" id="recipient" value="" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
|
|
<div class="span12">
|
|
|
|
<label>Content</label>
|
|
|
|
<textarea rows="4" cols="60" name="new_personal_zephyr" id="new_personal_zephyr" value="" /></textarea>
|
2012-08-29 21:29:29 +02:00
|
|
|
<input type="submit" name="personal_zephyr" value="Send personal" class="btn" />
|
2012-08-29 01:05:57 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-08-29 00:36:30 +02:00
|
|
|
</div>
|
2012-08-28 18:44:51 +02:00
|
|
|
|
|
|
|
{% endblock %}
|