liquid_feedback_frontend

diff app/main/index/download.lua @ 6:8d91bccab0bf

Version beta2

Possibility to browse voters of a closed issue

Registration with invite code

Email confirmation and password recovery

Download function (for database dumps) added

Critical bug solved, which made it impossible to select your opinion on other peoples suggestions

Catching error, when trying to set an opinion on a suggestion which has been meanwhile deleted

Fixed wrong sorting order for "supporters" or "potential supporters"

Added format info for birthday (Error when entering dates in wrong format is NOT fixed in this release)

Strip space characters from certain fields and ensure they contain at least 3 characters

Showing grade in opinion/list as clear text instead of integer value

More information on initiative is displayed while voting

Colored notification box shown on pages of issues or initiatives which are currently in voting state

Changed default filter for issues to "Open"

Back link on suggestion page

Some optical changes

Removed wrong space character in LICENSE file
author bsw/jbe
date Sat Jan 02 12:00:00 2010 +0100 (2010-01-02)
parents
children f49cdfb72567
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/index/download.lua	Sat Jan 02 12:00:00 2010 +0100
     1.3 @@ -0,0 +1,60 @@
     1.4 +if not config.download_dir then
     1.5 +  error("feature not enabled")
     1.6 +end
     1.7 +
     1.8 +slot.put_into("title", _"Download database export")
     1.9 +
    1.10 +slot.select("actions", function()
    1.11 +  ui.link{
    1.12 +    content = function()
    1.13 +        ui.image{ static = "icons/16/cancel.png" }
    1.14 +        slot.put(_"Cancel")
    1.15 +    end,
    1.16 +    module = "index",
    1.17 +    view = "index"
    1.18 +  }
    1.19 +end)
    1.20 +
    1.21 +util.help("index.download", _"Download")
    1.22 +
    1.23 +ui.container{
    1.24 +  attr = { class = "wiki use_terms" },
    1.25 +  content = function()
    1.26 +    slot.put(format.wiki_text(config.download_use_terms))
    1.27 +  end
    1.28 +}
    1.29 +
    1.30 +
    1.31 +local file_list = os.listdir(config.download_dir)
    1.32 +
    1.33 +local tmp = {}
    1.34 +for i, filename in ipairs(file_list) do
    1.35 +  if not filename:find("^%.") then
    1.36 +    tmp[#tmp+1] = filename
    1.37 +  end
    1.38 +end
    1.39 +
    1.40 +local file_list = tmp
    1.41 +
    1.42 +table.sort(file_list, function(a, b) return a > b end)
    1.43 +
    1.44 +ui.list{
    1.45 +  records = file_list,
    1.46 +  columns = {
    1.47 +    {
    1.48 +      content = function(filename)
    1.49 +        slot.put(encode.html(filename))
    1.50 +      end
    1.51 +    },
    1.52 +    {
    1.53 +      content = function(filename)
    1.54 +        ui.link{
    1.55 +          content = _"Download",
    1.56 +          module = "index",
    1.57 +          view = "download_file",
    1.58 +          params = { filename = filename }
    1.59 +        }
    1.60 +      end
    1.61 +    }
    1.62 +  }
    1.63 +}
    1.64 \ No newline at end of file

Impressum / About Us