Disable some buttons in embedded widget.

(imported from commit 7d6d4725b139ea71c579dfd7d19c38d7bb11ee44)
This commit is contained in:
Tim Abbott 2013-12-13 16:10:06 -05:00
parent 2276c6e524
commit 150ca939b1
3 changed files with 5 additions and 2 deletions

View File

@ -10,12 +10,14 @@
<i class="icon-vector-bullhorn"></i><span class="compose_stream_button_label">&nbsp;&nbsp;New stream message</span> <i class="icon-vector-bullhorn"></i><span class="compose_stream_button_label">&nbsp;&nbsp;New stream message</span>
</button> </button>
</span> </span>
{%if not embedded %}
<span class="new_message_button"> <span class="new_message_button">
<button type="button" class="btn btn-large compose_private_button" <button type="button" class="btn btn-large compose_private_button"
id="left_bar_compose_private_button_big" title="New private message (C)"> id="left_bar_compose_private_button_big" title="New private message (C)">
<i class="icon-vector-user"></i><span class="compose_private_button_label">&nbsp;&nbsp;New private message</span> <i class="icon-vector-user"></i><span class="compose_private_button_label">&nbsp;&nbsp;New private message</span>
</button> </button>
</span> </span>
{% endif %}
</div> </div>
</div> </div>
<div class="message_comp compose-content"> <div class="message_comp compose-content">

View File

@ -7,7 +7,7 @@
</div> </div>
<div class="column-middle" id="navbar-middle"> <div class="column-middle" id="navbar-middle">
<div class="column-middle-inner"> <div class="column-middle-inner">
<div id="streamlist-toggle"> <div id="streamlist-toggle" {%if embedded %} style="visibility: hidden"{% endif %}>
<a href="#" id="streamlist-toggle-button" role="button"><i class="icon-vector-reorder"></i> <a href="#" id="streamlist-toggle-button" role="button"><i class="icon-vector-reorder"></i>
<span id="streamlist-toggle-unreadcount">0</span> <span id="streamlist-toggle-unreadcount">0</span>
</a> </a>
@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<div class="column-right"> <div class="column-right">
<div id="navbar-buttons"> <div id="navbar-buttons" {%if embedded %} style="visibility: hidden"{% endif %}>
<ul class="nav" role="navigation"> <ul class="nav" role="navigation">
<li class="dropdown actual-dropdown-menu" id="gear-menu"> <li class="dropdown actual-dropdown-menu" id="gear-menu">
<a id="settings-dropdown" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"> <a id="settings-dropdown" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">

View File

@ -862,6 +862,7 @@ def home(request):
'is_admin': user_profile.is_admin(), 'is_admin': user_profile.is_admin(),
'show_webathena': user_profile.realm.domain == "mit.edu", 'show_webathena': user_profile.realm.domain == "mit.edu",
'enable_feedback': settings.ENABLE_FEEDBACK, 'enable_feedback': settings.ENABLE_FEEDBACK,
'embedded': narrow_stream is not None,
'show_autoscroll_forever_option': page_params["show_autoscroll_forever_option"] 'show_autoscroll_forever_option': page_params["show_autoscroll_forever_option"]
}, },
context_instance=RequestContext(request)) context_instance=RequestContext(request))