zulip/templates/zephyr/index.html

289 lines
13 KiB
HTML
Raw Normal View History

{% extends "zephyr/base.html" %}
{# The app itself. #}
{# Includes some other templates as tabs. #}
{% load jstemplate %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script id="template_message" type="text/x-handlebars-template">
{% rawjstemplate "message" %}
</script>
<script id="template_subscription" type="text/x-handlebars-template">
{% rawjstemplate "subscription" %}
</script>
<script id="template_invite_subscription" type="text/x-handlebars-template">
{% rawjstemplate "invite_subscription" %}
</script>
<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>
<script id="template_timeinfo_popover_content" type="text/x-handlebars-template">
{% rawjstemplate "timeinfo_popover_content" %}
</script>
<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/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>
<script type="text/javascript" src="{{ static_hidden }}js/util.js"></script>
<script type="text/javascript" src="/static/third/spectrum/spectrum.js"></script>
<link rel="stylesheet" href="/static/third/spectrum/spectrum.css" />
<script type="text/javascript" src="{{ static_hidden }}js/setup.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/rows.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/narrow.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/reload.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/compose.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/subs.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/ui.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/typeahead_helper.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/search.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/composebox_typeahead.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/hotkey.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/notifications.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/hashchange.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/invite.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/zephyr.js"></script>
{% if debug %}
<script type="text/javascript" src="{{ static_hidden }}js/debug.js"></script>
{% endif %}
<script type="text/javascript">
{% autoescape off %}
{# 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 }};
var poll_timeout = {{ poll_timeout }};
var fullname = "{{ user_profile.full_name|escapejs }}";
var email = "{{ user_profile.user.email|escapejs }}";
var domain = "{{ user_profile.realm.domain|escapejs }}";
var have_initial_messages = {{ have_initial_messages|escapejs }};
var desktop_notifications_enabled = {{ desktop_notifications_enabled|escapejs }};
{% if lurk_stream %}
var lurk_stream = "{{ lurk_stream|escapejs }}";
{% else %}
var lurk_stream = undefined;
{% endif %}
var stream_list = [
{% for stream in streams %}
"{{ stream|escapejs }}",
{% endfor %}
];
var people_list = [
{% for person in people %}
{ 'email': "{{ person.email|escapejs }}",
'full_name': "{{ person.full_name|escapejs }}" },
{% endfor %}
];
{% endautoescape %}
</script>
{% endblock %}
{% block content %}
<div class="navbar navbar-fixed-top" id="top_navbar">
<div class="navbar-inner">
<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">
<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>
<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>
<li title="Streams">
<a href="#subscriptions" data-toggle="tab">
<i class="icon-globe"></i> Streams
</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>
</div>
</div>
<div id="navbar-spacer"></div>
<div class="row">
<div class="span3">
<div class="row">
<div class="span3 sidebar-nav affix hidden-phone">
<span>
<img class="img-rounded gravatar-profile"
src="https://secure.gravatar.com/avatar/{{ email_hash }}?d=identicon&s=60" />
</span>
<span class="my_fullname">{{ user_profile.full_name }}</span>
<span class="my_email">{{ user_profile.user.email }}</span>
<div class="new_message_button">
<button type="button" class="btn btn-large btn-block"
id="left_bar_compose_stream_button_big"
onclick="compose.set_mode('stream');">
<i class="icon-bullhorn"></i> New stream message
</button>
</div>
<div class="new_message_button">
<button type="button" class="btn btn-large btn-block"
id="left_bar_compose_private_button_big"
onclick="compose.set_mode('private');">
<i class="icon-user"></i> New private message
</button>
</div>
<div class="alert alert_sidebar alert-error home-error-bar" id="connection-error">
<strong>Can't receive messages</strong>
&mdash; retrying soon. <a class="cursor_pointer" onclick="restart_get_updates({dont_block: true});">Try now</a>.
</div>
<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>
&mdash; 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">
</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>
</div>
</div>
</div><!--/sidebar-->
<div class="span9 tab-content" id="application_area">
<div class="tab-pane active" id="home">
{% include "zephyr/home.html" %}
</div>
<div class="tab-pane" id="subscriptions">
{% include "zephyr/subscriptions.html" %}
</div>
<div class="tab-pane" id="settings">
{% include "zephyr/settings.html" %}
</div>
{% if show_debug %}
<div class="tab-pane" id="debug">
{% include "zephyr/debug.html" %}
</div>
{% endif %}
</div><!--/tab-content-->
</div><!--/row-->
{% include "zephyr/keyboard_shortcuts.html" %}
{% include "zephyr/markdown_help.html" %}
{% include "zephyr/invite_user.html" %}
{% endblock %}