From 1bb4822dca6113f73e3bc89e2acf15935e6f8e92 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 3 Dec 2014 15:17:05 +0100 Subject: Rework LuCI build system * Rename subdirectories to their repective OpenWrt package names * Make each LuCI module its own standalone package * Deploy a shared luci.mk which is used by each module Makefile Signed-off-by: Jo-Philipp Wich --- modules/base/luasrc/view/cbi/filebrowser.htm | 108 --------------------------- 1 file changed, 108 deletions(-) delete mode 100644 modules/base/luasrc/view/cbi/filebrowser.htm (limited to 'modules/base/luasrc/view/cbi/filebrowser.htm') diff --git a/modules/base/luasrc/view/cbi/filebrowser.htm b/modules/base/luasrc/view/cbi/filebrowser.htm deleted file mode 100644 index a79beebba7..0000000000 --- a/modules/base/luasrc/view/cbi/filebrowser.htm +++ /dev/null @@ -1,108 +0,0 @@ - - - - - Filebrowser - LuCI - - - - - - <% - require("nixio.fs") - require("nixio.util") - require("luci.http") - require("luci.dispatcher") - - local field = luci.http.formvalue('field') - local request = luci.dispatcher.context.args - local path = { '' } - - for i = 1, #request do - if request[i] ~= '..' and #request[i] > 0 then - path[#path+1] = request[i] - end - end - - local filepath = table.concat( path, '/' ) - local filestat = nixio.fs.stat( filepath ) - local baseurl = luci.dispatcher.build_url('admin', 'filebrowser') - - if filestat and filestat.type == "reg" then - table.remove( path, #path ) - filepath = table.concat( path, '/' ) .. '/' - elseif not ( filestat and filestat.type == "dir" ) then - path = { '' } - filepath = '/' - else - filepath = filepath .. '/' - end - - local entries = nixio.util.consume((nixio.fs.dir(filepath))) - -%> -
- Location: - <% for i, dir in ipairs(path) do %> - <% if i == 1 then %> - (root) - <% elseif next(path, i) then %> - <% baseurl = baseurl .. '/' .. dir %> - / <%=dir%> - <% else %> - <% baseurl = baseurl .. '/' .. dir %> - / <%=dir%> - <% end %> - <% end %> -
- -
- -
-
    - <% for _, e in luci.util.vspairs(entries) do - local stat = nixio.fs.stat(filepath..e) - if stat and stat.type == 'dir' then - -%> -
  • - <%:Directory%> - <%=e%>/ -
  • - <% end end -%> - - <% for _, e in luci.util.vspairs(entries) do - local stat = nixio.fs.stat(filepath..e) - if stat and stat.type ~= 'dir' then - -%> -
  • - <%:File%> - <%=e%> -
  • - <% end end -%> -
-
- - -- cgit v1.2.3