home · contact · privacy
Remove "all of Berlin" column collapsibility.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 3 Jul 2020 20:25:45 +0000 (22:25 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 3 Jul 2020 20:25:45 +0000 (22:25 +0200)
enhance_table.py

index 03382554e2dbfc538aca8107777ed15ee789546c..105e1d52a6c1833ca9c8bb55fed8ed74db9e1289 100755 (executable)
@@ -170,14 +170,15 @@ table, tr, th, td { border: 1px solid black; }
                 week_inc = '%.1f' % district_data['week_incidence']
             print('<td>')
             print(new_infections)
-            if district == sum_district:
-                print('<details open><summary></summary><table>')
-            else:
-                print('<details><summary></summary><table>')
+            if district != sum_district:
+                print('<details><summary></summary>')
+            print('<table>')
             print('<tr><th>%s</th><td>%s</td></tr>' % (long_wsum, week_sum))
             print('<tr><th>%s</th><td>%s</td></tr>' % (long_wavg, week_avg))
             print('<tr><th>%s</th><td>%s</td></tr>' % (long_winc, week_inc))
-            print('</table></details>')
+            print('</table>')
+            if district != sum_district:
+                print('</details>')
             print('</td>')
         print('</tr>')
     print('</table>')