2012-09-24 17:17:41 +02:00
|
|
|
{% extends "zephyr/base.html" %}
|
|
|
|
|
2012-10-16 06:03:29 +02:00
|
|
|
{# The app itself. #}
|
|
|
|
|
|
|
|
{# Includes some other templates as tabs. #}
|
2012-09-06 21:13:15 +02:00
|
|
|
{% load jstemplate %}
|
|
|
|
|
2012-09-24 17:17:41 +02:00
|
|
|
{% block customhead %}
|
2012-10-17 19:52:57 +02:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2012-10-10 16:32:59 +02:00
|
|
|
<script id="template_message" type="text/x-handlebars-template">
|
|
|
|
{% rawjstemplate "message" %}
|
2012-09-24 17:10:12 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script id="template_subscription" type="text/x-handlebars-template">
|
|
|
|
{% rawjstemplate "subscription" %}
|
|
|
|
</script>
|
2012-09-24 16:54:30 +02:00
|
|
|
|
2012-10-17 20:34:38 +02:00
|
|
|
<link href="{{ static_hidden }}styles/zephyr.css?dummy_time={% now "U" %}" rel="stylesheet">
|
|
|
|
<link href="{{ static_hidden }}styles/pygments.css" rel="stylesheet">
|
|
|
|
<script type="text/javascript" src="{{ static_third }}jquery/jquery.form.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_third }}xdate/xdate.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_third }}handlebars/handlebars-1.0.rc.1.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_third }}spin/spin.min.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_third }}jquery-mousewheel/jquery.mousewheel.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_third }}jquery-throttle-debounce/jquery.ba-throttle-debounce.min.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/setup.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/dom_access.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/narrow.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/compose.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/subscribe.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/ui.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/hotkey.js"></script>
|
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/zephyr.js"></script>
|
2012-09-19 22:25:13 +02:00
|
|
|
|
|
|
|
{% if debug %}
|
2012-10-17 20:34:38 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/debug.js"></script>
|
2012-09-19 22:25:13 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2012-08-30 19:56:15 +02:00
|
|
|
<script type="text/javascript">
|
2012-10-10 22:59:46 +02:00
|
|
|
{% autoescape off %}
|
2012-10-10 23:53:00 +02:00
|
|
|
|
|
|
|
{# Not escaped, because it's guaranteed by the model to be an integer. #}
|
2012-09-04 18:45:45 +02:00
|
|
|
var initial_pointer = {{ user_profile.pointer }};
|
2012-10-10 23:53:00 +02:00
|
|
|
|
|
|
|
var email = "{{ user_profile.user.email|escapejs }}";
|
|
|
|
var have_initial_messages = {{ have_initial_messages|escapejs }};
|
|
|
|
|
|
|
|
var stream_list = [
|
|
|
|
{% for stream in streams %}
|
|
|
|
"{{ stream|escapejs }}",
|
|
|
|
{% endfor %}
|
|
|
|
];
|
|
|
|
|
|
|
|
var people_list = [
|
|
|
|
{% for person in people %}
|
2012-10-12 22:51:44 +02:00
|
|
|
{ 'email': "{{ person.email|escapejs }}",
|
|
|
|
'full_name': "{{ person.full_name|escapejs }}" },
|
2012-10-10 23:53:00 +02:00
|
|
|
{% endfor %}
|
|
|
|
];
|
|
|
|
|
2012-09-10 20:31:53 +02:00
|
|
|
{% endautoescape %}
|
2012-10-10 22:59:46 +02:00
|
|
|
</script>
|
2012-09-24 17:17:41 +02:00
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
2012-10-04 22:34:00 +02:00
|
|
|
<div class="row">
|
2012-10-05 17:46:07 +02:00
|
|
|
<div class="span3">
|
2012-10-04 22:59:18 +02:00
|
|
|
<div class="row">
|
2012-10-05 17:46:07 +02:00
|
|
|
<div class="span3 sidebar-nav affix">
|
2012-10-17 17:37:36 +02:00
|
|
|
<img class="img-rounded" src="https://secure.gravatar.com/avatar/{{ email_hash }}?d=identicon&s=30" />
|
2012-10-12 01:02:44 +02:00
|
|
|
<span class="my_fullname">{{ user_profile.full_name }}</span>
|
2012-10-11 23:11:30 +02:00
|
|
|
<span class="my_email">{{ user_profile.user.email }}</span>
|
|
|
|
<span class="logout">(<a href="/accounts/logout?next=/accounts/login">not you?</a>)</span>
|
|
|
|
<ul class="nav nav-pills nav-stacked nav-zephyr" id="sidebar">
|
2012-10-12 01:06:42 +02:00
|
|
|
<li title="Home" class="active">
|
2012-10-18 20:12:04 +02:00
|
|
|
<a href="#home" data-toggle="pill" onclick="narrow.show_all_messages()">
|
2012-10-12 01:06:42 +02:00
|
|
|
<i class="icon-home"></i>
|
|
|
|
<span class="hidden-phone"> Home</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li title="Subscriptions">
|
|
|
|
<a href="#subscriptions" data-toggle="pill">
|
|
|
|
<i class="icon-globe"></i>
|
|
|
|
<span class="hidden-phone"> Subscriptions</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li title="Starred" class="disabled">
|
|
|
|
<a href="#">
|
|
|
|
<i class="icon-star"></i>
|
|
|
|
<span class="hidden-phone"> Starred</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li title="Settings">
|
|
|
|
<a href="#settings" data-toggle="pill">
|
|
|
|
<i class="icon-wrench"></i>
|
|
|
|
<span class="hidden-phone"> Settings</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li title="Invite a friend" class="disabled">
|
|
|
|
<a href="#">
|
|
|
|
<i class="icon-envelope"></i>
|
|
|
|
<span class="hidden-phone"> Invite a friend</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
2012-10-11 23:11:30 +02:00
|
|
|
{% if show_debug %}
|
2012-10-12 01:06:42 +02:00
|
|
|
<li title="Debug">
|
|
|
|
<a href="#debug" data-toggle="pill">
|
|
|
|
<i class="icon-barcode"></i>
|
|
|
|
<span class="hidden-phone"> Debug</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
2012-10-11 23:11:30 +02:00
|
|
|
{% endif %}
|
2012-10-17 17:55:11 +02:00
|
|
|
<button type="button" class="visible-phone btn btn-small phone_new_message_button" onclick="compose_button('stream');">New Message</button>
|
2012-10-11 23:11:30 +02:00
|
|
|
</ul>
|
2012-10-12 01:02:44 +02:00
|
|
|
<div class="hidden-phone new_message_button">
|
2012-10-17 17:55:11 +02:00
|
|
|
<button type="button" class="btn btn-large btn-block" id="new_message_button" onclick="compose_button('stream');">New Message</button>
|
2012-10-11 23:11:30 +02:00
|
|
|
</div>
|
2012-10-04 22:59:18 +02:00
|
|
|
|
2012-10-17 20:43:20 +02:00
|
|
|
<div class="alert alert_sidebar alert-error home-error-bar" id="connection-error">
|
2012-10-04 22:59:18 +02:00
|
|
|
<strong>Can't receive messages</strong> — try reloading the page.
|
|
|
|
</div>
|
2012-10-17 20:43:20 +02:00
|
|
|
<div class="alert alert_sidebar alert-error home-error-bar" id="reloading-application">
|
|
|
|
</div>
|
2012-10-04 22:59:18 +02:00
|
|
|
<div class="alert alert_sidebar" id="home-error"></div>
|
2012-10-10 23:33:38 +02:00
|
|
|
<div class="alert alert_sidebar" id="stream-dne">
|
2012-10-10 23:34:52 +02:00
|
|
|
<p>The stream <span class="streamname" id="stream-dne-name"></span> does not exist.</p>
|
2012-10-07 04:17:52 +02:00
|
|
|
<button type="button" id="create-it" class="btn btn-primary">Create and send</button>
|
2012-10-10 23:33:38 +02:00
|
|
|
<button type="button" class="btn" onClick="$('#stream-dne').stop(true).fadeOut(500);">Cancel message</button>
|
2012-10-04 22:59:18 +02:00
|
|
|
</div>
|
2012-10-10 23:33:38 +02:00
|
|
|
<div class="alert alert_sidebar" id="stream-nosub">
|
2012-10-10 23:34:52 +02:00
|
|
|
<p>You're not subscribed to the stream <span class="streamname" id="stream-nosub-name"></span>.</p>
|
2012-10-07 04:17:52 +02:00
|
|
|
<button type="button" id="sub-it" class="btn btn-primary">Subscribe and send</button>
|
2012-10-10 23:33:38 +02:00
|
|
|
<button type="button" class="btn" onClick="$('#stream-nosub').stop(true).fadeOut(500);">Cancel message</button>
|
2012-10-04 22:59:18 +02:00
|
|
|
</div>
|
2012-10-04 22:34:00 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!--/sidebar-->
|
2012-10-05 17:46:07 +02:00
|
|
|
<div class="span9 tab-content" id="application_area">
|
2012-10-11 22:34:57 +02:00
|
|
|
<div class="visible-phone" id="nav_whitespace"></div>
|
2012-09-17 20:59:26 +02:00
|
|
|
<div class="tab-pane active" id="home">
|
|
|
|
{% include "zephyr/home.html" %}
|
2012-09-11 21:33:24 +02:00
|
|
|
</div>
|
2012-10-03 22:21:17 +02:00
|
|
|
<div class="tab-pane" id="subscriptions">
|
2012-09-17 20:59:26 +02:00
|
|
|
{% include "zephyr/subscriptions.html" %}
|
2012-09-10 20:31:53 +02:00
|
|
|
</div>
|
2012-10-03 22:21:17 +02:00
|
|
|
<div class="tab-pane" id="settings">
|
2012-09-21 17:28:18 +02:00
|
|
|
{% include "zephyr/settings.html" %}
|
2012-09-17 20:59:26 +02:00
|
|
|
</div>
|
2012-09-26 00:26:35 +02:00
|
|
|
|
|
|
|
{% if show_debug %}
|
2012-10-03 22:21:17 +02:00
|
|
|
<div class="tab-pane" id="debug">
|
2012-09-26 00:26:35 +02:00
|
|
|
{% include "zephyr/debug.html" %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2012-09-17 20:59:26 +02:00
|
|
|
</div><!--/tab-content-->
|
2012-09-14 21:27:12 +02:00
|
|
|
</div><!--/row-->
|
2012-09-10 20:31:53 +02:00
|
|
|
|
2012-08-28 18:44:51 +02:00
|
|
|
{% endblock %}
|