first phase of the project management dashboard

This commit is contained in:
Joren de Graaf
2026-10-13 15:22:12 +02:00
parent 16ab9a3f8d
commit 3559b367e6
27 changed files with 822 additions and 8 deletions
+1
View File
@@ -0,0 +1 @@
<div class="d-flex gap-3 overflow-auto" style="min-height:20rem">{% for column in columns %}<section class="card flex-shrink-0" style="width:19rem;border-top:4px solid {{ column.color }}"><div class="card-header"><strong>{{ column.name }}</strong>{% if column.is_default %}<small> · Default</small>{% endif %}<a class="float-end" href="{% url 'projects:column_edit' column.id %}" aria-label="Edit {{ column.name }}">Edit</a></div><div class="card-body" data-column="{{ column.id }}" style="min-height:12rem">{% for card in column.visible_cards %}<article class="card mb-2" data-move="{% url 'projects:card_move' card.id %}"><div class="card-body"><a href="{% url 'projects:card' card.id %}"><strong>{{ card.title }}</strong></a><div><span class="badge text-bg-secondary">{{ card.get_priority_display }}</span> <small>{{ card.get_card_type_display }}</small>{% if card.is_blocked %}<span class="badge text-bg-danger">Blocked</span>{% endif %}</div><form method="post" action="{% url 'projects:card_move' card.id %}" class="mt-2">{% csrf_token %}<select name="column_id" aria-label="Move {{ card.title }}" class="form-select form-select-sm" onchange="this.form.submit()">{% for choice in columns %}<option value="{{ choice.id }}" {% if choice.id == column.id %}selected{% endif %}>{{ choice.name }}</option>{% endfor %}</select></form></div></article>{% endfor %}</div></section>{% endfor %}</div>
@@ -0,0 +1 @@
<div class="row g-3">{% for project in projects %}<div class="col-md-6 col-xl-4"><div class="card h-100"><div class="card-body"><h2 class="h5"><a href="{% url 'projects:board' project.id %}">{{ project.name }}</a></h2><p>{{ project.description|truncatechars:180 }}</p><small>{{ project.card_count }} cards</small>{% if project.git_repository_url %}<p><a href="{{ project.git_repository_url }}" rel="noopener noreferrer">Repository</a></p>{% endif %}</div></div></div>{% empty %}<p>No projects found.</p>{% endfor %}</div>
+1
View File
@@ -0,0 +1 @@
{% extends 'core/base.html' %}{% block content %}<div class="d-flex justify-content-between align-items-center mb-3"><div><a href="{% url 'projects:list' %}">All projects</a><h1>{{ project.name }}</h1><p>{{ project.description }}</p>{% if project.git_repository_url %}<a href="{{ project.git_repository_url }}" rel="noopener noreferrer">Repository</a>{% endif %}</div><div><a class="btn btn-outline-secondary" href="{% url 'projects:edit' project.id %}">Edit project</a> <a class="btn btn-success" href="{% url 'projects:card_create' project.id %}">New card</a></div></div><form class="row g-2 mb-3" method="get"><div class="col"><input class="form-control" name="q" value="{{ query }}" placeholder="Search cards and specifications" aria-label="Search cards" hx-get="{% url 'projects:board' project.id %}" hx-trigger="input changed delay:300ms" hx-target="#board-results" hx-include="closest form"></div><div class="col-auto"><select class="form-select" name="priority" aria-label="Priority" hx-get="{% url 'projects:board' project.id %}" hx-trigger="change" hx-target="#board-results" hx-include="closest form"><option value="">All priorities</option><option value="high">High</option><option value="medium">Medium</option><option value="low">Low</option></select></div><div class="col-auto"><button class="btn btn-outline-secondary">Search</button></div></form><div id="board-results">{% include 'projects/_board.html' %}</div><a class="btn btn-outline-secondary mt-3" href="{% url 'projects:column_create' project.id %}">Add column</a><script src="https://unpkg.com/htmx.org@2.0.4"></script><script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js"></script><script>document.querySelectorAll('[data-column]').forEach(el=>new Sortable(el,{group:'cards',animation:150,onEnd:e=>{const form=new FormData();form.append('column_id',e.to.dataset.column);form.append('position',e.newIndex);fetch(e.item.dataset.move,{method:'POST',headers:{'X-CSRFToken':document.querySelector('[name=csrfmiddlewaretoken]').value},body:form}).then(r=>{if(!r.ok)location.reload()})}}));</script>{% csrf_token %}{% endblock %}
+1
View File
@@ -0,0 +1 @@
{% extends 'core/base.html' %}{% load project_markdown %}{% block content %}<a href="{% url 'projects:board' card.project_id %}">← {{ card.project.name }}</a><div class="d-flex justify-content-between mt-3"><h1>{{ card.title }}</h1><a class="btn btn-outline-secondary" href="{% url 'projects:card_edit' card.id %}">Edit</a></div><p><span class="badge text-bg-secondary">{{ card.get_priority_display }}</span> {{ card.column.name }} · {{ card.get_card_type_display }} · Revision {{ card.revision }}</p><div class="card card-body mb-4 markdown-body">{{ card.description_markdown|safe_markdown }}</div><h2 class="h4">Progress notes</h2>{% for comment in card.comments.all %}<div class="card card-body mb-2"><small>{{ comment.author }} · {{ comment.created_at }}</small><p>{{ comment.body|linebreaksbr }}</p></div>{% endfor %}<form method="post" action="{% url 'projects:card_comment' card.id %}">{% csrf_token %}<label for="comment">Add note</label><textarea class="form-control" id="comment" name="body" required></textarea><button class="btn btn-success mt-2">Add note</button></form><h2 class="h4 mt-4">History</h2><ul>{% for event in card.activity.all %}<li>{{ event.created_at }} · {{ event.action }} by {{ event.actor }}</li>{% endfor %}</ul>{% endblock %}
+1
View File
@@ -0,0 +1 @@
{% extends 'core/base.html' %}{% block content %}<div style="max-width:52rem"><h1>{{ title }}</h1><form method="post" class="card card-body">{% csrf_token %}{{ form.as_p }}<button class="btn btn-success align-self-start">Save</button></form></div>{% endblock %}
+1
View File
@@ -0,0 +1 @@
{% extends 'core/base.html' %}{% block content %}<div class="d-flex justify-content-between align-items-center mb-4"><div><h1>Projects</h1><p>Boards and specifications across your workspace.</p></div><a class="btn btn-success" href="{% url 'projects:create' %}">New project</a></div><form method="get" role="search" class="mb-3"><label for="project-search" class="form-label">Search projects and cards</label><input id="project-search" class="form-control" name="q" value="{{ query }}" hx-get="{% url 'projects:list' %}" hx-trigger="input changed delay:300ms" hx-target="#project-results" hx-indicator="#search-loading"><span id="search-loading" class="htmx-indicator">Searching…</span></form><div id="project-results">{% include 'projects/_project_list.html' %}</div><script src="https://unpkg.com/htmx.org@2.0.4"></script>{% endblock %}
+1
View File
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Sign in · Common Ground</title><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css"></head><body class="bg-light"><main class="container" style="max-width:28rem;margin-top:12vh"><h1>Common Ground</h1><p>Sign in to your dashboard.</p><form method="post" class="card card-body">{% csrf_token %}{{ form.as_p }}<input type="hidden" name="next" value="{{ next }}"><button class="btn btn-success">Sign in</button></form></main></body></html>
+1
View File
@@ -0,0 +1 @@
{% extends 'core/base.html' %}{% block content %}<h1>Profile</h1><div class="card card-body" style="max-width:40rem"><h2 class="h5">Account</h2><form method="post">{% csrf_token %}{{ form.as_p }}<button class="btn btn-success">Save profile</button></form><a class="mt-3" href="{% url 'password_change' %}">Change password</a><form method="post" action="{% url 'logout' %}" class="mt-3">{% csrf_token %}<button class="btn btn-outline-secondary">Sign out</button></form></div><h2 class="h5 mt-4">MCP connections</h2><p>Remote MCP and OAuth connections are being prepared. No clients are connected.</p>{% endblock %}