liquid_feedback_frontend
view 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
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 source
     1 if not config.download_dir then
     2   error("feature not enabled")
     3 end
     5 slot.put_into("title", _"Download database export")
     7 slot.select("actions", function()
     8   ui.link{
     9     content = function()
    10         ui.image{ static = "icons/16/cancel.png" }
    11         slot.put(_"Cancel")
    12     end,
    13     module = "index",
    14     view = "index"
    15   }
    16 end)
    18 util.help("index.download", _"Download")
    20 ui.container{
    21   attr = { class = "wiki use_terms" },
    22   content = function()
    23     slot.put(format.wiki_text(config.download_use_terms))
    24   end
    25 }
    28 local file_list = os.listdir(config.download_dir)
    30 local tmp = {}
    31 for i, filename in ipairs(file_list) do
    32   if not filename:find("^%.") then
    33     tmp[#tmp+1] = filename
    34   end
    35 end
    37 local file_list = tmp
    39 table.sort(file_list, function(a, b) return a > b end)
    41 ui.list{
    42   records = file_list,
    43   columns = {
    44     {
    45       content = function(filename)
    46         slot.put(encode.html(filename))
    47       end
    48     },
    49     {
    50       content = function(filename)
    51         ui.link{
    52           content = _"Download",
    53           module = "index",
    54           view = "download_file",
    55           params = { filename = filename }
    56         }
    57       end
    58     }
    59   }
    60 }
