]> git.plutz.net Git - serve0/blobdiff - templates/advfilter.html.sh
added licence headers, coding style improvements
[serve0] / templates / advfilter.html.sh
index ec2e5e7691afd1b00589583df7f289f4833445fe..7fac882896e85461f1c127d2ebfcebfe7096bb3e 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014,2015 Paul Hänsch
+# Copyright 2014 - 2016 Paul Hänsch
 #
 # This file is part of Serve0
 # 
@@ -19,7 +19,7 @@ category_tabs(){
   for cat in "$@"; do
   cat <<EOF
   <div class="tab">
-    <input class="tabhandle" type="radio" name="category$n" id="cat${n}_$cat" value="$cat" $([ "$cat" = "$fcat" ] && echo checked)>
+    <input class="tabhandle" type="radio" name="category$n" id="cat${n}_$cat" value="$cat" $([ "$cat" = "$fcat" ] && printf checked)>
     <label class="category tabhandle" for="cat${n}_$cat">$([ "$cat" = none ] && printf %s general || printf %s "$cat")</label>
     <select class="category tabcontent" class="input tagfilter" name="cfilter${n}_" size="12" multiple>
       $(category_selected "$cat" "$filter")
@@ -40,7 +40,7 @@ filterbox(){
     debug "fneg: $fneg fcat: $fcat     filter: $filter"
     
     cat <<-EOF
-       <input class="tabhandle" type="checkbox" id="filter$n" $([ $n = 0 -o -n "$filter" ] && echo checked) >
+       <input class="tabhandle" type="checkbox" id="filter$n" $([ $n = 0 -o -n "$filter" ] && printf checked) >
        <label class="tabhandle filter" for="filter$n">+ and</label>
        <div class="tabcontent filter">
          <input type="radio" name="type$n" value="pos" id="pos$n" ${fneg:-checked} ><label for="pos$n" class="conjunction">Any</label>
@@ -68,9 +68,9 @@ cat <<EOF
     <p class="filter final">
       <label for="o3" class="order">Order by:</label>
       <select class="edit order" size="1" name="o" id="o3">
-        <option $([ "${_GET[o]}" = Name ] && echo selected) >Name</option>
-        <option $([ "${_GET[o]}" = Date ] && echo selected) >Date</option>
-        <option $([ "${_GET[o]}" = Length ] && echo selected) >Length</option>
+        <option $([ "${_GET[o]}" = Name ] && printf selected) >Name</option>
+        <option $([ "${_GET[o]}" = Date ] && printf selected) >Date</option>
+        <option $([ "${_GET[o]}" = Length ] && printf selected) >Length</option>
       </select>
       <input type="submit" value="Filter!">
     </p>