add CRUD for WorkType
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
<th scope="row">Artist Name</th>
|
||||
<td colspan="2">{{artist.name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Link</th>
|
||||
<td colspan="2">{{artist.weblink}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Works</th>
|
||||
<td colspan="2">
|
||||
@@ -46,5 +50,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div><a href="/comic/artists" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Back to list</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
{% endwith %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Link</th>
|
||||
<td colspan="2">{{comic.weblink}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Works</th>
|
||||
<td colspan="2">
|
||||
|
||||
@@ -20,6 +20,24 @@
|
||||
<th scope="row">Publisher Name</th>
|
||||
<td colspan="2">{{publisher.name}}</td>
|
||||
</tr>
|
||||
{% if publisher.parent_publisher_id %}
|
||||
<tr>
|
||||
<th scope="row">Parent Company</th>
|
||||
<td colspan="2"><a href="/comic/publishers/{{publisher.parent_publisher_id}}">{{publisher.parent_publisher.name}}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if publisher.imprints|length > 0 %}
|
||||
<tr>
|
||||
<th scope="row">Imprints</th>
|
||||
<td colspan="2">
|
||||
<ul>
|
||||
{% for imprint in publisher.imprints %}
|
||||
<li><a href="/comic/publishers/{{imprint.id}}">{{imprint.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th scope="row">Comics</th>
|
||||
<td colspan="2">
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">ID</th>
|
||||
<td colspan="2">{{worktype.id}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Data Created</th>
|
||||
<td colspan="2">{{worktype.created_date}}</td>
|
||||
@@ -45,5 +49,23 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
<a href="/comic/worktypes" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Back to list</a>
|
||||
<a href="/comic/worktype/edit/{{worktype.id}}" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Edit</a>
|
||||
<a href="/comic/worktype/delete/{{worktype.id}}" class="btn btn-outline-danger btn-sm active" role="button" aria-pressed="true">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
function delete_job(id){
|
||||
fetch('/comics/worktypes/'+id+'/delete/'+id,{
|
||||
method:'DELETE',})
|
||||
.then(response => response.json())
|
||||
.then(document.getElementById('result').innerHTML = "Refreshing...")
|
||||
.then(data => document.getElementById('result').innerHTML = data.detail);
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
<tbody>
|
||||
{% for worktype in worktypes %}
|
||||
<tr>
|
||||
<th scope="row"><a href="/comic/worktypes/{{worktype.id}}">{{worktype.name}}</a></th>
|
||||
<th scope="row"><a href="/comic/worktypes/{{worktype.id}}">{{worktype.name}}</a></th>
|
||||
<td><a href="/comic/worktype/edit/{{worktype.id}}" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Edit</a></td>
|
||||
<td><a href="/comic/worktype/delete/{{worktype.id}}" class="btn btn-outline-danger btn-sm active" role="button" aria-pressed="true">Delete</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="/comic/add-worktype" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Add WorkType</a>
|
||||
<a href="/comic/worktype/add" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Add WorkType</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<div class="card shadow p-3 mb-2 bg-body rounded" style="width: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{obj.name}}</h5>
|
||||
<p class="card-text">Link : {{obj.weblink}}</p>
|
||||
<a href="/comic/artists/{{obj.id}}" class="btn btn-primary">Read more</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<li><a class="dropdown-item" href="/comic/artists/">Artists</a></li>
|
||||
<li><a class="dropdown-item" href="/comic/publishers/">Publishers</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="/comic/worktypes/">WorkTypes</a></li>
|
||||
<li><a class="dropdown-item" href="/comic/worktypes">WorkTypes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<th scope="col">Cloudlink</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
{% for mediavideo in mediavideos %}
|
||||
<tr>
|
||||
{% for mediavideo in mediavideos %}
|
||||
<tr>
|
||||
<th scope="row"><a href="/media/videos/{{mediavideo.id}}">{{mediavideo.title}}</a></th>
|
||||
<td>{{mediavideo.url}}</td>
|
||||
<td>{{mediavideo.cloud_link}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user