added company info to header
This commit is contained in:
Binary file not shown.
@@ -19,6 +19,11 @@ logging.basicConfig(
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def init_routes(main_bp):
|
||||
@main_bp.context_processor
|
||||
def inject_site_settings():
|
||||
site_settings = SiteSettings.query.first()
|
||||
return dict(site_settings=site_settings)
|
||||
|
||||
@main_bp.route('/')
|
||||
def home():
|
||||
if current_user.is_authenticated:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="{{ csrf_token }}">
|
||||
<title>{% block title %}DocuPulse{% endblock %}</title>
|
||||
<title>{% block title %}{% if site_settings.company_name %}DocuPulse for {{ site_settings.company_name }}{% else %}DocuPulse{% endif %}{% endblock %}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
||||
@@ -18,7 +18,13 @@
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{{ url_for('main.dashboard') }}">DocuPulse</a>
|
||||
<a class="navbar-brand" href="{{ url_for('main.dashboard') }}">
|
||||
{% if site_settings.company_name %}
|
||||
DocuPulse for {% if site_settings.company_website %}<a href="{{ site_settings.company_website }}" target="_blank" style="text-decoration: none; color: #fff !important; font-weight: inherit; font-size: 1.25rem; font-family: inherit; display: inline; padding: 0; margin: 0;">{{ site_settings.company_name }}</a>{% else %}{{ site_settings.company_name }}{% endif %}
|
||||
{% else %}
|
||||
DocuPulse
|
||||
{% endif %}
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "common/base.html" %}
|
||||
{% from "components/header.html" import header %}
|
||||
{% from "settings/tabs/colors.html" import colors_tab %}
|
||||
{% from "settings/tabs/general.html" import general_tab %}
|
||||
{% from "settings/tabs/company_info.html" import company_info_tab %}
|
||||
{% from "settings/tabs/security.html" import security_tab %}
|
||||
{% from "settings/components/reset_colors_modal.html" import reset_colors_modal %}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {% if active_tab == 'general' %}active{% endif %}" id="general-tab" data-bs-toggle="tab" data-bs-target="#general" type="button" role="tab" aria-controls="general" aria-selected="{{ 'true' if active_tab == 'general' else 'false' }}">
|
||||
<i class="fas fa-sliders me-2"></i>General
|
||||
<i class="fas fa-building me-2"></i>Company Info
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
@@ -49,9 +49,9 @@
|
||||
{{ colors_tab(primary_color, secondary_color, csrf_token) }}
|
||||
</div>
|
||||
|
||||
<!-- General Tab -->
|
||||
<!-- Company Info Tab -->
|
||||
<div class="tab-pane fade {% if active_tab == 'general' %}show active{% endif %}" id="general" role="tabpanel" aria-labelledby="general-tab">
|
||||
{{ general_tab(site_settings, csrf_token) }}
|
||||
{{ company_info_tab(site_settings, csrf_token) }}
|
||||
</div>
|
||||
|
||||
<!-- Security Tab -->
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
{% macro general_tab(site_settings, csrf_token) %}
|
||||
{% macro company_info_tab(site_settings, csrf_token) %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!-- Company Settings Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-white">
|
||||
<h5 class="card-title mb-0">
|
||||
<i class="fas fa-building me-2"></i>Company Settings
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ url_for('main.update_company_settings') }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
Reference in New Issue
Block a user