mirror of https://github.com/zulip/zulip.git
Make /activity client tab order be deterministic.
Use an array of tuples, not a dictionary, for the client tabs. (imported from commit d0ef09bd7885fbb261227786b90ea2949cea7ab4)
This commit is contained in:
parent
4d730c1691
commit
b8f3b38524
|
@ -14,7 +14,7 @@
|
|||
{% block content %}
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
{% for name, activity in data.iteritems %}
|
||||
{% for name, activity in data %}
|
||||
<li {% if activity.default_tab %} class="active" {% endif %}>
|
||||
<a href="#{{ name }}" data-toggle="tab">{{ name }}</a>
|
||||
</li>
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
<div class="tab-content">
|
||||
|
||||
{% for name, activity in data.iteritems %}
|
||||
{% for name, activity in data %}
|
||||
|
||||
<div class="tab-pane {% if activity.default_tab %} active {% endif %}" id="{{ name }}">
|
||||
<h2>{{ name }} usage</h2>
|
||||
|
|
|
@ -1847,13 +1847,13 @@ def get_activity(request):
|
|||
)
|
||||
|
||||
return render_to_response('zerver/activity.html',
|
||||
{ 'data': {
|
||||
'Website': ActivityTable('website', web_queries, default_tab=True),
|
||||
'Mirror': ActivityTable('zephyr_mirror', api_queries),
|
||||
'API': ActivityTable('API', api_queries),
|
||||
'Android': ActivityTable('Android', api_queries),
|
||||
'iPhone': ActivityTable('iPhone', api_queries)
|
||||
}}, context_instance=RequestContext(request))
|
||||
{ 'data': [
|
||||
('Website', ActivityTable('website', web_queries, default_tab=True)),
|
||||
('Mirror', ActivityTable('zephyr_mirror', api_queries)),
|
||||
('API', ActivityTable('API', api_queries)),
|
||||
('Android', ActivityTable('Android', api_queries)),
|
||||
('iPhone', ActivityTable('iPhone', api_queries))
|
||||
]}, context_instance=RequestContext(request))
|
||||
|
||||
def get_status_list(requesting_user_profile):
|
||||
return {'presences': get_status_dict(requesting_user_profile),
|
||||
|
|
Loading…
Reference in New Issue