]> git.plutz.net Git - serve0/commitdiff
display either tagging or indexer
authorPaul Hänsch <paul@plutz.net>
Wed, 25 Jul 2018 00:42:21 +0000 (02:42 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 25 Jul 2018 00:42:21 +0000 (02:42 +0200)
list.sh
widgets.sh

diff --git a/list.sh b/list.sh
index 55fe33176901c1c5b207b16f28e81a31f2f25edc..71f70f9ca8590f796ec9e847069b63683911c48b 100644 (file)
--- a/list.sh
+++ b/list.sh
@@ -193,8 +193,7 @@ printf 'Content-Type: text/html;charset=utf-8\r\n\r\n'
     printf '
     [div #editing
       [a href="#multitag" Add Tags]'
-      w_tagging
-      w_index
+      w_index || w_tagging
       printf '
     ]
   ]
index 45084750583ff4369bab691385337bfea6a4a4aa..446b5d2edfafe6d1078dbcaccb8005db8ff08e56 100644 (file)
@@ -147,7 +147,7 @@ w_prefs(){
 }
 
 w_index(){
-  [ -d "$_DATA/$ITEM/.index" ] || printf '
+  [ -d "$_DATA/$ITEM/.index" ] && return 1 || printf '
   [form #index method="POST" action="?a=spawnindex"
     [hidden "ref" "%s"]
     [label Set up for Index view: ]
@@ -155,6 +155,7 @@ w_index(){
     [submit "spawn" "spawn" Set up]
   ]
   ' "$w_refuri"
+  return 0
 }
 
 w_advsearch(){