remove MetaDataTable and MetaDataColumn to cleanup schema

This commit is contained in:
Thomas Peetz
2025-05-23 18:21:41 +02:00
parent 8cfb60f9a1
commit 456162da44
34 changed files with 536 additions and 1354 deletions
@@ -1,21 +0,0 @@
{% extends "shared/base.html" %}
{% block title %}
<title>MetaData</title>
{% endblock %}
{% block content %}
{% with msg=msg %}
{% include "components/alerts.html" %}
{% endwith %}
<div class="container">
{% for table in data %}
<div class="row">
{% with obj=table %}
{% include "components/metadatatable_cards.html" %}
{% endwith %}
<br>
</div>
{% endfor %}
</div>
{% endblock %}
@@ -0,0 +1,38 @@
{% extends "shared/base.html" %}
{% block title %}
<title>Permissions</title>
{% endblock %}
{% block content %}
{% with msg=msg %}
{% include "components/alerts.html" %}
{% endwith %}
<div class="container">
<div class="row">
<div class="col">
<h1 class="display-5">Permissions..</h1>
</div>
</div>
<div class="row">
<table class="table table-hover">
<thead><tr>
<th scope="col">Name</th>
<th colspan="2">Actions</th>
</tr></thead>
<tbody>
{% for permission in permissions %}
<tr>
<th scope="row"><a href="/admins/permissions/{{permission.id}}">{{permission.name}}</a></th>
<td><a href="/admin/permission/edit/{{permission.id}}" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Edit</a></td>
<td><a href="/admin/permission/delete/{{permission.id}}" class="btn btn-outline-danger btn-sm active" role="button" aria-pressed="true">Delete</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<div>
<a href="/admin/permission/add" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Add Permission</a>
</div>
</div>
</div>
{% endblock %}
@@ -0,0 +1,43 @@
{% extends "shared/base.html" %}
{% block title %}
<title>Profiles</title>
{% endblock %}
{% block content %}
{% with msg=msg %}
{% include "components/alerts.html" %}
{% endwith %}
<div class="container">
<div class="row">
<div class="col">
<h1 class="display-5">Profiles..</h1>
</div>
</div>
<div class="row">
<table class="table table-hover">
<thead><tr>
<th scope="col">Username</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th colspan="2">Actions</th>
</tr></thead>
<tbody>
{% for profile in profiles %}
<tr>
<th scope="row"><a href="/admins/profiles/{{profile.id}}">{{profile.user_name}}</a></th>
<th scope="row">{{profile.first_name}}</th>
<th scope="row">{{profile.last_name}}</th>
<th scope="row">{{profile.email}}</th>
<td><a href="/admin/profile/edit/{{profile.id}}" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Edit</a></td>
<td><a href="/admin/profile/delete/{{profile.id}}" class="btn btn-outline-danger btn-sm active" role="button" aria-pressed="true">Delete</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<div>
<a href="/admin/profile/add" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Add Profile</a>
</div>
</div>
</div>
{% endblock %}
+3 -1
View File
@@ -34,7 +34,9 @@
{% endfor %}
</tbody>
</table>
<a href="/comic/comic/add" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Add Comic</a>
<div>
<a href="/comic/comic/add" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Add Comic</a>
</div>
</div>
</div>
{% endblock %}
@@ -1,31 +0,0 @@
<div class="card shadow p-3 mb-2 bg-body rounded">
<div class="card-body">
<h5 class="card-title">{{obj.table_name}}</h5>
<table class="table table-hover">
<thead><tr>
<th scope="col">Column Name</th>
<th scope="col">Column Type</th>
<th scope="col">Column Order</th>
<th scope="col">Is Shown</th>
<th scope="col">Column Label</th>
<th scope="col">Show Filter</th>
<th scope="col">Filter Label</th>
<th scope="col">Ref Column</th>
</tr></thead>
<tbody>
{% for column in obj.table_columns %}
<tr>
<th scope="row"><a href="/admin/metadata/{{column.id}}">{{column.column_name}}</a></th>
<td>{{column.column_type}}</td>
<td>{{column.column_order}}</td>
<td>{% with check=column.is_shown %}{% include "components/check.html" %}{% endwith %}</td>
<td>{{column.column_label}}</td>
<td>{% with check=column.show_filter %}{% include "components/check.html" %}{% endwith %}</td>
<td>{{column.filter_label}}</td>
<td>{{column.ref_column}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
@@ -41,7 +41,8 @@
<li><a class="dropdown-item" href="/register/">Signup</a></li>
<li><a class="dropdown-item" href="/login/">Login</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="/admin/metadata">MetaData</a></li>
<li><a class="dropdown-item" href="/admin/profiles">Profiles</a></li>
<li><a class="dropdown-item" href="/admin/permissions">Permissions</a></li>
</ul>
</li>
</ul>