Files
toiminnanohjaus-django/templates/base.html
T
petriandClaude Opus 5.5 1ca03137fd Vaihe 1/4: asiakastyöt (numerointi, tagit, linkit, jäsenet, muutoshistoria)
- Uusi jobs-moduuli: asiakastyön kentät ilman rahakenttiä, juokseva
  vuosinumero VVVV-NNNN (laskuririvi lukitaan), tagit, linkit dialogissa,
  jäsenet ja muutoshistoria nimiarvoineen.
- Tilojen oikeudet: lasku luotu / laskutettu johto tai työn laskuttaja,
  arkistointi vain johto; alihankkija näkee vain jäsenyystyönsä eikä muokkaa.
- Lista ja haku (numero, nimi, asiakas), suodattimet, omat työt oletuksena,
  arkistoidut piilossa, myöhässä tekstinä ja kuvakkeena.
- Asiakasvalitsin hakuineen ja pikalisäyksineen (myös pikavastaanottoa varten).
- Asiakkaan sivulle asiakastyöt-osio; valikkoon Asiakastyöt.
- Lukurajapinnat muihin moduuleihin: UserQueries.choices,
  CustomerQueries.summaries, CatalogQueries.service_units; jobs.*-oikeudet.
- Import-linter-sopimukset, käännökset, testit (domain, application,
  integraatio, selain) sekä määrittelyn ja CLAUDE.md:n päivitys.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-29 14:38:42 +02:00

87 lines
5.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% load static i18n users_tags %}<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %} – Toiminnanohjaus</title>
<script>
(function () {
var t = localStorage.getItem("theme");
if (t) document.documentElement.setAttribute("data-theme", t);
})();
</script>
<link rel="stylesheet" href="{% static 'dist/app.css' %}">
<script src="{% static 'dist/htmx.min.js' %}" defer></script>
<script src="{% static 'dist/alpine.min.js' %}" defer></script>
<script src="{% static 'src/app.js' %}" defer></script>
</head>
<body class="min-h-screen bg-base-200" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
<a href="#main" class="sr-only focus:not-sr-only focus:absolute focus:z-50 focus:m-2 btn btn-primary">{% translate "Skip to content" %}</a>
{% block layout %}
<div class="drawer lg:drawer-open" x-data="{ open: false }" @keydown.escape.window="open = false">
<input id="nav-drawer" type="checkbox" class="drawer-toggle" x-model="open" tabindex="-1" aria-hidden="true">
<div class="drawer-content flex flex-col">
<header class="navbar bg-base-100 border-b border-base-300 gap-2">
<button type="button" class="btn btn-ghost lg:hidden" aria-controls="main-nav" :aria-expanded="open.toString()"
@click="open = !open; $nextTick(() => { if (open) $refs.nav.querySelector('a').focus() })">
<span class="sr-only">{% translate "Open menu" %}</span>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
</button>
<a href="{% url 'home' %}" class="text-lg font-semibold px-2 truncate min-w-0">Toiminnanohjaus</a>
<div class="flex-1"></div>
<div class="hidden sm:block">{% include "components/theme_toggle.html" %}</div>
<div class="dropdown dropdown-end hidden sm:block">
<button type="button" class="btn btn-ghost" aria-haspopup="true">{{ request.user.name }}</button>
<ul class="dropdown-content menu bg-base-100 rounded-box shadow z-10 w-56 p-2">
<li>
<form method="post" action="{% url 'users:logout' %}">
{% csrf_token %}
<button type="submit" class="w-full text-left">{% translate "Log out" %}</button>
</form>
</li>
</ul>
</div>
</header>
<main id="main" tabindex="-1" class="p-4 lg:p-6 max-w-7xl w-full">
{% include "components/messages.html" %}
{% block content %}{% endblock %}
</main>
</div>
<div class="drawer-side z-20">
<label for="nav-drawer" class="drawer-overlay" aria-hidden="true"></label>
<nav id="main-nav" x-ref="nav" aria-label="{% translate 'Main menu' %}" class="bg-base-100 min-h-full w-64 border-r border-base-300">
<ul class="menu w-full p-4 gap-1">
<li><a href="{% url 'home' %}" {% if request.resolver_match.url_name == 'home' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Home" %}</a></li>
{% if request.user|can:"jobs.view" %}
<li><a href="{% url 'jobs:list' %}" {% if request.resolver_match.app_name == 'jobs' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Customer jobs" %}</a></li>
{% endif %}
{% if request.user|can:"customers.use" %}
<li><a href="{% url 'customers:list' %}" {% if request.resolver_match.app_name == 'customers' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Customers" %}</a></li>
{% endif %}
{% if request.user|can:"users.manage" or request.user|can:"catalog.manage" %}
<li class="menu-title">{% translate "Administration" %}</li>
{% endif %}
{% if request.user|can:"catalog.manage" %}
<li><a href="{% url 'catalog:index' %}" {% if request.resolver_match.app_name == 'catalog' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Base data" %}</a></li>
{% endif %}
{% if request.user|can:"users.manage" %}
<li><a href="{% url 'users:list' %}" {% if request.resolver_match.app_name == 'users' %}aria-current="page" class="menu-active"{% endif %}>{% translate "Users" %}</a></li>
{% endif %}
</ul>
<div class="sm:hidden border-t border-base-300 p-4 space-y-2">
<p class="font-semibold">{{ request.user.name }}</p>
{% include "components/theme_toggle.html" %}
<form method="post" action="{% url 'users:logout' %}">
{% csrf_token %}
<button type="submit" class="btn btn-ghost btn-sm">{% translate "Log out" %}</button>
</form>
</div>
</nav>
</div>
</div>
{% endblock %}
<div id="live-region" class="sr-only" role="status" aria-live="polite" aria-atomic="true"></div>
</body>
</html>