liquid_feedback_frontend

annotate app/main/initiative/show.lua @ 10:72c5e0ee7c98

Version beta6

Bugfixes:
- Security fix: Every user was able to change the discussion URL of an initiative
- Creation of new issues in areas without default policies is now possible
- Members can now be sorted in different ways
- No error when trying to compare a draft with itself
- Added missing local statement to variable initialization in app/main/delegation/new.lua
- CSS flaw in initiative action bar fixed

New features:
- Possiblity to invite other users to become initiator
- Revokation of initiatives implemented
- Number of suggestions, supporters, etc. is shown on corresponding tabs of initiative view
- Members can now be sorted by account creation (default sorting is "newest first")
- Configuration option to create an automatic discussion link for all issues
- First draft of global timeline feature (not accessible via link yet)
- Custom stylesheet URL for users marked as developers

In area listing the number of closed issues is shown too

Renamed "author" field of initiative to "last author"

Removed wrongly included file app/main/member/_show_thumb.lua.orig in the distribution

Help texts updated
author bsw
date Sun Jan 10 12:00:00 2010 +0100 (2010-01-10)
parents 8d91bccab0bf
children 77d58efe99fd
rev   line source
bsw/jbe@0 1 local initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
bsw/jbe@0 2
bsw/jbe@5 3 slot.select("actions", function()
bsw/jbe@5 4 ui.link{
bsw/jbe@5 5 content = function()
bsw/jbe@5 6 ui.image{ static = "icons/16/script.png" }
bsw/jbe@5 7 slot.put(_"Show all initiatives")
bsw/jbe@5 8 end,
bsw/jbe@5 9 module = "issue",
bsw/jbe@5 10 view = "show",
bsw/jbe@5 11 id = initiative.issue.id
bsw/jbe@5 12 }
bsw/jbe@5 13 end)
bsw/jbe@4 14
bsw/jbe@4 15 execute.view{
bsw/jbe@4 16 module = "issue",
bsw/jbe@4 17 view = "_show_head",
bsw/jbe@4 18 params = { issue = initiative.issue }
bsw/jbe@4 19 }
bsw/jbe@4 20
bsw@10 21 if initiative.revoked then
bsw@10 22 ui.container{
bsw@10 23 attr = { class = "revoked_info" },
bsw@10 24 content = function()
bsw@10 25 slot.put(_("This initiative has been revoked at #{revoked}", { revoked = format.timestamp(initiative.revoked) }))
bsw@10 26 local suggested_initiative = initiative.suggested_initiative
bsw@10 27 if suggested_initiative then
bsw@10 28 slot.put("<br /><br />")
bsw@10 29 slot.put(_("The initiators suggest to support the following initiative:"))
bsw@10 30 slot.put("<br />")
bsw@10 31 ui.link{
bsw@10 32 content = _("Issue ##{id}", { id = suggested_initiative.issue.id } ) .. ": " .. encode.html(suggested_initiative.name),
bsw@10 33 module = "initiative",
bsw@10 34 view = "show",
bsw@10 35 id = suggested_initiative.id
bsw@10 36 }
bsw@10 37 end
bsw@10 38 end
bsw@10 39 }
bsw@10 40 end
bsw@10 41
bsw/jbe@4 42 local initiator = Initiator:by_pk(initiative.id, app.session.member.id)
bsw/jbe@4 43
bsw@3 44 --slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />')
bsw/jbe@0 45
bsw/jbe@0 46
bsw/jbe@0 47 slot.select("actions", function()
bsw/jbe@4 48 if not initiative.issue.fully_frozen and not initiative.issue.closed then
bsw@2 49 ui.link{
bsw@3 50 attr = { class = "action" },
bsw@3 51 content = function()
bsw@3 52 ui.image{ static = "icons/16/script_add.png" }
bsw/jbe@4 53 slot.put(_"Create alternative initiative")
bsw@3 54 end,
bsw@3 55 module = "initiative",
bsw@3 56 view = "new",
bsw@3 57 params = { issue_id = initiative.issue.id }
bsw@3 58 }
bsw@3 59 end
bsw/jbe@4 60 end)
bsw/jbe@4 61
bsw@10 62 slot.put_into("sub_title", encode.html(_"Initiative: '#{name}'":gsub("#{name}", initiative.shortened_name) ))
bsw@10 63
bsw@10 64 slot.select("support", function()
bsw@10 65 ui.container{
bsw@10 66 attr = { class = "actions" },
bsw@10 67 content = function()
bsw@10 68 execute.view{
bsw@10 69 module = "supporter",
bsw@10 70 view = "_show_box",
bsw@10 71 params = { initiative = initiative }
bsw@10 72 }
bsw@10 73 if initiator and initiator.accepted and not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then
bsw@10 74 ui.link{
bsw@10 75 attr = { class = "action", style = "float: left;" },
bsw@10 76 content = function()
bsw@10 77 ui.image{ static = "icons/16/script_delete.png" }
bsw@10 78 slot.put(_"Revoke initiative")
bsw@10 79 end,
bsw@10 80 module = "initiative",
bsw@10 81 view = "revoke",
bsw@10 82 id = initiative.id
bsw@10 83 }
bsw@10 84 end
bsw@10 85 end
bsw@10 86 }
bsw@10 87 end)
bsw/jbe@4 88
bsw/jbe@4 89 util.help("initiative.show")
bsw/jbe@4 90
bsw@10 91 if initiator and initiator.accepted == nil then
bsw@10 92 ui.container{
bsw@10 93 attr = { class = "initiator_invite_info" },
bsw@10 94 content = function()
bsw@10 95 slot.put(_"You are invited to become initiator of this initiative.")
bsw@10 96 slot.put(" ")
bsw@10 97 ui.link{
bsw@10 98 content = function()
bsw@10 99 ui.image{ static = "icons/16/tick.png" }
bsw@10 100 slot.put(_"Accept invitation")
bsw@10 101 end,
bsw@10 102 module = "initiative",
bsw@10 103 action = "accept_invitation",
bsw@10 104 id = initiative.id,
bsw@10 105 routing = {
bsw@10 106 default = {
bsw@10 107 mode = "redirect",
bsw@10 108 module = request.get_module(),
bsw@10 109 view = request.get_view(),
bsw@10 110 id = param.get_id_cgi(),
bsw@10 111 params = param.get_all_cgi()
bsw@10 112 }
bsw@10 113 }
bsw@10 114 }
bsw@10 115 slot.put(" ")
bsw@10 116 ui.link{
bsw@10 117 content = function()
bsw@10 118 ui.image{ static = "icons/16/cross.png" }
bsw@10 119 slot.put(_"Refuse invitation")
bsw@10 120 end,
bsw@10 121 module = "initiative",
bsw@10 122 action = "reject_initiator_invitation",
bsw@10 123 params = {
bsw@10 124 initiative_id = initiative.id,
bsw@10 125 member_id = app.session.member.id
bsw@10 126 },
bsw@10 127 routing = {
bsw@10 128 default = {
bsw@10 129 mode = "redirect",
bsw@10 130 module = request.get_module(),
bsw@10 131 view = request.get_view(),
bsw@10 132 id = param.get_id_cgi(),
bsw@10 133 params = param.get_all_cgi()
bsw@10 134 }
bsw@10 135 }
bsw@10 136 }
bsw@10 137 end
bsw@10 138 }
bsw@10 139 slot.put("<br />")
bsw@10 140 end
bsw/jbe@4 141
bsw@10 142 if (initiative.discussion_url and #initiative.discussion_url > 0)
bsw@10 143 or (initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked) then
bsw@10 144 ui.container{
bsw@10 145 attr = { class = "vertical" },
bsw@10 146 content = function()
bsw@10 147 ui.container{
bsw@10 148 attr = { class = "ui_field_label" },
bsw@10 149 content = _"Discussion with initiators"
bsw@10 150 }
bsw@10 151 ui.tag{
bsw@10 152 tag = "span",
bsw@10 153 content = function()
bsw@10 154 if initiative.discussion_url and #initiative.discussion_url > 0 then
bsw@10 155 ui.link{
bsw@10 156 attr = {
bsw@10 157 class = "actions",
bsw@10 158 target = "_blank",
bsw@10 159 title = initiative.discussion_url
bsw@10 160 },
bsw@10 161 content = function()
bsw@10 162 slot.put(encode.html(initiative.discussion_url))
bsw@10 163 end,
bsw@10 164 external = initiative.discussion_url
bsw@10 165 }
bsw@10 166 end
bsw@10 167 slot.put(" ")
bsw@10 168 if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then
bsw@10 169 ui.link{
bsw@10 170 attr = { class = "actions" },
bsw@10 171 content = _"(change URL)",
bsw@10 172 module = "initiative",
bsw@10 173 view = "edit",
bsw@10 174 id = initiative.id
bsw@10 175 }
bsw@10 176 end
bsw/jbe@4 177 end
bsw@10 178 }
bsw@10 179 end
bsw@10 180 }
bsw@10 181 end
bsw/jbe@0 182
bsw/jbe@0 183
bsw/jbe@0 184 ui.container{
bsw/jbe@0 185 attr = { id = "add_suggestion_form", class = "hidden_inline_form" },
bsw/jbe@0 186 content = function()
bsw/jbe@0 187
bsw/jbe@0 188 ui.link{
bsw/jbe@0 189 content = _"Close",
bsw/jbe@0 190 attr = {
bsw/jbe@0 191 onclick = "document.getElementById('add_suggestion_form').style.display='none';return(false)",
bsw/jbe@0 192 style = "float: right;"
bsw/jbe@0 193 }
bsw/jbe@0 194 }
bsw/jbe@0 195
bsw/jbe@0 196 ui.field.text{ attr = { class = "head" }, value = _"Add new suggestion" }
bsw/jbe@0 197
bsw/jbe@0 198
bsw/jbe@0 199 ui.form{
bsw/jbe@0 200 module = "suggestion",
bsw/jbe@0 201 action = "add",
bsw/jbe@0 202 params = { initiative_id = initiative.id },
bsw/jbe@0 203 routing = {
bsw/jbe@0 204 default = {
bsw/jbe@0 205 mode = "redirect",
bsw/jbe@0 206 module = "initiative",
bsw/jbe@0 207 view = "show",
bsw/jbe@0 208 id = initiative.id,
bsw/jbe@0 209 params = { tab = "suggestion" }
bsw/jbe@0 210 }
bsw/jbe@0 211 },
bsw/jbe@0 212 attr = { class = "vertical" },
bsw/jbe@0 213 content = function()
bsw/jbe@4 214 local supported = Supporter:by_pk(initiative.id, app.session.member.id) and true or false
bsw/jbe@4 215 if not supported then
bsw/jbe@4 216 ui.field.text{
bsw/jbe@4 217 attr = { class = "warning" },
bsw/jbe@4 218 value = _"You are currently not supporting this initiative. By adding suggestions to this initiative you will automatically become a potential supporter."
bsw/jbe@4 219 }
bsw/jbe@4 220 end
bsw/jbe@4 221 ui.field.text{ label = _"Title (80 chars max)", name = "name" }
bsw/jbe@0 222 ui.field.text{ label = _"Description", name = "description", multiline = true }
bsw/jbe@0 223 ui.field.select{
bsw/jbe@0 224 label = _"Degree",
bsw/jbe@0 225 name = "degree",
bsw/jbe@0 226 foreign_records = {
bsw/jbe@0 227 { id = 1, name = _"should"},
bsw/jbe@0 228 { id = 2, name = _"must"},
bsw/jbe@0 229 },
bsw/jbe@0 230 foreign_id = "id",
bsw/jbe@0 231 foreign_name = "name"
bsw/jbe@0 232 }
bsw/jbe@0 233 ui.submit{ text = _"Commit suggestion" }
bsw/jbe@0 234 end
bsw/jbe@0 235 }
bsw/jbe@0 236 end
bsw/jbe@0 237 }
bsw/jbe@0 238
bsw@2 239 local supporter = app.session.member:get_reference_selector("supporters")
bsw@2 240 :add_where{ "initiative_id = ?", initiative.id }
bsw@2 241 :optional_object_mode()
bsw@2 242 :exec()
bsw@2 243
bsw@2 244 if supporter then
bsw@2 245 local old_draft_id = supporter.draft_id
bsw@2 246 local new_draft_id = initiative.current_draft.id
bsw@2 247 if old_draft_id ~= new_draft_id then
bsw@2 248 ui.container{
bsw@2 249 attr = { class = "draft_updated_info" },
bsw@2 250 content = function()
bsw@2 251 slot.put("The draft of this initiative has been updated!")
bsw@2 252 slot.put(" ")
bsw@2 253 ui.link{
bsw@2 254 content = _"Show diff",
bsw@2 255 module = "draft",
bsw@2 256 view = "diff",
bsw@2 257 params = {
bsw@2 258 old_draft_id = old_draft_id,
bsw@2 259 new_draft_id = new_draft_id
bsw@2 260 }
bsw@2 261 }
bsw@2 262 slot.put(" ")
bsw@2 263 ui.link{
bsw@2 264 content = _"Refresh support to current draft",
bsw@2 265 module = "initiative",
bsw@2 266 action = "add_support",
bsw@2 267 id = initiative.id,
bsw@2 268 routing = {
bsw@2 269 default = {
bsw@2 270 mode = "redirect",
bsw@2 271 module = "initiative",
bsw@2 272 view = "show",
bsw@2 273 id = initiative.id
bsw@2 274 }
bsw@2 275 }
bsw@2 276 }
bsw@2 277 end
bsw@2 278 }
bsw@2 279 end
bsw@2 280 end
bsw/jbe@0 281
bsw/jbe@4 282
bsw/jbe@6 283 local current_draft_name = _"Current draft"
bsw/jbe@6 284 if initiative.issue.half_frozen then
bsw/jbe@6 285 current_draft_name = _"Voting proposal"
bsw/jbe@6 286 end
bsw/jbe@6 287
bsw/jbe@6 288 if initiative.issue.state == "finished" then
bsw/jbe@6 289 current_draft_name = _"Voted proposal"
bsw/jbe@6 290 end
bsw/jbe@6 291
bsw/jbe@6 292 local tabs = {
bsw/jbe@0 293 {
bsw/jbe@0 294 name = "current_draft",
bsw/jbe@6 295 label = current_draft_name,
bsw/jbe@0 296 content = function()
bsw@10 297 if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then
bsw/jbe@4 298 ui.link{
bsw/jbe@4 299 content = function()
bsw/jbe@4 300 ui.image{ static = "icons/16/script_add.png" }
bsw/jbe@4 301 slot.put(_"Edit draft")
bsw/jbe@4 302 end,
bsw/jbe@4 303 module = "draft",
bsw/jbe@4 304 view = "new",
bsw/jbe@4 305 params = { initiative_id = initiative.id }
bsw/jbe@4 306 }
bsw/jbe@4 307 end
bsw/jbe@0 308 execute.view{ module = "draft", view = "_show", params = { draft = initiative.current_draft } }
bsw/jbe@0 309 end
bsw/jbe@6 310 }
bsw/jbe@6 311 }
bsw/jbe@6 312
bsw/jbe@6 313 if initiative.issue.ranks_available then
bsw/jbe@6 314 tabs[#tabs+1] = {
bsw/jbe@6 315 name = "voter",
bsw/jbe@6 316 label = _"Voter",
bsw/jbe@0 317 content = function()
bsw@3 318 execute.view{
bsw@3 319 module = "member",
bsw@3 320 view = "_list",
bsw@3 321 params = {
bsw@3 322 initiative = initiative,
bsw/jbe@6 323 members_selector = initiative.issue:get_reference_selector("direct_voters")
bsw/jbe@6 324 :left_join("vote", nil, { "vote.initiative_id = ? AND vote.member_id = member.id", initiative.id })
bsw/jbe@6 325 :add_field("direct_voter.weight as voter_weight")
bsw/jbe@6 326 :add_field("coalesce(vote.grade, 0) as grade")
bsw@3 327 }
bsw@3 328 }
bsw/jbe@0 329 end
bsw/jbe@6 330 }
bsw/jbe@6 331 end
bsw/jbe@6 332
bsw@10 333 local suggestion_count = initiative:get_reference_selector("suggestions"):count()
bsw@10 334
bsw/jbe@6 335 tabs[#tabs+1] = {
bsw/jbe@6 336 name = "suggestion",
bsw@10 337 label = _"Suggestions" .. " (" .. tostring(suggestion_count) .. ")",
bsw/jbe@6 338 content = function()
bsw/jbe@6 339 execute.view{
bsw/jbe@6 340 module = "suggestion",
bsw/jbe@6 341 view = "_list",
bsw/jbe@6 342 params = {
bsw/jbe@6 343 initiative = initiative,
bsw/jbe@6 344 suggestions_selector = initiative:get_reference_selector("suggestions")
bsw/jbe@6 345 }
bsw/jbe@6 346 }
bsw/jbe@6 347 slot.put("<br />")
bsw@10 348 if not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then
bsw/jbe@6 349 ui.link{
bsw@2 350 content = function()
bsw/jbe@6 351 ui.image{ static = "icons/16/comment_add.png" }
bsw/jbe@6 352 slot.put(_"Add new suggestion")
bsw/jbe@6 353 end,
bsw/jbe@6 354 attr = { onclick = "document.getElementById('add_suggestion_form').style.display='block';return(false)" },
bsw/jbe@6 355 static = "#"
bsw@2 356 }
bsw@2 357 end
bsw/jbe@6 358 end
bsw/jbe@6 359 }
bsw/jbe@6 360
bsw@10 361 local members_selector = initiative:get_reference_selector("supporting_members_snapshot")
bsw@10 362 :join("issue", nil, "issue.id = direct_supporter_snapshot.issue_id")
bsw@10 363 :join("direct_interest_snapshot", nil, "direct_interest_snapshot.event = issue.latest_snapshot_event AND direct_interest_snapshot.issue_id = issue.id AND direct_interest_snapshot.member_id = member.id")
bsw@10 364 :add_field("direct_interest_snapshot.weight")
bsw@10 365 :add_where("direct_supporter_snapshot.event = issue.latest_snapshot_event")
bsw@10 366 :add_where("direct_supporter_snapshot.satisfied")
bsw@10 367
bsw@10 368 local satisfied_supporter_count = members_selector:count()
bsw@10 369
bsw/jbe@6 370 tabs[#tabs+1] = {
bsw/jbe@6 371 name = "satisfied_supporter",
bsw@10 372 label = _"Supporter" .. " (" .. tostring(satisfied_supporter_count) .. ")",
bsw@10 373 content = function()
bsw@10 374 execute.view{
bsw@10 375 module = "member",
bsw@10 376 view = "_list",
bsw@10 377 params = {
bsw@10 378 initiative = initiative,
bsw@10 379 members_selector = members_selector
bsw@10 380 }
bsw@10 381 }
bsw@10 382 end
bsw@10 383 }
bsw@10 384
bsw@10 385 local members_selector = initiative:get_reference_selector("supporting_members_snapshot")
bsw@10 386 :join("issue", nil, "issue.id = direct_supporter_snapshot.issue_id")
bsw@10 387 :join("direct_interest_snapshot", nil, "direct_interest_snapshot.event = issue.latest_snapshot_event AND direct_interest_snapshot.issue_id = issue.id AND direct_interest_snapshot.member_id = member.id")
bsw@10 388 :add_field("direct_interest_snapshot.weight")
bsw@10 389 :add_where("direct_supporter_snapshot.event = issue.latest_snapshot_event")
bsw@10 390 :add_where("NOT direct_supporter_snapshot.satisfied")
bsw@10 391
bsw@10 392 local potential_supporter_count = members_selector:count()
bsw@10 393
bsw@10 394 tabs[#tabs+1] = {
bsw@10 395 name = "supporter",
bsw@10 396 label = _"Potential supporter" .. " (" .. tostring(potential_supporter_count) .. ")",
bsw/jbe@6 397 content = function()
bsw/jbe@6 398 execute.view{
bsw/jbe@6 399 module = "member",
bsw/jbe@6 400 view = "_list",
bsw/jbe@6 401 params = {
bsw/jbe@6 402 initiative = initiative,
bsw@10 403 members_selector = members_selector
bsw/jbe@6 404 }
bsw/jbe@6 405 }
bsw/jbe@6 406 end
bsw/jbe@6 407 }
bsw/jbe@6 408
bsw@10 409 local initiator_count = initiative:get_reference_selector("initiators"):add_where("accepted"):count()
bsw@10 410
bsw/jbe@6 411 tabs[#tabs+1] = {
bsw@10 412 name = "initiators",
bsw@10 413 label = _"Initiators" .. " (" .. tostring(initiator_count) .. ")",
bsw/jbe@6 414 content = function()
bsw@10 415 if initiator and initiator.accepted and not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then
bsw@10 416 ui.link{
bsw@10 417 attr = { class = "action" },
bsw@10 418 content = function()
bsw@10 419 ui.image{ static = "icons/16/user_add.png" }
bsw@10 420 slot.put(_"Invite initiator")
bsw@10 421 end,
bsw@10 422 module = "initiative",
bsw@10 423 view = "add_initiator",
bsw@10 424 params = { initiative_id = initiative.id }
bsw@10 425 }
bsw@10 426 if initiator_count > 1 then
bsw@10 427 ui.link{
bsw@10 428 content = function()
bsw@10 429 ui.image{ static = "icons/16/user_delete.png" }
bsw@10 430 slot.put(_"Remove initiator")
bsw@10 431 end,
bsw@10 432 module = "initiative",
bsw@10 433 view = "remove_initiator",
bsw@10 434 params = { initiative_id = initiative.id }
bsw@10 435 }
bsw@10 436 end
bsw@10 437 end
bsw@10 438 if initiator and initiator.accepted == false then
bsw@10 439 ui.link{
bsw@10 440 content = function()
bsw@10 441 ui.image{ static = "icons/16/user_delete.png" }
bsw@10 442 slot.put(_"Cancel refuse of invitation")
bsw@10 443 end,
bsw@10 444 module = "initiative",
bsw@10 445 action = "remove_initiator",
bsw@10 446 params = {
bsw@10 447 initiative_id = initiative.id,
bsw@10 448 member_id = app.session.member.id
bsw@10 449 },
bsw@10 450 routing = {
bsw@10 451 ok = {
bsw@10 452 mode = "redirect",
bsw@10 453 module = "initiative",
bsw@10 454 view = "show",
bsw@10 455 id = initiative.id
bsw@10 456 }
bsw@10 457 }
bsw@10 458 }
bsw@10 459 end
bsw@10 460 local members_selector = initiative:get_reference_selector("initiating_members")
bsw@10 461 :add_field("initiator.accepted", "accepted")
bsw@10 462 if not (initiator and initiator.accepted) then
bsw@10 463 members_selector:add_where("accepted")
bsw@10 464 end
bsw/jbe@6 465 execute.view{
bsw/jbe@6 466 module = "member",
bsw/jbe@6 467 view = "_list",
bsw/jbe@6 468 params = {
bsw@10 469 members_selector = members_selector,
bsw@10 470 initiator = initiator
bsw/jbe@6 471 }
bsw/jbe@6 472 }
bsw/jbe@6 473 end
bsw/jbe@6 474 }
bsw/jbe@6 475
bsw@10 476 local drafts_count = initiative:get_reference_selector("drafts"):count()
bsw/jbe@6 477
bsw/jbe@6 478 tabs[#tabs+1] = {
bsw/jbe@6 479 name = "drafts",
bsw@10 480 label = _"Draft history" .. " (" .. tostring(drafts_count) .. ")",
bsw/jbe@6 481 content = function()
bsw/jbe@6 482 execute.view{ module = "draft", view = "_list", params = { drafts = initiative.drafts } }
bsw/jbe@6 483 end
bsw/jbe@6 484 }
bsw/jbe@6 485
bsw/jbe@6 486 tabs[#tabs+1] = {
bsw/jbe@6 487 name = "details",
bsw/jbe@6 488 label = _"Details",
bsw/jbe@6 489 content = function()
bsw/jbe@6 490 ui.form{
bsw/jbe@6 491 attr = { class = "vertical" },
bsw/jbe@6 492 record = initiative,
bsw/jbe@6 493 readonly = true,
bsw/jbe@6 494 content = function()
bsw/jbe@6 495 ui.field.text{ label = _"Issue policy", value = initiative.issue.policy.name }
bsw/jbe@6 496 ui.field.text{
bsw/jbe@6 497 label = _"Created at",
bsw/jbe@6 498 value = tostring(initiative.created)
bsw/jbe@6 499 }
bsw/jbe@6 500 ui.field.text{
bsw/jbe@6 501 label = _"Created at",
bsw/jbe@6 502 value = format.timestamp(initiative.created)
bsw/jbe@6 503 }
bsw@10 504 -- ui.field.date{ label = _"Revoked at", name = "revoked" }
bsw/jbe@6 505 ui.field.boolean{ label = _"Admitted", name = "admitted" }
bsw/jbe@6 506 end
bsw/jbe@6 507 }
bsw/jbe@6 508 end
bsw/jbe@0 509 }
bsw/jbe@0 510
bsw/jbe@0 511
bsw/jbe@6 512 ui.tabs(tabs)
bsw/jbe@6 513

Impressum / About Us