expephalon/core/navigations.py
Klaus-Uwe Mitterer 7708128255 Finally got all the OTP stuff working
Finalized dbsettings views
Easter egg for missing backend pages
2020-04-15 22:19:03 +02:00

113 lines
No EOL
4.3 KiB
Python

from core.modules.navigation import navigations, NavSection, NavItem
from django.conf import settings
# Dashboard Section
dashboard_section = NavSection("Dashboard", "")
dashboard_item = NavItem("Dashboard", "fa-rocket", "dashboard")
dashboard_section.add_item(dashboard_item)
navigations["backend_main"].add_section(dashboard_section)
# Clients Section
clients_section = NavSection("Clients", "")
client_list_item = NavItem("List Clients", "fa-user-tag", "backendni")
client_add_item = NavItem("Add Client", "fa-user-edit", "backendni")
client_groups_item = NavItem("Client Groups", "fa-users", "backendni")
client_leads_item = NavItem("Leads", "fa-blender-phone", "backendni")
clients_section.add_item(client_list_item)
clients_section.add_item(client_add_item)
clients_section.add_item(client_groups_item)
clients_section.add_item(client_leads_item)
navigations["backend_main"].add_section(clients_section)
# Quotes Section
quotes_section = NavSection("Quotes", "")
quote_list_item = NavItem("List Quotes", "fa-file-invoice-dollar", "backendni")
quote_create_item = NavItem("Create Quote", "fa-plus-square", "backendni")
quotes_section.add_item(quote_list_item)
quotes_section.add_item(quote_create_item)
navigations["backend_main"].add_section(quotes_section)
# Billing Section
billing_section = NavSection("Billing", "")
invoice_list_item = NavItem("List Invoices", "fa-file-invoice-dollar", "backendni")
invoice_create_item = NavItem("Create Invoice", "fa-plus-square", "backendni")
billable_list_item = NavItem("List Billable Items", "fa-hand-holding-usd", "backendni")
billable_create_item = NavItem("Create Billable Item", "fa-plus-square", "backendni")
list_transaction_item = NavItem("Transaction List", "fa-funnel-dollar", "backendni")
billing_section.add_item(invoice_list_item)
billing_section.add_item(invoice_create_item)
billing_section.add_item(billable_list_item)
billing_section.add_item(billable_create_item)
billing_section.add_item(list_transaction_item)
navigations["backend_main"].add_section(billing_section)
# Support Section
support_section = NavSection("Support", "")
ticket_view_item = NavItem("View Tickets", "fa-life-ring", "backendni")
ticket_add_item = NavItem("Add Ticket", "fa-plus-square", "backendni")
conversation_add_item = NavItem("Add Conversation", "fa-comments", "backendni")
support_section.add_item(ticket_view_item)
support_section.add_item(ticket_add_item)
support_section.add_item(conversation_add_item)
navigations["backend_main"].add_section(support_section)
# Reports Section
reports_section = NavSection("Reports", "")
report_period_item = NavItem("Income by period", "fa-chart-bar", "backendni")
report_forecast_item = NavItem("Income Forecast", "fa-chart-area", "backendni")
reports_section.add_item(report_period_item)
reports_section.add_item(report_forecast_item)
navigations["backend_main"].add_section(reports_section)
# Administration Section
administration_section = NavSection("Administration", "")
user_administration_item = NavItem("Administrator Users", "fa-users-cog", "backendni")
brand_administration_item = NavItem("Brands", "fa-code-branch", "backendni")
sms_administration_item = NavItem("SMS Gateway", "fa-sms", "backendni")
otp_administration_item = NavItem("Two-Factor Authentication", "fa-id-badge", "backendni")
backup_administration_item = NavItem("Backups", "fa-shield-alt", "backendni")
product_administration_item = NavItem("Products", "fa-cube", "backendni")
pgroup_administration_item = NavItem("Product Groups", "fa-cubes", "backendni")
payment_administration_item = NavItem("Payment Gateways", "fa-credit-card", "backendni")
dbsettings_item = NavItem("Database Settings", "fa-database", "dbsettings")
administration_section.add_item(user_administration_item)
administration_section.add_item(brand_administration_item)
administration_section.add_item(sms_administration_item)
administration_section.add_item(otp_administration_item)
administration_section.add_item(backup_administration_item)
administration_section.add_item(product_administration_item)
administration_section.add_item(pgroup_administration_item)
administration_section.add_item(payment_administration_item)
if "dbsettings" in settings.INSTALLED_APPS:
administration_section.add_item(dbsettings_item)
navigations["backend_main"].add_section(administration_section)