bsw/jbe@19: slot.set_layout("atom") bsw/jbe@19: bsw/jbe@19: request.force_absolute_baseurl() bsw/jbe@19: bsw/jbe@19: local initiatives = Initiative:new_selector() bsw/jbe@19: :add_order_by("id DESC") bsw/jbe@19: :limit(25) bsw/jbe@19: :exec() bsw/jbe@19: bsw/jbe@19: for i, initiative in ipairs(initiatives) do bsw/jbe@19: ui.tag{ bsw/jbe@19: tag = "entry", bsw/jbe@19: content = function() bsw/jbe@19: ui.tag{ tag = "category", attr = { term = initiative.issue.area.name } } bsw/jbe@19: ui.tag{ tag = "author", content = initiative.current_draft.author.name } bsw/jbe@19: ui.tag{ tag = "title", content = initiative.name } bsw/jbe@19: ui.tag{ tag = "link", attr = { bsw/jbe@19: href = encode.url{ bsw/jbe@19: module = "initiative", bsw/jbe@19: view = "show", bsw/jbe@19: id = initiative.id bsw/jbe@19: } bsw/jbe@19: } } bsw/jbe@19: ui.tag{ tag = "id", content = "initiative_" .. tostring(initiative_id) } bsw/jbe@19: ui.tag{ tag = "updated", content = tostring(initiative.created) } bsw/jbe@19: ui.tag{ tag = "content", content = initiative.current_draft.draft } bsw/jbe@19: end bsw/jbe@19: } bsw/jbe@19: end