liquid_feedback_frontend

diff app/main/index/download.lua @ 1059:3f52e99b444d

Added missing feature database download again
author bsw
date Wed Jul 16 21:49:21 2014 +0200 (2014-07-16)
parents 701a5cf6b067
children 32cc544d5a5b
line diff
     1.1 --- a/app/main/index/download.lua	Wed Jul 16 21:48:19 2014 +0200
     1.2 +++ b/app/main/index/download.lua	Wed Jul 16 21:49:21 2014 +0200
     1.3 @@ -2,27 +2,6 @@
     1.4    error("feature not enabled")
     1.5  end
     1.6  
     1.7 -slot.put_into("title", _"Download database export")
     1.8 -
     1.9 -slot.select("actions", function()
    1.10 -  ui.link{
    1.11 -    content = function()
    1.12 -        ui.image{ static = "icons/16/cancel.png" }
    1.13 -        slot.put(_"Cancel")
    1.14 -    end,
    1.15 -    module = "index",
    1.16 -    view = "index"
    1.17 -  }
    1.18 -end)
    1.19 -
    1.20 -ui.container{
    1.21 -  attr = { class = "wiki use_terms" },
    1.22 -  content = function()
    1.23 -    slot.put(config.download_use_terms)
    1.24 -  end
    1.25 -}
    1.26 -
    1.27 -
    1.28  local file_list = extos.listdir(config.download_dir)
    1.29  
    1.30  local tmp = {}
    1.31 @@ -36,23 +15,47 @@
    1.32  
    1.33  table.sort(file_list, function(a, b) return a > b end)
    1.34  
    1.35 -ui.list{
    1.36 -  records = file_list,
    1.37 -  columns = {
    1.38 -    {
    1.39 -      content = function(filename)
    1.40 -        slot.put(encode.html(filename))
    1.41 -      end
    1.42 -    },
    1.43 -    {
    1.44 -      content = function(filename)
    1.45 -        ui.link{
    1.46 -          content = _"Download",
    1.47 -          module = "index",
    1.48 -          view = "download_file",
    1.49 -          params = { filename = filename }
    1.50 +
    1.51 +ui.title(_"Download database export")
    1.52 +
    1.53 +ui.section( function()
    1.54 +
    1.55 +  ui.sectionHead( function()
    1.56 +    ui.heading { level = 1, content = _"Download database export" }
    1.57 +  end )
    1.58 +  
    1.59 +  if config.download_use_terms then
    1.60 +    ui.sectionRow( function()
    1.61 +      ui.container{
    1.62 +        attr = { class = "wiki use_terms" },
    1.63 +        content = function()
    1.64 +          slot.put(config.download_use_terms)
    1.65 +        end
    1.66 +      }
    1.67 +    end )
    1.68 +  end
    1.69 +  
    1.70 +  ui.sectionRow( function()
    1.71 +
    1.72 +    ui.list{
    1.73 +      records = file_list,
    1.74 +      columns = {
    1.75 +        {
    1.76 +          content = function(filename)
    1.77 +            ui.tag{ content = filename }
    1.78 +          end
    1.79 +        },
    1.80 +        {
    1.81 +          content = function(filename)
    1.82 +            ui.link{
    1.83 +              content = _"Download",
    1.84 +              module = "index",
    1.85 +              view = "download_file",
    1.86 +              params = { filename = filename }
    1.87 +            }
    1.88 +          end
    1.89          }
    1.90 -      end
    1.91 +      }
    1.92      }
    1.93 -  }
    1.94 -}
    1.95 \ No newline at end of file
    1.96 +  end)
    1.97 +end)
    1.98 \ No newline at end of file

Impressum / About Us