mirror of https://github.com/zulip/zulip.git
Fix the Admin page not working for newly-knighted users.
Previously, while you'd get the event saying you'd been knighted, which would make the Administration tab visible, clicking on the tab would error out because the admin page HTML was never sent over on page load (since you weren't an admin at that point). (imported from commit 90ad351533515bebece630d67baf4b142d320754)
This commit is contained in:
parent
ac3f93d760
commit
7085dca1ce
|
@ -71,6 +71,10 @@ function populate_streams (streams_data) {
|
|||
}
|
||||
|
||||
exports.setup_page = function () {
|
||||
var admin_tab = templates.render('admin_tab');
|
||||
$("#administration").html(admin_tab);
|
||||
$("#administration-status").hide();
|
||||
|
||||
// create loading indicators
|
||||
util.make_loading_indicator($('#admin_page_users_loading_indicator'));
|
||||
util.make_loading_indicator($('#admin_page_bots_loading_indicator'));
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
{# Administration panel #}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="administration">
|
||||
|
@ -71,4 +69,3 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -72,7 +72,6 @@ var page_params = {{ page_params }};
|
|||
{% include "zerver/subscriptions.html" %}
|
||||
</div>
|
||||
<div class="tab-pane" id="administration">
|
||||
{% include "zerver/administration.html" %}
|
||||
</div>
|
||||
<div class="tab-pane" id="settings">
|
||||
{% include "zerver/settings.html" %}
|
||||
|
|
|
@ -66,6 +66,15 @@ function render(template_name, args) {
|
|||
global.write_test_output("actions_popover_content.handlebars", html);
|
||||
}());
|
||||
|
||||
(function admin_tab() {
|
||||
var html = render('admin_tab');
|
||||
var admin_features = ["admin_users_table", "admin_bots_table",
|
||||
"admin_streams_table", "admin_deactivated_users_table"];
|
||||
_.each(admin_features, function (admin_feature) {
|
||||
assert.notEqual($(html).find("#" + admin_feature).length, 0);
|
||||
});
|
||||
}());
|
||||
|
||||
(function admin_streams_list() {
|
||||
var html = '<table>';
|
||||
var streams = ['devel', 'trac', 'zulip'];
|
||||
|
|
Loading…
Reference in New Issue