# HG changeset patch # User bsw # Date 1405540161 -7200 # Node ID 3f52e99b444dc5f9b95298c376c6183688a3b744 # Parent bd2509e7f6279b003f66fc79c055f52b77e1fe45 Added missing feature database download again diff -r bd2509e7f627 -r 3f52e99b444d app/main/index/_sidebar_whatcanido.lua --- a/app/main/index/_sidebar_whatcanido.lua Wed Jul 16 21:48:19 2014 +0200 +++ b/app/main/index/_sidebar_whatcanido.lua Wed Jul 16 21:49:21 2014 +0200 @@ -49,6 +49,19 @@ end } end } end ) + if config.download_dir then + ui.sidebarSection( function() + ui.heading { level = 3, content = _"I want to download all data" } + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () + ui.tag { tag = "li", content = function () + ui.link{ + module = "index", view = "download", + text = _"download database" + } + end } + end } + end ) + end ui.sidebarSection( function() ui.heading { level = 3, content = _"I want to learn more about LiquidFeedback" } ui.tag { tag = "ul", attr = { class = "ul" }, content = function () diff -r bd2509e7f627 -r 3f52e99b444d app/main/index/download.lua --- a/app/main/index/download.lua Wed Jul 16 21:48:19 2014 +0200 +++ b/app/main/index/download.lua Wed Jul 16 21:49:21 2014 +0200 @@ -2,27 +2,6 @@ error("feature not enabled") end -slot.put_into("title", _"Download database export") - -slot.select("actions", function() - ui.link{ - content = function() - ui.image{ static = "icons/16/cancel.png" } - slot.put(_"Cancel") - end, - module = "index", - view = "index" - } -end) - -ui.container{ - attr = { class = "wiki use_terms" }, - content = function() - slot.put(config.download_use_terms) - end -} - - local file_list = extos.listdir(config.download_dir) local tmp = {} @@ -36,23 +15,47 @@ table.sort(file_list, function(a, b) return a > b end) -ui.list{ - records = file_list, - columns = { - { - content = function(filename) - slot.put(encode.html(filename)) - end - }, - { - content = function(filename) - ui.link{ - content = _"Download", - module = "index", - view = "download_file", - params = { filename = filename } + +ui.title(_"Download database export") + +ui.section( function() + + ui.sectionHead( function() + ui.heading { level = 1, content = _"Download database export" } + end ) + + if config.download_use_terms then + ui.sectionRow( function() + ui.container{ + attr = { class = "wiki use_terms" }, + content = function() + slot.put(config.download_use_terms) + end + } + end ) + end + + ui.sectionRow( function() + + ui.list{ + records = file_list, + columns = { + { + content = function(filename) + ui.tag{ content = filename } + end + }, + { + content = function(filename) + ui.link{ + content = _"Download", + module = "index", + view = "download_file", + params = { filename = filename } + } + end } - end + } } - } -} \ No newline at end of file + end) +end) \ No newline at end of file