liquid_feedback_frontend
annotate app/main/member/_show_thumb.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
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 | 00d1004545f1 |
| rev | line source |
|---|---|
| bsw@10 | 1 local initiator = param.get("initiator", "table") |
| bsw@2 | 2 local member = param.get("member", "table") |
| bsw@2 | 3 |
| bsw@3 | 4 local issue = param.get("issue", "table") |
| bsw@3 | 5 local initiative = param.get("initiative", "table") |
| bsw@3 | 6 local trustee = param.get("trustee", "table") |
| bsw@3 | 7 |
| bsw@2 | 8 local name |
| bsw@2 | 9 if member.name_highlighted then |
| bsw@2 | 10 name = encode.highlight(member.name_highlighted) |
| bsw@2 | 11 else |
| bsw@2 | 12 name = encode.html(member.name) |
| bsw@2 | 13 end |
| bsw@2 | 14 |
| bsw@10 | 15 local container_class = "member_thumb" |
| bsw@10 | 16 if initiator and member.accepted ~= true then |
| bsw@10 | 17 container_class = container_class .. " not_accepted" |
| bsw@10 | 18 end |
| bsw@10 | 19 |
| bsw@3 | 20 ui.container{ |
| bsw@10 | 21 attr = { class = container_class }, |
| bsw@2 | 22 content = function() |
| bsw@3 | 23 ui.container{ |
| bsw@3 | 24 attr = { class = "flags" }, |
| bsw@3 | 25 content = function() |
| bsw/jbe@6 | 26 local weight = 0 |
| bsw/jbe@6 | 27 if member.weight then |
| bsw/jbe@6 | 28 weight = member.weight |
| bsw/jbe@6 | 29 end |
| bsw/jbe@6 | 30 if member.voter_weight then |
| bsw/jbe@6 | 31 weight = member.voter_weight |
| bsw/jbe@6 | 32 end |
| bsw/jbe@6 | 33 if (issue or initiative) and weight > 1 then |
| bsw@3 | 34 local module |
| bsw@3 | 35 if issue then |
| bsw@3 | 36 module = "interest" |
| bsw@3 | 37 elseif initiative then |
| bsw/jbe@6 | 38 if member.voter_weight then |
| bsw/jbe@6 | 39 module = "vote" |
| bsw/jbe@6 | 40 else |
| bsw/jbe@6 | 41 module = "supporter" |
| bsw/jbe@6 | 42 end |
| bsw@3 | 43 end |
| bsw@3 | 44 ui.link{ |
| bsw@3 | 45 attr = { title = _"Number of incoming delegations, follow link to see more details" }, |
| bsw/jbe@6 | 46 content = _("+ #{weight}", { weight = weight - 1 }), |
| bsw@3 | 47 module = module, |
| bsw@3 | 48 view = "show_incoming", |
| bsw@3 | 49 params = { |
| bsw@3 | 50 member_id = member.id, |
| bsw@3 | 51 initiative_id = initiative and initiative.id or nil, |
| bsw@3 | 52 issue_id = issue and issue.id or nil |
| bsw@3 | 53 } |
| bsw@3 | 54 } |
| bsw/jbe@6 | 55 else |
| bsw/jbe@6 | 56 slot.put(" ") |
| bsw/jbe@6 | 57 end |
| bsw@10 | 58 if initiator and initiator.accepted then |
| bsw@10 | 59 if member.accepted == nil then |
| bsw@10 | 60 slot.put(_"Invited") |
| bsw@10 | 61 elseif member.accepted == false then |
| bsw@10 | 62 slot.put(_"Rejected") |
| bsw@10 | 63 end |
| bsw@10 | 64 end |
| bsw/jbe@6 | 65 if member.grade then |
| bsw/jbe@6 | 66 ui.container{ |
| bsw/jbe@6 | 67 content = function() |
| bsw/jbe@6 | 68 if member.grade > 0 then |
| bsw/jbe@6 | 69 ui.image{ |
| bsw/jbe@6 | 70 attr = { |
| bsw/jbe@6 | 71 alt = _"Voted yes", |
| bsw/jbe@6 | 72 title = _"Voted yes" |
| bsw/jbe@6 | 73 }, |
| bsw/jbe@6 | 74 static = "icons/16/thumb_up_green.png" |
| bsw/jbe@6 | 75 } |
| bsw/jbe@6 | 76 elseif member.grade < 0 then |
| bsw/jbe@6 | 77 ui.image{ |
| bsw/jbe@6 | 78 attr = { |
| bsw/jbe@6 | 79 alt = _"Voted no", |
| bsw/jbe@6 | 80 title = _"Voted no" |
| bsw/jbe@6 | 81 }, |
| bsw/jbe@6 | 82 static = "icons/16/thumb_down_red.png" |
| bsw/jbe@6 | 83 } |
| bsw/jbe@6 | 84 else |
| bsw/jbe@6 | 85 ui.image{ |
| bsw/jbe@6 | 86 attr = { |
| bsw/jbe@6 | 87 alt = _"Abstention", |
| bsw/jbe@6 | 88 title = _"Abstention" |
| bsw/jbe@6 | 89 }, |
| bsw/jbe@6 | 90 static = "icons/16/bullet_yellow.png" |
| bsw/jbe@6 | 91 } |
| bsw/jbe@6 | 92 end |
| bsw/jbe@6 | 93 end |
| bsw/jbe@6 | 94 } |
| bsw@3 | 95 end |
| bsw@3 | 96 if member.admin then |
| bsw@3 | 97 ui.image{ |
| bsw@3 | 98 attr = { |
| bsw@3 | 99 alt = _"Member is administrator", |
| bsw@3 | 100 title = _"Member is administrator" |
| bsw@3 | 101 }, |
| bsw@3 | 102 static = "icons/16/cog.png" |
| bsw@3 | 103 } |
| bsw@3 | 104 end |
| bsw@3 | 105 -- TODO performance |
| bsw@3 | 106 local contact = Contact:by_pk(app.session.member.id, member.id) |
| bsw@3 | 107 if contact then |
| bsw@3 | 108 ui.image{ |
| bsw@3 | 109 attr = { |
| bsw@3 | 110 alt = _"You have saved this member as contact", |
| bsw@3 | 111 title = _"You have saved this member as contact" |
| bsw@3 | 112 }, |
| bsw@3 | 113 static = "icons/16/bullet_disk.png" |
| bsw@3 | 114 } |
| bsw@3 | 115 end |
| bsw@3 | 116 end |
| bsw@2 | 117 } |
| bsw/jbe@4 | 118 |
| bsw@3 | 119 ui.link{ |
| bsw@3 | 120 attr = { title = _"Show member" }, |
| bsw@3 | 121 module = "member", |
| bsw@3 | 122 view = "show", |
| bsw@3 | 123 id = member.id, |
| bsw@3 | 124 content = function() |
| bsw/jbe@4 | 125 execute.view{ |
| bsw/jbe@4 | 126 module = "member_image", |
| bsw/jbe@4 | 127 view = "_show", |
| bsw/jbe@4 | 128 params = { |
| bsw/jbe@4 | 129 member = member, |
| bsw/jbe@4 | 130 image_type = "avatar", |
| bsw/jbe@4 | 131 show_dummy = true |
| bsw/jbe@4 | 132 } |
| bsw@3 | 133 } |
| bsw@3 | 134 ui.container{ |
| bsw@3 | 135 attr = { class = "member_name" }, |
| bsw@3 | 136 content = function() |
| bsw@3 | 137 slot.put(name) |
| bsw@3 | 138 end |
| bsw@3 | 139 } |
| bsw@3 | 140 end |
| bsw@3 | 141 } |
| bsw@2 | 142 end |
| bsw@3 | 143 } |