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-11-02 16:59:54 +01:00
|
|
|
|
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-12-05 22:48:15 +01:00
|
|
|
<script id="template_invite_subscription" type="text/x-handlebars-template">
|
|
|
|
{% rawjstemplate "invite_subscription" %}
|
|
|
|
</script>
|
|
|
|
|
2012-10-18 20:23:57 +02:00
|
|
|
<script id="template_userinfo_popover_title" type="text/x-handlebars-template">
|
|
|
|
{% rawjstemplate "userinfo_popover_title" %}
|
|
|
|
</script>
|
|
|
|
<script id="template_userinfo_popover_content" type="text/x-handlebars-template">
|
|
|
|
{% rawjstemplate "userinfo_popover_content" %}
|
|
|
|
</script>
|
2012-11-27 22:30:47 +01:00
|
|
|
<script id="template_timeinfo_popover_content" type="text/x-handlebars-template">
|
|
|
|
{% rawjstemplate "timeinfo_popover_content" %}
|
|
|
|
</script>
|
2012-10-18 20:23:57 +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">
|
2012-10-31 19:00:40 +01:00
|
|
|
<script type="text/javascript" src="/static/third/jquery/jquery.form.js"></script>
|
|
|
|
<script type="text/javascript" src="/static/third/jquery/jquery.highlight.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/third/jquery.idle/jquery.idle.js"></script>
|
|
|
|
<script type="text/javascript" src="/static/third/jquery-autosize/jquery.autosize.js"></script>
|
2012-11-30 18:33:32 +01:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/util.js"></script>
|
2012-11-19 16:47:43 +01:00
|
|
|
<script type="text/javascript" src="/static/third/spectrum/spectrum.js"></script>
|
|
|
|
<link rel="stylesheet" href="/static/third/spectrum/spectrum.css" />
|
2012-10-17 20:34:38 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/setup.js"></script>
|
2012-10-18 20:46:06 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/rows.js"></script>
|
2012-10-17 20:34:38 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/narrow.js"></script>
|
2012-10-29 21:02:46 +01:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/reload.js"></script>
|
2012-10-17 20:34:38 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/compose.js"></script>
|
2012-10-18 21:42:08 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/subs.js"></script>
|
2012-10-17 20:34:38 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/ui.js"></script>
|
2012-11-18 19:04:00 +01:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/typeahead_helper.js"></script>
|
2012-10-26 16:59:38 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/search.js"></script>
|
2012-11-01 18:01:33 +01:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/composebox_typeahead.js"></script>
|
2012-10-17 20:34:38 +02:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/hotkey.js"></script>
|
2012-11-23 23:53:38 +01:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/notifications.js"></script>
|
2012-12-07 20:52:39 +01:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/hashchange.js"></script>
|
2012-12-05 22:48:15 +01:00
|
|
|
<script type="text/javascript" src="{{ static_hidden }}js/invite.js"></script>
|
2012-10-17 20:34:38 +02:00
|
|
|
<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
|
|
|
|
2013-01-16 00:52:57 +01:00
|
|
|
{# Not escaped, because it's guaranteed to be an integer (either the UserProfile's pointer, or the id of a Stream, or -1). #}
|
|
|
|
var initial_pointer = {{ initial_pointer }};
|
2012-10-10 23:53:00 +02:00
|
|
|
|
2012-12-11 18:08:18 +01:00
|
|
|
var poll_timeout = {{ poll_timeout }};
|
|
|
|
|
2013-01-09 23:49:54 +01:00
|
|
|
var fullname = "{{ user_profile.full_name|escapejs }}";
|
2012-10-10 23:53:00 +02:00
|
|
|
var email = "{{ user_profile.user.email|escapejs }}";
|
2012-11-26 23:57:31 +01:00
|
|
|
var domain = "{{ user_profile.realm.domain|escapejs }}";
|
2012-10-10 23:53:00 +02:00
|
|
|
var have_initial_messages = {{ have_initial_messages|escapejs }};
|
2013-01-09 00:10:37 +01:00
|
|
|
var desktop_notifications_enabled = {{ desktop_notifications_enabled|escapejs }};
|
2012-10-10 23:53:00 +02:00
|
|
|
|
2013-01-16 00:52:57 +01:00
|
|
|
{% if lurk_stream %}
|
|
|
|
var lurk_stream = "{{ lurk_stream|escapejs }}";
|
|
|
|
{% else %}
|
|
|
|
var lurk_stream = undefined;
|
|
|
|
{% endif %}
|
|
|
|
|
2012-10-10 23:53:00 +02:00
|
|
|
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 %}
|
2013-01-24 23:36:29 +01:00
|
|
|
<div class="navbar navbar-fixed-top" id="top_navbar">
|
2013-01-16 21:40:04 +01:00
|
|
|
<div class="navbar-inner">
|
2013-01-16 21:42:35 +01:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="span3 hidden-phone">
|
|
|
|
<a class="brand" href="#">Humbug</a>
|
|
|
|
</div>
|
|
|
|
<div class="span9" id="navbar-middle">
|
|
|
|
<a class="brand skinny-user-gravatar visible-phone" href="#"
|
|
|
|
title="{{user_profile.full_name}} - {{user_profile.user.email}}">
|
|
|
|
<img class="img-rounded gravatar-profile"
|
|
|
|
src="https://secure.gravatar.com/avatar/{{ email_hash }}?d=identicon&s=30" />
|
|
|
|
</a>
|
|
|
|
<div id="searchbox">
|
|
|
|
<form id="searchbox_form" class="form-search navbar-search">
|
|
|
|
<div id="search_arrows">
|
|
|
|
<input class="search-query" id="search_query" type="text" placeholder="Search…"
|
|
|
|
autocomplete="off">
|
|
|
|
<button class="btn search_button search_button_middle" type="button" id="search_up"><i class="icon-chevron-up"></i></button>
|
|
|
|
<button class="btn search_button search_button_middle" type="button" id="search_down"><i class="icon-chevron-down"></i></button>
|
|
|
|
<button class="btn search_button" type="button" id="search_exit"><i class="icon-remove"></i></button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div><!-- /searchbox -->
|
|
|
|
|
|
|
|
<div id="navbar-buttons">
|
|
|
|
<ul class="nav" role="navigation">
|
|
|
|
<!-- stuff that gets visible in skinny mode -->
|
|
|
|
<li class="visible-phone" title="New stream message">
|
|
|
|
<a href="#" onclick="compose.set_mode('stream'); return false;">
|
|
|
|
<i class="icon-bullhorn"></i>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="visible-phone" title="New private message">
|
|
|
|
<a href="#" onclick="compose.set_mode('private'); return false;">
|
|
|
|
<i class="icon-user"></i>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<!-- /stuff that gets visible in skinny mode -->
|
|
|
|
<li class="dropdown" id="gear-menu">
|
2013-01-22 21:03:29 +01:00
|
|
|
<a id="settings-dropdown" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
|
|
|
|
<span class="glyphicons cogwheel"><i></i></span><b class="caret"></b>
|
|
|
|
</a>
|
2013-01-16 21:42:35 +01:00
|
|
|
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="settings-dropdown">
|
|
|
|
<li title="Home">
|
|
|
|
<a href="#home" data-toggle="tab" onclick="narrow.restore_home_state();">
|
|
|
|
<i class="icon-home"></i>
|
|
|
|
{% if lurk_stream %}Stream {{ lurk_stream }}{% else %}Home{% endif %}
|
|
|
|
</a>
|
|
|
|
</li>
|
2013-01-23 20:26:03 +01:00
|
|
|
<li title="Streams">
|
2013-01-16 21:42:35 +01:00
|
|
|
<a href="#subscriptions" data-toggle="tab">
|
2013-01-23 20:26:03 +01:00
|
|
|
<i class="icon-globe"></i> Streams
|
2013-01-16 21:42:35 +01:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li title="Settings">
|
|
|
|
<a href="#settings" data-toggle="tab">
|
|
|
|
<i class="icon-wrench"></i> Settings
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li title="Keyboard shortcuts">
|
|
|
|
<a href="#keyboard-shortcuts" role="button" data-toggle="modal">
|
|
|
|
<i class="icon-info-sign"></i> Keyboard shortcuts
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li title="Feedback">
|
|
|
|
<a href="#feedback" onclick="compose.start('private', { 'private_message_recipient': 'feedback@humbughq.com' });">
|
|
|
|
<i class="icon-comment"></i> Feedback
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% if show_invites %}
|
|
|
|
<li title="Invite users to Humbug">
|
|
|
|
<a href="#invite-user" role="button" data-toggle="modal">
|
|
|
|
<i class="icon-gift"></i> Invite users to Humbug
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li title="Log out">
|
|
|
|
<a href="/accounts/logout">
|
|
|
|
<i class="icon-off"></i> Log out
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% if show_debug %}
|
|
|
|
<li title="Debug">
|
|
|
|
<a href="#debug" data-toggle="tab">
|
|
|
|
<i class="icon-barcode"></i> Debug
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if show_activity %}
|
|
|
|
<li title="Activity">
|
|
|
|
<a href="/activity" target="_blank">
|
|
|
|
<i class="icon-eye-open"></i> Activity
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-01-16 21:40:04 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-01-16 21:42:35 +01:00
|
|
|
<div id="navbar-spacer"></div>
|
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">
|
2013-01-16 21:42:35 +01:00
|
|
|
<div class="span3 sidebar-nav affix hidden-phone">
|
2012-10-23 18:03:50 +02:00
|
|
|
<span>
|
2013-01-16 21:42:35 +01:00
|
|
|
<img class="img-rounded gravatar-profile"
|
2012-10-25 06:09:28 +02:00
|
|
|
src="https://secure.gravatar.com/avatar/{{ email_hash }}?d=identicon&s=60" />
|
2012-10-23 18:03:50 +02:00
|
|
|
</span>
|
2012-10-12 01:02:44 +02:00
|
|
|
<span class="my_fullname">{{ user_profile.full_name }}</span>
|
2013-01-16 21:42:35 +01:00
|
|
|
<span class="my_email">{{ user_profile.user.email }}</span>
|
|
|
|
<div class="new_message_button">
|
2012-11-08 19:09:15 +01:00
|
|
|
<button type="button" class="btn btn-large btn-block"
|
2012-11-13 20:50:36 +01:00
|
|
|
id="left_bar_compose_stream_button_big"
|
2013-01-11 22:14:45 +01:00
|
|
|
onclick="compose.set_mode('stream');">
|
2012-12-06 00:48:15 +01:00
|
|
|
<i class="icon-bullhorn"></i> New stream message
|
2012-11-08 19:09:15 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
2013-01-16 21:42:35 +01:00
|
|
|
<div class="new_message_button">
|
2012-11-08 19:09:15 +01:00
|
|
|
<button type="button" class="btn btn-large btn-block"
|
2012-11-13 20:50:36 +01:00
|
|
|
id="left_bar_compose_private_button_big"
|
2013-01-11 22:14:45 +01:00
|
|
|
onclick="compose.set_mode('private');">
|
2012-12-06 00:48:15 +01:00
|
|
|
<i class="icon-user"></i> New private message
|
2012-11-08 19:09:15 +01:00
|
|
|
</button>
|
2012-10-11 23:11:30 +02:00
|
|
|
</div>
|
2012-10-04 22:59:18 +02:00
|
|
|
|
2012-11-02 21:54:49 +01:00
|
|
|
<div class="alert alert_sidebar alert-error home-error-bar" id="connection-error">
|
2012-11-15 20:15:29 +01:00
|
|
|
<strong>Can't receive messages</strong>
|
2012-11-20 23:15:50 +01:00
|
|
|
— retrying soon. <a class="cursor_pointer" onclick="restart_get_updates({dont_block: true});">Try now</a>.
|
2012-11-02 21:54:49 +01:00
|
|
|
</div>
|
2012-11-20 22:13:06 +01:00
|
|
|
<div class="alert alert_sidebar alert-error home-error-bar" id="zephyr-mirror-error">
|
|
|
|
<strong>Messages you send are not being mirrored to MIT zephyr</strong>
|
|
|
|
— Please check that you are still running the MIT
|
|
|
|
Zephyr mirroring bot. <a class="cursor_pointer" onclick="restart_get_updates({dont_block: true});">Check now</a>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert_sidebar alert-error home-error-bar" id="reloading-application">
|
2012-11-02 21:54:49 +01:00
|
|
|
</div>
|
|
|
|
<div class="alert alert_sidebar" id="home-error"></div>
|
|
|
|
<div class="alert alert_sidebar" id="stream-dne">
|
|
|
|
<p>The stream <span class="streamname" id="stream-dne-name"></span> does not exist.</p>
|
|
|
|
<button type="button" id="create-it" class="btn btn-primary">Create and send</button>
|
|
|
|
<button type="button" class="btn" onClick="$('#stream-dne').stop(true).fadeOut(500);">
|
|
|
|
Cancel message
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert_sidebar" id="stream-nosub">
|
|
|
|
<p>You're not subscribed to the stream <span class="streamname" id="stream-nosub-name"></span>.</p>
|
|
|
|
<button type="button" id="sub-it" class="btn btn-primary">Subscribe and send</button>
|
|
|
|
<button type="button" class="btn" onClick="$('#stream-nosub').stop(true).fadeOut(500);">
|
|
|
|
Cancel message
|
|
|
|
</button>
|
|
|
|
</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-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-10-24 22:53:19 +02:00
|
|
|
{% include "zephyr/keyboard_shortcuts.html" %}
|
2012-11-02 22:29:13 +01:00
|
|
|
{% include "zephyr/markdown_help.html" %}
|
2012-12-05 22:48:15 +01:00
|
|
|
{% include "zephyr/invite_user.html" %}
|
2012-09-10 20:31:53 +02:00
|
|
|
|
2012-08-28 18:44:51 +02:00
|
|
|
{% endblock %}
|