mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
Adds a small section for any remote realms attached to the remote server in the support view.
150 lines
7.9 KiB
HTML
150 lines
7.9 KiB
HTML
{% extends "zerver/base.html" %}
|
|
{% set entrypoint = "support" %}
|
|
|
|
{# Remote servers. #}
|
|
|
|
{% block title %}
|
|
<title>Remote servers</title>
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<br />
|
|
<form>
|
|
<center>
|
|
<input type="text" name="q" class="input-xxlarge search-query" placeholder="hostname or contact email" value="{{ request.GET.get('q', '') }}" autofocus />
|
|
<button type="submit" class="btn btn-default support-search-button">Search</button>
|
|
</center>
|
|
</form>
|
|
|
|
{% if error_message %}
|
|
<div class="alert alert-danger">
|
|
<center>
|
|
{{ error_message }}
|
|
</center>
|
|
</div>
|
|
{% elif success_message %}
|
|
<div class="alert alert-success">
|
|
<center>
|
|
{{ success_message }}
|
|
</center>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div id="remote-server-query-results">
|
|
{% for remote_server in remote_servers %}
|
|
<div class="support-query-result">
|
|
<div class="remote-server-information">
|
|
<span class="label">remote server</span>
|
|
<h3>{{ remote_server.hostname }}</h3>
|
|
<b>Contact email</b>: {{ remote_server.contact_email }}
|
|
<a title="Copy email" class="copy-button" data-copytext="{{ remote_server.contact_email }}">
|
|
<i class="fa fa-copy"></i>
|
|
</a>
|
|
<br />
|
|
<b>Last updated</b>: {{ remote_server.last_updated|timesince }} ago<br />
|
|
<b>Max monthly messages</b>: {{ remote_server_to_max_monthly_messages[remote_server.id] }}<br />
|
|
<b>Plan type</b>: {{ get_plan_type_name(remote_server.plan_type) }}<br />
|
|
<b>Has remote realm(s)</b>: {{ remote_realms[remote_server.id] != [] }}
|
|
{% if remote_server.plan_type == 100 %}
|
|
<h4>On 100% sponsored Zulip Community plan.</h4>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if remote_server.plan_type != 100 %}
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Sponsorship pending</b>:<br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
<select name="sponsorship_pending">
|
|
<option value="true" {% if plan_data[remote_server.id].customer and plan_data[remote_server.id].customer.sponsorship_pending %}selected{% endif %}>Yes</option>
|
|
<option value="false" {% if not plan_data[remote_server.id].customer or not plan_data[remote_server.id].customer.sponsorship_pending %}selected{% endif %}>No</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-default support-submit-button">Update</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if plan_data[remote_server.id].customer and plan_data[remote_server.id].customer.sponsorship_pending %}
|
|
<form method="POST" class="">
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
<input type="hidden" name="approve_sponsorship" value="true" />
|
|
<button class="btn btn-default sea-green small approve-sponsorship-button">
|
|
Approve full sponsorship
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if remote_server.plan_type != 100 %}
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Discount</b>:<br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
{% if plan_data[remote_server.id].current_plan and plan_data[remote_server.id].current_plan.fixed_price %}
|
|
<input type="number" name="discount" value="{{ get_discount(plan_data[remote_server.id].customer) }}" disabled />
|
|
<button type="submit" class="btn btn-default support-submit-button" disabled>Update</button>
|
|
{% else %}
|
|
<input type="number" name="discount" value="{{ get_discount(plan_data[remote_server.id].customer) }}" required />
|
|
<button type="submit" class="btn btn-default support-submit-button">Update</button>
|
|
{% endif %}
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if plan_data[remote_server.id].current_plan %}
|
|
<div class="remote-server-information">
|
|
<h4>📅 Current plan information:</h4>
|
|
<b>Plan name</b>: {{ plan_data[remote_server.id].current_plan.name }}<br />
|
|
<b>Status</b>: {{plan_data[remote_server.id].current_plan.get_plan_status_as_text()}}<br />
|
|
{% if plan_data[remote_server.id].current_plan.tier != 101 %}
|
|
<b>Billing schedule</b>: {% if plan_data[remote_server.id].current_plan.billing_schedule == plan_data[remote_server.id].current_plan.BILLING_SCHEDULE_ANNUAL %}Annual{% else %}Monthly{% endif %}<br />
|
|
<b>Licenses</b>: {{ plan_data[remote_server.id].licenses_used }}/{{ plan_data[remote_server.id].licenses }} ({% if plan_data[remote_server.id].current_plan.automanage_licenses %}Automatic{% else %}Manual{% endif %})<br />
|
|
{% if plan_data[remote_server.id].current_plan.price_per_license %}
|
|
<b>Price per license</b>: ${{ plan_data[remote_server.id].current_plan.price_per_license/100 }}<br />
|
|
{% elif plan_data[remote_server.id].current_plan.fixed_price %}
|
|
<b>Fixed price</b>: ${{ plan_data[remote_server.id].current_plan.fixed_price/100 }}<br />
|
|
{% endif %}
|
|
<b>Next invoice date</b>: {{ plan_data[remote_server.id].current_plan.next_invoice_date.strftime('%d %B %Y') }}<br />
|
|
{% else %}
|
|
<b>End date</b>: {{ plan_data[remote_server.id].current_plan.end_date.strftime('%d %B %Y') }}<br />
|
|
{% endif %}
|
|
</div>
|
|
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Billing collection method</b><br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
<select name="billing_modality" class="billing-modality-select" required>
|
|
<option value="charge_automatically" {% if plan_data[remote_server.id].current_plan.charge_automatically %}selected{% endif %}>Charge automatically</option>
|
|
<option value="send_invoice" {% if not plan_data[remote_server.id].current_plan.charge_automatically %}selected{% endif %}>Pay by invoice</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-default support-submit-button">Update</button>
|
|
</form>
|
|
|
|
<form method="POST" class="remote-server-form">
|
|
<b>Modify current plan</b><br />
|
|
{{ csrf_input }}
|
|
<input type="hidden" name="remote_server_id" value="{{ remote_server.id }}" />
|
|
<select name="modify_plan" class="modify-plan-method-select" required>
|
|
<option disabled value="" selected>-- select --</option>
|
|
<option value="downgrade_at_billing_cycle_end">Downgrade at the end of current billing cycle</option>
|
|
<option value="downgrade_now_without_additional_licenses">Downgrade now without creating additional invoices</option>
|
|
<option value="downgrade_now_void_open_invoices">Downgrade now and void open invoices</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-default support-submit-button">Modify</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% for remote_realm in remote_realms[remote_server.id] %}
|
|
<hr />
|
|
<div>
|
|
{% include "analytics/remote_realm_details.html" %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|