X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fcategories.html.sh;fp=templates%2Fcategories.html.sh;h=e266e1f24e18b704208433cc843619b0614e8bc0;hp=5375965027dd10b91f8d10db4494c614c978a0a3;hb=2ea56a62d0ef6e9d295d0b8931a071e6f2e0a963;hpb=8144adb77a33850bca9c60f0b040b39f4a5da91f diff --git a/templates/categories.html.sh b/templates/categories.html.sh index 5375965..e266e1f 100755 --- a/templates/categories.html.sh +++ b/templates/categories.html.sh @@ -1,4 +1,4 @@ -# Copyright 2015 Paul Hänsch +# Copyright 2015, 2017 Paul Hänsch # # This file is part of Confetti. # @@ -17,29 +17,27 @@ cat_listing(){ list_categories | while read cat; do - cat <<-END -
  • ${cat}
  • - END + printf '
  • %s
  • \n' \ + "$(htmlsafe "$cat")" "$(attribsafe "$cat")" "$(l10n cat_remove)" done } list_catsel(){ card="$1" - cats="$(get_categories $card)" + cats="$(get_categories "$card")" list_categories |while read cat; do - cat <<-END -
  • - END + printf '
  • ' \ + "$(printf %s "$cats" |grep -qF "$cat" && printf 'checked="checked"')" \ + "$(attribsafe "$card")" "$(attribsafe "$cat")" "$(htmlsafe "$cat")" done } display_catsel(){ card="$1" - cat <<-END -
  • $(get_name "$card")

  • - END + printf '
  • %s

  • ' } cat <$(l10n cat_update)