Repos / pytaku / 288363c875
commit 288363c8756956ede1d7595c2ccdbdf7add4040c
Author: Bùi Thành Nhân <hi@imnhan.com>
Date:   Sat Aug 8 09:19:26 2020 +0700

    hide "done" column if not logged in

diff --git a/pyproject.toml b/pyproject.toml
index 0b6e855..d1b7809 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "pytaku"
-version = "0.2.0"
+version = "0.2.1"
 description = ""
 authors = ["Bùi Thành Nhân <hi@imnhan.com>"]
 license = "AGPL-3.0-only"
diff --git a/src/pytaku/templates/title.html b/src/pytaku/templates/title.html
index 97151c8..ce2f380 100644
--- a/src/pytaku/templates/title.html
+++ b/src/pytaku/templates/title.html
@@ -44,17 +44,19 @@ <h1>{{ name }}</h1>
 
 <table>
   <tr>
-    <th>Done</th>
+    {% if session['user'] %}<th>Done</th>{% endif %}
     <th>Name</th>
     <th>Group</th>
   </tr>
   {% for chapter in chapters %}
   <tr>
+    {% if session['user'] %}
     <td>
       {% if chapter['is_read'] %}
       {{ ibutton(href='?unread=' + chapter['id'], text='✓', color='green', title='Click to unread') }}
       {% endif %}
     </td>
+    {% endif %}
     <td>
       <a href="{{ url_for('chapter_view', chapter_id=chapter['id'], site=site) }}">
         Chapter {{ chapter['number'] }}