From dd523d1f5dc7f9907d0f4fc07f9796dab9b22085 Mon Sep 17 00:00:00 2001 From: paul <paul@plutz.net> Date: Sat, 14 Jan 2017 13:10:47 +0000 Subject: [PATCH] obsoleted tree mode in favour of browse svn path=/trunk/; revision=172 --- pages/tree.sh | 45 -------------------------------- templates/tree.html.sh | 59 ------------------------------------------ 2 files changed, 104 deletions(-) delete mode 100755 pages/tree.sh delete mode 100755 templates/tree.html.sh diff --git a/pages/tree.sh b/pages/tree.sh deleted file mode 100755 index 40a50cc..0000000 --- a/pages/tree.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/zsh - -# Copyright 2014, 2015 Paul Hänsch -# -# This file is part of Serve0. -# -# Serve0 is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Serve0 is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Serve0. If not, see <http://www.gnu.org/licenses/>. - -. $_EXEC/pages/common.sh - -directory="$(invalidate "${_GET[d]}" '(.*/)?\.\.(/.*)?|' /)" - -filelist(){ - debug "Filelist with dir = $directory" - - [ -n "${directory#/}" ] && printf %s "<a class='file directory' href='?p=tree&d=$(urlsafe "${directory%/*}")'>..</a>" - - find -L "${treeroot%/}/${directory#/}" -mindepth 1 -maxdepth 1 -type d \ - | sort \ - | while read dir; do - name="${dir##*/}" - printf %s "<a class='file directory' href='?p=tree&d=$(urlsafe "${directory%/}/$name")'>$(htmlsafe "$name")</a>" - done - - find -L "${treeroot%/}/${directory#/}" -mindepth 1 -maxdepth 1 -type f \ - | sort \ - | while read file; do - name="${file##*/}" - printf %s\\n "$name" |egrep -q "$file_pattern" && \ - printf %s "<a class='file video' href='?action=watch&l=$(urlsafe "${directory%/}/$name")'>$(htmlsafe "$name")</a>" \ - || printf %s "<span class='file plain'>$(htmlsafe "$name")</span>" - done -} - diff --git a/templates/tree.html.sh b/templates/tree.html.sh deleted file mode 100755 index 485bd19..0000000 --- a/templates/tree.html.sh +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2014 - 2016 Paul Hänsch -# -# This file is part of Serve0 -# -# Serve0 is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Serve0 is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Serve0 If not, see <http://www.gnu.org/licenses/>. - -cat <<EOF - <input type=radio name=topmenu id=btn_search checked><label for=btn_search>Search</label> - <form class="panel" id="search" action="?" method="get" accept-charset="UTF-8"> - <input type="text" name="s" value="$search" placeholder="Search"> - - <select class="order" size="1" name="o" id="o1"> - <option class="label" selected disabled>Order by</option> - <option>Name</option> - <option>Date</option> - <option>Length</option> - </select> - <!-- input type="submit" name="submit" value="Find" --> - - <a class="panel clearsearch" href="?">Clear</a> - </form> - - <input type=radio name=topmenu id=btn_preferences><label for=btn_preferences>Preferences</label> - $(. $_EXEC/templates/preferences.html.sh) - - <input type=radio name=topmenu id=btn_morelinks><label for=btn_morelinks>{+}</label> - <div class="panel switchable top" id="morelinks"> - <a class="panel toggle" href="#">Hide</a> - - <a class="panel listview" href="?p=list">Index view</a> - <a class="panel" href="?p=playctl">Player</a> - </div> - - <form action="?action=multitag&${page_this}" method="post" accept-charset="UTF-8"> - <ul id="thumblist"> - $(filelist) - </ul> - $(. $_EXEC/templates/tagger.html.sh) - </form> - - <div class="panel bottom" id="foot"> - <a class="panel toggle" href="#tagger">Add Tags</a> - <a class="panel toggle" href="#">â§</a> - </div> - -EOF - -# vi:set filetype=html: -- 2.39.5