mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
move pricing pages to their own file
This commit is contained in:
@@ -29,6 +29,7 @@ from app.main.views import ( # noqa isort:skip
|
||||
organisations,
|
||||
performance,
|
||||
platform_admin,
|
||||
pricing,
|
||||
providers,
|
||||
register,
|
||||
returned_letters,
|
||||
@@ -37,8 +38,8 @@ from app.main.views import ( # noqa isort:skip
|
||||
sign_in,
|
||||
sign_out,
|
||||
templates,
|
||||
two_factor,
|
||||
tour,
|
||||
two_factor,
|
||||
uploads,
|
||||
user_profile,
|
||||
verify,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from flask import (
|
||||
abort,
|
||||
current_app,
|
||||
make_response,
|
||||
redirect,
|
||||
render_template,
|
||||
@@ -8,20 +7,15 @@ from flask import (
|
||||
url_for,
|
||||
)
|
||||
from flask_login import current_user
|
||||
from notifications_utils.international_billing_rates import (
|
||||
INTERNATIONAL_BILLING_RATES,
|
||||
)
|
||||
from notifications_utils.template import HTMLEmailTemplate, LetterImageTemplate
|
||||
|
||||
from app import email_branding_client, letter_branding_client, status_api_client
|
||||
from app.main import main
|
||||
from app.main.forms import FieldWithNoneOption, SearchByNameForm
|
||||
from app.main.forms import FieldWithNoneOption
|
||||
from app.main.views.sub_navigation_dictionaries import (
|
||||
features_nav,
|
||||
pricing_nav,
|
||||
using_notify_nav,
|
||||
)
|
||||
from app.models.feedback import QUESTION_TICKET_TYPE
|
||||
from app.utils import get_logo_cdn_domain, hide_from_search_engines
|
||||
|
||||
|
||||
@@ -59,43 +53,6 @@ def accessibility_statement():
|
||||
return render_template('views/accessibility_statement.html')
|
||||
|
||||
|
||||
@main.route('/pricing')
|
||||
def pricing():
|
||||
return render_template(
|
||||
'views/pricing/index.html',
|
||||
sms_rate=0.0158,
|
||||
international_sms_rates=sorted([
|
||||
(cc, country['names'], country['billable_units'])
|
||||
for cc, country in INTERNATIONAL_BILLING_RATES.items()
|
||||
], key=lambda x: x[0]),
|
||||
search_form=SearchByNameForm(),
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
|
||||
|
||||
@main.route('/pricing/how-to-pay')
|
||||
def how_to_pay():
|
||||
return render_template(
|
||||
'views/pricing/how-to-pay.html',
|
||||
support_link=url_for('main.feedback', ticket_type=QUESTION_TICKET_TYPE),
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
|
||||
|
||||
@main.route('/pricing/billing-details')
|
||||
def billing_details():
|
||||
if current_user.is_authenticated:
|
||||
return render_template(
|
||||
'views/pricing/billing-details.html',
|
||||
billing_details=current_app.config['NOTIFY_BILLING_DETAILS'],
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
return render_template(
|
||||
'views/pricing/billing-details-signed-out.html',
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
|
||||
|
||||
@main.route('/delivery-and-failure')
|
||||
@main.route('/features/messages-status')
|
||||
def delivery_and_failure():
|
||||
|
||||
45
app/main/views/pricing.py
Normal file
45
app/main/views/pricing.py
Normal file
@@ -0,0 +1,45 @@
|
||||
from flask import current_app, render_template
|
||||
from flask_login import current_user
|
||||
from notifications_utils.international_billing_rates import (
|
||||
INTERNATIONAL_BILLING_RATES,
|
||||
)
|
||||
|
||||
from app.main import main
|
||||
from app.main.forms import SearchByNameForm
|
||||
from app.main.views.sub_navigation_dictionaries import pricing_nav
|
||||
|
||||
|
||||
@main.route('/pricing')
|
||||
def pricing():
|
||||
return render_template(
|
||||
'views/pricing/index.html',
|
||||
sms_rate=0.0158,
|
||||
international_sms_rates=sorted([
|
||||
(cc, country['names'], country['billable_units'])
|
||||
for cc, country in INTERNATIONAL_BILLING_RATES.items()
|
||||
], key=lambda x: x[0]),
|
||||
search_form=SearchByNameForm(),
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
|
||||
|
||||
@main.route('/pricing/how-to-pay')
|
||||
def how_to_pay():
|
||||
return render_template(
|
||||
'views/pricing/how-to-pay.html',
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
|
||||
|
||||
@main.route('/pricing/billing-details')
|
||||
def billing_details():
|
||||
if current_user.is_authenticated:
|
||||
return render_template(
|
||||
'views/pricing/billing-details.html',
|
||||
billing_details=current_app.config['NOTIFY_BILLING_DETAILS'],
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
return render_template(
|
||||
'views/pricing/billing-details-signed-out.html',
|
||||
navigation_links=pricing_nav(),
|
||||
)
|
||||
@@ -16,7 +16,7 @@
|
||||
</p>
|
||||
|
||||
<p class="govuk-body">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ support_link }}">Contact us</a> if you need any other details.
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">Contact us</a> if you need any other details.
|
||||
</p>
|
||||
|
||||
<h2 class="heading-medium govuk-!-margin-top-7">
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
<p class="govuk-body">
|
||||
Your organisation should raise a single <abbr title="purchase order">PO</abbr> for the estimated cost of all its services. You can update the <abbr title="purchase order">PO</abbr> any time if your usage increases.
|
||||
</p>
|
||||
|
||||
|
||||
<p class="govuk-body">
|
||||
Your organisation may need to <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.billing_details') }}">add the Cabinet Office as a supplier</a> before you can raise a <abbr title="purchase order">PO</abbr>.
|
||||
</p>
|
||||
|
||||
<p class="govuk-body">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ support_link }}">Contact us</a> if you need help raising a purchase order.
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">Contact us</a> if you need help raising a purchase order.
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user