liquid_feedback_frontend
view app/main/suggestion/_suggestion.lua @ 276:f460555c9896
Code cleanup
| author | bsw | 
|---|---|
| date | Sun Feb 12 20:03:26 2012 +0100 (2012-02-12) | 
| parents | 24b61c3fd933 | 
| children | 23c98752e697 | 
 line source
     1 local suggestion = param.get("suggestion", "table")
     3 ui.form{
     4   attr = { class = "vertical" },
     5   record = suggestion,
     6   readonly = true,
     7   content = function()
     8     if suggestion.author then 
     9       suggestion.author:ui_field_text{label=_"Author"} 
    10     end
    11     ui.field.text{ label = _"Title",        name = "name" }
    12     ui.container{
    13       attr = { class = "suggestion_content wiki" },
    14       content = function()
    15         slot.put(encode.html_newlines(encode.html(suggestion.description)))
    16       end
    17     }
    18   end
    19 }
    20 execute.view{
    21   module = "suggestion",
    22   view = "_list",
    23   params = {
    24     suggestions_selector = Suggestion:new_selector():add_where{ "id = ?", suggestion.id },
    25     initiative = suggestion.initiative,
    26     show_name = false,
    27     show_filter = false
    28   }
    29 }
