mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 06:03:12 -04: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,
|
organisations,
|
||||||
performance,
|
performance,
|
||||||
platform_admin,
|
platform_admin,
|
||||||
|
pricing,
|
||||||
providers,
|
providers,
|
||||||
register,
|
register,
|
||||||
returned_letters,
|
returned_letters,
|
||||||
@@ -37,8 +38,8 @@ from app.main.views import ( # noqa isort:skip
|
|||||||
sign_in,
|
sign_in,
|
||||||
sign_out,
|
sign_out,
|
||||||
templates,
|
templates,
|
||||||
two_factor,
|
|
||||||
tour,
|
tour,
|
||||||
|
two_factor,
|
||||||
uploads,
|
uploads,
|
||||||
user_profile,
|
user_profile,
|
||||||
verify,
|
verify,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
from flask import (
|
from flask import (
|
||||||
abort,
|
abort,
|
||||||
current_app,
|
|
||||||
make_response,
|
make_response,
|
||||||
redirect,
|
redirect,
|
||||||
render_template,
|
render_template,
|
||||||
@@ -8,20 +7,15 @@ from flask import (
|
|||||||
url_for,
|
url_for,
|
||||||
)
|
)
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
from notifications_utils.international_billing_rates import (
|
|
||||||
INTERNATIONAL_BILLING_RATES,
|
|
||||||
)
|
|
||||||
from notifications_utils.template import HTMLEmailTemplate, LetterImageTemplate
|
from notifications_utils.template import HTMLEmailTemplate, LetterImageTemplate
|
||||||
|
|
||||||
from app import email_branding_client, letter_branding_client, status_api_client
|
from app import email_branding_client, letter_branding_client, status_api_client
|
||||||
from app.main import main
|
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 (
|
from app.main.views.sub_navigation_dictionaries import (
|
||||||
features_nav,
|
features_nav,
|
||||||
pricing_nav,
|
|
||||||
using_notify_nav,
|
using_notify_nav,
|
||||||
)
|
)
|
||||||
from app.models.feedback import QUESTION_TICKET_TYPE
|
|
||||||
from app.utils import get_logo_cdn_domain, hide_from_search_engines
|
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')
|
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('/delivery-and-failure')
|
||||||
@main.route('/features/messages-status')
|
@main.route('/features/messages-status')
|
||||||
def delivery_and_failure():
|
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>
|
||||||
|
|
||||||
<p class="govuk-body">
|
<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>
|
</p>
|
||||||
|
|
||||||
<h2 class="heading-medium govuk-!-margin-top-7">
|
<h2 class="heading-medium govuk-!-margin-top-7">
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="govuk-body">
|
<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>
|
</p>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user