summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--file_management/views.py8
-rw-r--r--static/style.css4
-rw-r--r--templates/file_management/edit_manga.html23
3 files changed, 30 insertions, 5 deletions
diff --git a/file_management/views.py b/file_management/views.py
index 0743225..5cb9ba1 100644
--- a/file_management/views.py
+++ b/file_management/views.py
@@ -82,7 +82,13 @@ def handle_upload(form_data):
82 82
83def edit_manga(request, mid): 83def edit_manga(request, mid):
84 manga = get_object_or_404(Manga, pk=mid) 84 manga = get_object_or_404(Manga, pk=mid)
85 return render(request, 'file_management/edit_manga.html', {'id': manga.id}) 85 tag_list = Tag.objects.filter(manga=manga)
86 return render(request, 'file_management/edit_manga.html',
87 {
88 'manga_obj': manga,
89 'tag_list': tag_list,
90 'tag_list_length': len(tag_list)
91 })
86 92
87def edit_orphan(request, oid): 93def edit_orphan(request, oid):
88 ## Only on form post 94 ## Only on form post
diff --git a/static/style.css b/static/style.css
index 64a9c35..830fdd7 100644
--- a/static/style.css
+++ b/static/style.css
@@ -2,10 +2,10 @@
2 width: 400px; 2 width: 400px;
3} 3}
4 4
5ul.top-menu { 5.inline-list, ul.top-menu {
6 list-style-type: none; 6 list-style-type: none;
7} 7}
8 8
9ul.top-menu li { 9.inline-list li, ul.top-menu li {
10 display: inline; 10 display: inline;
11} 11}
diff --git a/templates/file_management/edit_manga.html b/templates/file_management/edit_manga.html
index 5f70e06..97789a8 100644
--- a/templates/file_management/edit_manga.html
+++ b/templates/file_management/edit_manga.html
@@ -2,7 +2,26 @@
2 2
3{% block title %}Edit Manga{% endblock %} 3{% block title %}Edit Manga{% endblock %}
4 4
5{% comment %}
6TODO: make this shit editable, lol.
7{% endcomment %}
8
5{% block body %} 9{% block body %}
6<h1>Edit manga {{ id }}</h1> 10<h1>Edit manga {{ manga_obj.id }}</h1>
7<p>//TODO</p> 11<p>Full Name: {{ manga_obj.full_name }}<br />
12System Name: {{ manga_obj.system_name }}<br />
13File directory: {{ manga_obj.directory }}<br />
14Oneshot: {{ manga_obj.oneshot }}<br /><br />
15
16Created: {{ manga_obj.first_created }}<br />
17Modified: {{ manga_obj.last_modified }}<br /><br />
18
19Tags ({{ tag_list_length }}): <br />
20{% comment %}
21 TODO
22 Make the links open a list of manga with that tag (new tab/window).
23{% endcomment %}
24<ul class="inline-list">{% for t in tag_list %}
25 <li><a href="#{{t.system_name}}">{{ t.full_name }}</a></li>{% endfor %}
26</ul>
8{% endblock %} 27{% endblock %}