brotherton-erpnext/erpnext/templates/includes/footer/footer_powered.html
Anoop 5e16ca0326
fix: Login page doesn't load for new sites (#22388)
* fix: Login page doesn't load for new sites

Login page broken as active domains are not set for new sites

* Update footer_powered.html

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-06-23 11:11:13 +05:30

28 lines
792 B
HTML

{% set domains = frappe.get_doc("Domain Settings").active_domains %}
{% set links = {
'Manufacturing': '/manufacturing',
'Services': '/services',
'Retail': '/retail',
'Distribution': '/distribution',
'Non Profit': '/non-profit',
'Education': '/education',
'Healthcare': '/healthcare',
'Agriculture': '/agriculture',
'Hospitality': ''
} %}
{% set link = '' %}
{% set label = '' %}
{% if domains %}
{% set label = domains[0].domain %}
{% set link = links[label] %}
{% endif %}
{% if label == "Services" %}
{% set label = "Service" %}
{% endif %}
<a href="https://erpnext.com{{ link }}?source=website_footer" target="_blank" class="text-muted">Powered by ERPNext - {{ '' if domains else 'Open Source' }} ERP Software {{ ('for ' + label + ' Companies') if domains else '' }}</a>