mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	templates: Move activity templates to /templates/corporate/activity.
Also, renames `ad_hoc_query.html` to `activity_table.html`, `realm_summary_table.html` to `installation_activity_table.html`, and `activity_details_template.html` to `activity.html`. Removes the style attribute in the installation activity template and uses a CSS class, "installation-activity-header", to center the h3 and p tags instead. This removes an exception from the custom lint check.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							df2f4b6469
						
					
				
				
					commit
					efd0d689fc
				
			@@ -66,7 +66,7 @@ def make_table(
 | 
				
			|||||||
    data = dict(title=title, cols=cols, rows=rows, totals=totals, stats_link=stats_link)
 | 
					    data = dict(title=title, cols=cols, rows=rows, totals=totals, stats_link=stats_link)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    content = loader.render_to_string(
 | 
					    content = loader.render_to_string(
 | 
				
			||||||
        "analytics/ad_hoc_query.html",
 | 
					        "corporate/activity/activity_table.html",
 | 
				
			||||||
        dict(data=data),
 | 
					        dict(data=data),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -271,7 +271,7 @@ def realm_summary_table() -> str:
 | 
				
			|||||||
    ]
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    content = loader.render_to_string(
 | 
					    content = loader.render_to_string(
 | 
				
			||||||
        "analytics/realm_summary_table.html",
 | 
					        "corporate/activity/installation_activity_table.html",
 | 
				
			||||||
        dict(
 | 
					        dict(
 | 
				
			||||||
            rows=rows,
 | 
					            rows=rows,
 | 
				
			||||||
            totals=total_row,
 | 
					            totals=total_row,
 | 
				
			||||||
@@ -291,7 +291,7 @@ def get_installation_activity(request: HttpRequest) -> HttpResponse:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return render(
 | 
					    return render(
 | 
				
			||||||
        request,
 | 
					        request,
 | 
				
			||||||
        "analytics/activity_details_template.html",
 | 
					        "corporate/activity/activity.html",
 | 
				
			||||||
        context=dict(data=content, title=title, is_home=True),
 | 
					        context=dict(data=content, title=title, is_home=True),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -344,7 +344,7 @@ def get_integrations_activity(request: HttpRequest) -> HttpResponse:
 | 
				
			|||||||
    content = make_table(title, cols, rows)
 | 
					    content = make_table(title, cols, rows)
 | 
				
			||||||
    return render(
 | 
					    return render(
 | 
				
			||||||
        request,
 | 
					        request,
 | 
				
			||||||
        "analytics/activity_details_template.html",
 | 
					        "corporate/activity/activity.html",
 | 
				
			||||||
        context=dict(
 | 
					        context=dict(
 | 
				
			||||||
            data=content,
 | 
					            data=content,
 | 
				
			||||||
            title=title,
 | 
					            title=title,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -164,7 +164,7 @@ def get_realm_activity(request: HttpRequest, realm_str: str) -> HttpResponse:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return render(
 | 
					    return render(
 | 
				
			||||||
        request,
 | 
					        request,
 | 
				
			||||||
        "analytics/activity_details_template.html",
 | 
					        "corporate/activity/activity.html",
 | 
				
			||||||
        context=dict(
 | 
					        context=dict(
 | 
				
			||||||
            data=content,
 | 
					            data=content,
 | 
				
			||||||
            title=title,
 | 
					            title=title,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -216,6 +216,6 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
 | 
				
			|||||||
    content = make_table(title, cols, rows, totals=total_row)
 | 
					    content = make_table(title, cols, rows, totals=total_row)
 | 
				
			||||||
    return render(
 | 
					    return render(
 | 
				
			||||||
        request,
 | 
					        request,
 | 
				
			||||||
        "analytics/activity_details_template.html",
 | 
					        "corporate/activity/activity.html",
 | 
				
			||||||
        context=dict(data=content, title=title, is_home=False),
 | 
					        context=dict(data=content, title=title, is_home=False),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,7 @@ def get_user_activity(request: HttpRequest, user_profile_id: int) -> HttpRespons
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return render(
 | 
					    return render(
 | 
				
			||||||
        request,
 | 
					        request,
 | 
				
			||||||
        "analytics/activity_details_template.html",
 | 
					        "corporate/activity/activity.html",
 | 
				
			||||||
        context=dict(
 | 
					        context=dict(
 | 
				
			||||||
            data=content,
 | 
					            data=content,
 | 
				
			||||||
            title=title,
 | 
					            title=title,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<h3>{{ data.title }} {% if data.stats_link %}{{ data.stats_link }}{% endif %}</h3>
 | 
					<h3>{{ data.title }} {% if data.stats_link %}{{ data.stats_link }}{% endif %}</h3>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% if data.title == "Remote servers" %}
 | 
					{% if data.title == "Remote servers" %}
 | 
				
			||||||
{% include "analytics/remote_activity_key.html" %}
 | 
					{% include "corporate/activity/remote_activity_key.html" %}
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{ data.rows|length}} rows
 | 
					{{ data.rows|length}} rows
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<h3 style="text-align: center;">Installation activity: {{ num_active_sites }} active sites</h3>
 | 
					<h3 class="installation-activity-header">Installation activity: {{ num_active_sites }} active sites</h3>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<p style="text-align: center;">{{ utctime }}</p>
 | 
					<p class="installation-activity-header">{{ utctime }}</p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<h4>Installation information:</h4>
 | 
					<h4>Installation information:</h4>
 | 
				
			||||||
<ul>
 | 
					<ul>
 | 
				
			||||||
@@ -720,7 +720,6 @@ html_rules: List["Rule"] = [
 | 
				
			|||||||
            "templates/zerver/accounts_send_confirm.html",
 | 
					            "templates/zerver/accounts_send_confirm.html",
 | 
				
			||||||
            "templates/zerver/integrations/index.html",
 | 
					            "templates/zerver/integrations/index.html",
 | 
				
			||||||
            "templates/zerver/documentation_main.html",
 | 
					            "templates/zerver/documentation_main.html",
 | 
				
			||||||
            "templates/analytics/realm_summary_table.html",
 | 
					 | 
				
			||||||
            "templates/corporate/zephyr.html",
 | 
					            "templates/corporate/zephyr.html",
 | 
				
			||||||
            "templates/corporate/zephyr-mirror.html",
 | 
					            "templates/corporate/zephyr-mirror.html",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -244,6 +244,10 @@ tr.admin td:first-child {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.installation-activity-header {
 | 
				
			||||||
 | 
					    text-align: center;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.remote-server-information,
 | 
					.remote-server-information,
 | 
				
			||||||
.remote-realm-information {
 | 
					.remote-realm-information {
 | 
				
			||||||
    padding-bottom: 15px;
 | 
					    padding-bottom: 15px;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user