expephalon-playsms/core/navigations.py
Klaus-Uwe Mitterer a133ea4cb1 A lot of changes:
Prepare for Minio/S3 media storage
Add current FontAwesome
Move statics and templates out of core
Add navigation menu generation
Add name attribute to URLs
Probably many other things I forgot by now
2020-04-07 21:52:10 +02:00

111 lines
No EOL
4.1 KiB
Python

from core.navigation import navigations, NavSection, NavItem
from django.conf import settings
# Dashboard Section
dashboard_section = NavSection("Dashboard", "")
dashboard_item = NavItem("Dashboard", "fa-rocket", "backend")
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", "backend")
client_add_item = NavItem("Add Client", "fa-user-edit", "backend")
client_groups_item = NavItem("Client Groups", "fa-users", "backend")
client_leads_item = NavItem("Leads", "fa-blender-phone", "backend")
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", "backend")
quote_create_item = NavItem("Create Quote", "fa-plus-square", "backend")
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", "backend")
invoice_create_item = NavItem("Create Invoice", "fa-plus-square", "backend")
billable_list_item = NavItem("List Billable Items", "fa-hand-holding-usd", "backend")
billable_create_item = NavItem("Create Billable Item", "fa-plus-square", "backend")
list_transaction_item = NavItem("Transaction List", "fa-funnel-dollar", "backend")
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", "backend")
ticket_add_item = NavItem("Add Ticket", "fa-plus-square", "backend")
conversation_add_item = NavItem("Add Conversation", "fa-comments", "backend")
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", "backend")
report_forecast_item = NavItem("Income Forecast", "fa-chart-area", "backend")
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", "backend")
brand_administration_item = NavItem("Brands", "fa-code-branch", "backend")
sms_administration_item = NavItem("SMS Gateway", "fa-sms", "backend")
backup_administration_item = NavItem("Backups", "fa-shield-alt", "backend")
product_administration_item = NavItem("Products", "fa-cube", "backend")
pgroup_administration_item = NavItem("Product Groups", "fa-cubes", "backend")
payment_administration_item = NavItem("Payment Gateways", "fa-credit-card", "backend")
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(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)