Added functionality to all pages
This commit is contained in:
@@ -1,22 +1,42 @@
|
||||
{{ define "content" }}
|
||||
<div class="action-bar">
|
||||
<div class="page-header action-bar">
|
||||
<h1>Projects</h1>
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
style="width: auto; padding: 0.6rem 1.2rem; font-size: 0.95rem;"
|
||||
hx-get="/project/new"
|
||||
hx-target="#modal"
|
||||
>
|
||||
<button class="btn btn-primary" style="width: auto; padding: 0.6rem 1.2rem; font-size: 0.95rem;" onclick="openProjectModal()">
|
||||
New Project
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div
|
||||
hx-get="/api/project"
|
||||
hx-trigger="load"
|
||||
hx-target="this"
|
||||
>
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th style="text-align: right;">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="projects-table-body">
|
||||
<tr><td colspan="3" class="table-loader">Loading projects...</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="modal"></div>
|
||||
<div id="project-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h2 id="project-modal-title">New Project</h2>
|
||||
<form id="project-form" onsubmit="saveProject(event)">
|
||||
<input type="hidden" id="project-id">
|
||||
<div class="form-group">
|
||||
<input type="text" id="project-name" placeholder="Project Name" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" id="project-desc" placeholder="Description">
|
||||
</div>
|
||||
<div class="button-group">
|
||||
<button type="submit" class="btn btn-primary">Save Project</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="closeModal('project-modal')">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user