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 18:04:35 +02:00
|
|
|
<li><a href="/accounts/logout?next=/">Log out</a></li>
|
|
|
|
<li><a href="/subscriptions/">Manage subscriptions</a></li>
|
2012-08-28 22:04:10 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2012-08-28 18:44:51 +02:00
|
|
|
{% block content %}
|
|
|
|
|
2012-09-06 17:22:38 +02:00
|
|
|
<script type="text/javascript" src="/static/third/jquery/jquery.form.js"></script>
|
|
|
|
<script type="text/javascript" src="/static/third/ich/ICanHaz.min.js"></script>
|
2012-08-29 17:12:21 +02:00
|
|
|
<script type="text/javascript" src="/static/js/zephyr.js"></script>
|
2012-08-30 19:56:15 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
var initial_zephyr_json = {{ zephyr_json }};
|
2012-09-04 18:45:45 +02:00
|
|
|
var initial_pointer = {{ user_profile.pointer }};
|
2012-08-31 22:50:24 +02:00
|
|
|
var username = "{{ user_profile.user.username }}";
|
2012-09-04 20:31:23 +02:00
|
|
|
var class_list = {{ classes }};
|
|
|
|
var instance_list = {{ instances }};
|
|
|
|
var people_list = {{ people }};
|
2012-08-30 19:56:15 +02:00
|
|
|
</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">
|
|
|
|
</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>
|
|
|
|
|
2012-08-31 21:33:04 +02:00
|
|
|
<div class="row-fluid" id="connection-error">
|
|
|
|
<div class="span12">
|
|
|
|
<div class="alert alert-error">
|
|
|
|
<strong>Can't receive messages</strong> — try reloading the page.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2012-08-29 18:11:15 +02:00
|
|
|
<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">
|
2012-09-05 23:38:20 +02:00
|
|
|
<div class="alert" id="class-dne">
|
|
|
|
<p>The class <span class="classname" id="class-dne-name"></span> does not exist.</p>
|
|
|
|
<a id="create-it" class="btn btn-primary" href="#">Create and send</a>
|
|
|
|
<a class="btn" onClick="$('#class-dne').stop(true).fadeOut(500);">Cancel message</a>
|
|
|
|
</div>
|
|
|
|
<div class="alert" id="class-nosub">
|
|
|
|
<p>You're not subscribed to the class <span class="classname" id="class-nosub-name"></span>.</p>
|
|
|
|
<a id="sub-it" class="btn btn-primary" href="#">Subscribe and send</a>
|
|
|
|
<a class="btn" onClick="$('#class-nosub').stop(true).fadeOut(500);">Cancel message</a>
|
|
|
|
</div>
|
2012-08-29 01:05:57 +02:00
|
|
|
<div class="tab-pane active" id="class-message">
|
|
|
|
<form action="/zephyr/" method="post" class="zephyr">
|
2012-09-04 23:43:56 +02:00
|
|
|
<input type="hidden" name="type" value="class" />
|
2012-08-29 01:05:57 +02:00
|
|
|
{% 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">
|
2012-09-04 23:43:56 +02:00
|
|
|
<form action="/zephyr/" method="post" class="zephyr">
|
|
|
|
<input type="hidden" name="type" value="personal" />
|
2012-08-29 01:05:57 +02:00
|
|
|
{% 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>
|
2012-09-04 23:43:56 +02:00
|
|
|
<textarea rows="4" cols="60" name="new_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 %}
|