mirror of https://github.com/zulip/zulip.git
admin: Show a lock icon next to private streams.
(imported from commit 26829016cf219b55aef0ef45187667b0a9bd86fd)
This commit is contained in:
parent
eeb8464f4d
commit
20f2baa614
|
@ -87,8 +87,8 @@ exports.setup_page = function () {
|
|||
});
|
||||
|
||||
// Populate streams table
|
||||
channel.post({
|
||||
url: '/json/get_public_streams',
|
||||
channel.get({
|
||||
url: '/json/streams?include_public=true&include_subscribed=true',
|
||||
timeout: 10*1000,
|
||||
idempotent: true,
|
||||
success: populate_streams,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{{#with stream}}
|
||||
<tr class="stream_row">
|
||||
<td>
|
||||
{{#if invite_only}}<i class="icon-vector-lock "></i>{{/if}}
|
||||
<span class="stream_name">{{name}}</span>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -71,11 +71,9 @@ var page_params = {{ page_params }};
|
|||
<div class="tab-pane" id="subscriptions">
|
||||
{% include "zerver/subscriptions.html" %}
|
||||
</div>
|
||||
{% if is_admin %}
|
||||
<div class="tab-pane" id="administration">
|
||||
{% include "zerver/administration.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="tab-pane" id="settings">
|
||||
{% include "zerver/settings.html" %}
|
||||
</div>
|
||||
|
|
|
@ -70,7 +70,7 @@ function render(template_name, args) {
|
|||
var html = '<table>';
|
||||
var streams = ['devel', 'trac', 'zulip'];
|
||||
_.each(streams, function (stream) {
|
||||
var args = {stream: {name: stream}};
|
||||
var args = {stream: {name: stream, invite_only: false}};
|
||||
html += render('admin_streams_list', args);
|
||||
});
|
||||
html += "</table>";
|
||||
|
|
|
@ -1065,8 +1065,10 @@ def get_streams_backend(request, user_profile,
|
|||
# We're including nothing, so don't bother hitting the DB.
|
||||
query = []
|
||||
|
||||
streams = sorted({"name": stream.name, "description": stream.description}
|
||||
for stream in query)
|
||||
streams = sorted([{"name": stream.name, "description": stream.description,
|
||||
"invite_only": stream.invite_only} for stream in query],
|
||||
key=lambda elt: elt["name"])
|
||||
|
||||
return json_success({"streams": streams})
|
||||
|
||||
def get_public_streams_backend(request, user_profile):
|
||||
|
|
Loading…
Reference in New Issue