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