add darkmode, minimize js/css
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="pl">
|
||||
<html lang="pl" data-bs-theme="">
|
||||
<head>
|
||||
{% if app.environment == "prod" %}
|
||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
|
||||
@@ -7,9 +7,8 @@
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<meta name="turbo-prefetch" content="false">
|
||||
<title>{% block title %}Sprawozdania{% endblock %}</title>
|
||||
|
||||
{% block stylesheets %}
|
||||
{# 'app' must match the first argument to addEntry() in webpack.config.js #}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
{% macro month_menu(routeName, months, currentMonth) %}
|
||||
<div class="row reports-months-all">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<a href="{{ path(routeName, {monthId:-1}) }}" class="btn {% if currentMonth is null %}btn-success{% else %}btn-secondary{% endif %}">Zaległe</a>
|
||||
</div>
|
||||
</div>
|
||||
{% for id,month in months %}
|
||||
{% set isCurrent = currentMonth is not null and month | date("Y-m") == currentMonth | date("Y-m") %}
|
||||
<div class="col col-xxl-1 col-xl-2 col-lg-2 col-md-3 col-sm-3 col-4">
|
||||
<div class="card">
|
||||
<a href="{{ path(routeName,{monthId: id}) }}" class="btn {% if isCurrent %}btn-success{% else %}btn-secondary{% endif %}">
|
||||
{# <div class="col">#}
|
||||
{# <div class="card">#}
|
||||
{# <a href="{{ path(routeName, {monthId:-1}) }}" class="btn {% if currentMonth is null %}btn-success{% else %}btn-secondary{% endif %}">Zaległe</a>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# {% for id,month in months %}#}
|
||||
{# {% set isCurrent = currentMonth is not null and month | date("Y-m") == currentMonth | date("Y-m") %}#}
|
||||
{# <div class="col col-xxl-1 col-xl-2 col-lg-2 col-md-3 col-sm-3 col-4">#}
|
||||
{# <div class="card">#}
|
||||
{# <a href="{{ path(routeName,{monthId: id}) }}" class="btn {% if isCurrent %}btn-success{% else %}btn-secondary{% endif %}">#}
|
||||
{# {% if routeName=='app_schedule' %}#}
|
||||
{# {{ id }}#}
|
||||
{# {% else %}#}
|
||||
{# {{ month | date("Y-m") }}#}
|
||||
{# {% endif %}#}
|
||||
{# </a>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# {% endfor %}#}
|
||||
<ul class="nav nav-underline nav-fill">
|
||||
<li class="nav-item">
|
||||
<a href="{{ path(routeName, {monthId:-1}) }}" class="nav-link {% if currentMonth is null %}active{% endif %}">Zaległe</a>
|
||||
</li>
|
||||
{% for id,month in months %}
|
||||
{% set isCurrent = currentMonth is not null and month | date("Y-m") == currentMonth | date("Y-m") %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if isCurrent %} active{% endif %}" href="{{ path(routeName,{monthId: id}) }}">
|
||||
{% if routeName=='app_schedule' %}
|
||||
{{ id }}
|
||||
{% else %}
|
||||
{{ month | date("Y-m") }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{# <ul class="nav nav-tabs">#}
|
||||
{# <li class="nav-item">#}
|
||||
{# <a class="nav-link {% if currentMonth is null %}active{% endif %}" aria-current="page" href="{{ path(routeName, {monthId:-1}) }}">Zaległe</a>#}
|
||||
{# </li>#}
|
||||
{# {% for id,month in months %}#}
|
||||
{# {% set isCurrent = currentMonth is not null and month | date("Y-m") == currentMonth | date("Y-m") %}#}
|
||||
{# <li class="nav-item">#}
|
||||
{# <a class="nav-link {% if isCurrent %}active{% endif %}" href="{{ path(routeName,{monthId: id}) }}" aria-current="page">#}
|
||||
{# {% if routeName=='app_schedule' %}#}
|
||||
{# {{ id }}#}
|
||||
{# {% else %}#}
|
||||
{# {{ month | date("Y-m") }}#}
|
||||
{# {% endif %}#}
|
||||
{# </a>#}
|
||||
{# </li>#}
|
||||
{# {% endfor %}#}
|
||||
{# </ul>#}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -1,69 +1,54 @@
|
||||
{#<nav class="navbar navbar-inverse">#}
|
||||
{# <div class="container-fluid">#}
|
||||
{# <div class="navbar-header">#}
|
||||
{# <a class="navbar-brand" href="{{ path('app_base') }}">WebSiteName</a>#}
|
||||
{# </div>#}
|
||||
{# <ul class="nav navbar-nav">#}
|
||||
{# <li class="active"><a href="{{ path('app_base') }}">Home</a></li>#}
|
||||
{# <li class="dropdown">#}
|
||||
{# <a class="dropdown-toggle" data-toggle="dropdown" href="#">Klienci#}
|
||||
{# <span class="caret"></span></a>#}
|
||||
{# <ul class="dropdown-menu">#}
|
||||
{# <li><a href="{{ path('app_customers_list') }}">Lista</a></li>#}
|
||||
{# <li><a href="{{ path('app_base') }}">Dodaj klienta</a></li>#}
|
||||
{# <li><a href="#">Page 1-3</a></li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# <li><a href="#">Page 2</a></li>#}
|
||||
{# <li><a href="#">Page 3</a></li>#}
|
||||
{# </ul>#}
|
||||
{# </div>#}
|
||||
{#</nav>#}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
{% set route = app.request.attributes.get('_route') %}
|
||||
<nav class="navbar navbar-light navbar-expand-md justify-content-md-center justify-content-start">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{{ path('index') }}">CRM</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<div class="navbar-collapse collapse justify-content-between align-items-center w-100" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav">
|
||||
{% if is_granted('reportView') %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="{{ path('app_base') }}">Sprawozdania</a>
|
||||
<a class="nav-link {{ is_route_active('app_base', route) }}" aria-current="page" href="{{ path('app_base') }}">Sprawozdania</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="{{ path('app_schedule') }}">Harmonogramy</a>
|
||||
<a class="nav-link {{ is_route_active('app_schedule', route) }}" aria-current="page" href="{{ path('app_schedule') }}">Harmonogramy</a>
|
||||
</li>
|
||||
{% if is_granted('clientView') %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="{{ path('app_customers_list') }}">Klienci</a>
|
||||
<a class="nav-link {{ is_route_active('app_customers_list', route) }}" aria-current="page" href="{{ path('app_customers_list') }}">Klienci</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{# <li class="nav-item dropdown">#}
|
||||
{# <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">#}
|
||||
{# Klienci#}
|
||||
{# </a>#}
|
||||
{# <ul class="dropdown-menu" aria-labelledby="navbarDropdown">#}
|
||||
{# <li><a class="dropdown-item" href="{{ path('app_customers_list') }}">Lista</a></li>#}
|
||||
{# <li><a class="dropdown-item" href="{{ path('app_add_client') }}">Dodaj klienta</a></li>#}
|
||||
{# <li><hr class="dropdown-divider"></li>#}
|
||||
{# <li><a class="dropdown-item" href="#">Something else here</a></li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# <li class="nav-item">#}
|
||||
{# <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>#}
|
||||
{# </li>#}
|
||||
</ul>
|
||||
{% if is_granted('clientAdd') %}
|
||||
<div class="d-flex">
|
||||
<a href="{{ path('app_add_client') }}" class="btn btn-success btn-outline-dark" type="submit">Dodaj klienta</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a href="{{ path('app_add_client') }}" class="btn btn-outline-success" type="submit"><i class="fa-regular fa-id-card"></i> Dodaj klienta</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa-solid fa-circle-user"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li data-controller="thememode">
|
||||
<p class="nav-link dark" data-action="click->thememode#switch" data-thememode-mode-param="dark" data-bs-theme-value="dark"><i class="fa-solid fa-moon"></i> Tryb ciemny</p>
|
||||
<p class="nav-link light" data-action="click->thememode#switch" data-thememode-mode-param="light" data-bs-theme-value="light"><i class="fa-regular fa-sun"></i> Tryb jasny</p>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="nav-link" href="{{ path('app_logout') }}"><i class="fa-solid fa-right-from-bracket"></i> Wyloguj</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{# {% if is_granted('clientAdd') %}#}
|
||||
{# <div class="d-flex">#}
|
||||
{# <a href="{{ path('app_add_client') }}" class="btn btn-outline-success" type="submit">Dodaj klienta</a>#}
|
||||
{# </div>#}
|
||||
{# {% endif %}#}
|
||||
|
||||
{# <div class="d-flex">#}
|
||||
{# <a href="{{ path('app_logout') }}" class="btn btn-outline-primary" type="submit">Wyloguj</a>#}
|
||||
{# </div>#}
|
||||
|
||||
<div class="d-flex">
|
||||
<a href="{{ path('app_logout') }}" class="btn btn-primary btn-outline-dark" type="submit">Wyloguj</a>
|
||||
</div>
|
||||
{# <form class="d-flex">#}
|
||||
{# <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">#}
|
||||
{# <button class="btn btn-outline-success" type="submit">Search</button>#}
|
||||
|
||||
@@ -17,37 +17,35 @@
|
||||
<h3 class="card-header">{{ reports.status.takeLang }}</h3>
|
||||
<div class="card-body">
|
||||
{% for report in reports.reports %}
|
||||
<div class="card text-{{ reports.status.textColor }} border-dark report-one {{ reports.status.name | lower }}">
|
||||
<div class="card text-{{ reports.status.textColor }} report-one {{ reports.status.name | lower }}">
|
||||
<div class="report-number">
|
||||
<div class="badge bg-{{ reports.status.takeBadgeBg }} text-dark" data-toggle="tooltip" data-placement="bottom" title="Numer sprawozdania">{{ report.number }}</div>
|
||||
</div>
|
||||
{% if enum(reports.status, 'COMPLETE') %}
|
||||
{% if enum(reports.status, 'COMPLETE') and false %}
|
||||
<div class="report-mark-uncompleted">
|
||||
{# <div class="badge bg-danger text-dark" data-toggle="tooltip" data-placement="bottom" title="Oznacz jako nie zakończone">#}
|
||||
|
||||
<form action="{{ path('app_set_status_todo',{id:report.id}) }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('report-status') }}">
|
||||
<input type="hidden" name="unDone" value="1">
|
||||
<button type="submit" class="badge bg-danger text-dark" data-toggle="tooltip" data-placement="bottom" title="Oznacz jako nie zakończone"><i class="fa fa-solid fa-remove"></i></button>
|
||||
</form>
|
||||
<form action="{{ path('app_set_status_todo',{id:report.id}) }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ csrf_token('report-status') }}">
|
||||
<input type="hidden" name="unDone" value="1">
|
||||
<button type="submit" class="badge bg-danger" data-toggle="tooltip" data-placement="bottom" title="Oznacz jako nie zakończone"><i class="fa fa-solid fa-remove"></i></button>
|
||||
</form>
|
||||
|
||||
{# </div>#}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">
|
||||
{% if is_granted('clientView') %}
|
||||
<a href="{{ path('app_client',{id: report.client.id}) }}" class="link-{{ reports.status.linkColor }}">{{ report.client.strName }}</a>
|
||||
<a href="{{ path('app_client',{id: report.client.id}) }}" >{{ report.client.strName }}</a>
|
||||
{% else %}
|
||||
{{ report.client.strName }}
|
||||
{% endif %}
|
||||
</h5>
|
||||
</div>
|
||||
{% if not enum(reports.status, 'COMPLETE') %}
|
||||
{# {% if not enum(reports.status, 'COMPLETE') %}#}
|
||||
<div class="card-body">
|
||||
<p class="card-text">{{ sets.statusForm(report, reportToDoList, reports.status) }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# {% endif %}#}
|
||||
{% if enum(reports.status, 'WORKING') %}
|
||||
<div class="card-footer bg-transparent">
|
||||
{{ sets.progress(report, reportToDoList|length) }}
|
||||
|
||||
Reference in New Issue
Block a user