liquid_feedback_frontend
view app/main/member/_list.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 | 768faea1096d |
children | 00d1004545f1 |
line source
1 local members_selector = param.get("members_selector", "table")
2 local initiative = param.get("initiative", "table")
3 local issue = param.get("issue", "table")
4 local trustee = param.get("trustee", "table")
5 local initiator = param.get("initiator", "table")
7 local options = {
8 {
9 name = "newest",
10 label = _"Newest",
11 order_by = "created DESC, id DESC"
12 },
13 {
14 name = "oldest",
15 label = _"Oldest",
16 order_by = "created, id"
17 },
18 {
19 name = "name",
20 label = _"A-Z",
21 order_by = "name"
22 },
23 {
24 name = "name_desc",
25 label = _"Z-A",
26 order_by = "name DESC"
27 },
28 }
30 if initiative then
31 options[#options+1] = {
32 name = "delegations",
33 label = _"Delegations",
34 order_by = "weight DESC"
35 }
36 end
38 ui.order{
39 name = "member_list",
40 selector = members_selector,
41 options = options,
42 content = function()
43 ui.paginate{
44 selector = members_selector,
45 per_page = 100,
46 content = function()
47 ui.container{
48 attr = { class = "member_list" },
49 content = function()
50 local members = members_selector:exec()
51 local columns = {
52 {
53 label = _"Name",
54 content = function(member)
55 ui.link{
56 module = "member",
57 view = "show",
58 id = member.id,
59 content = function()
60 ui.image{
61 attr = { width = 48, height = 48 },
62 module = "member",
63 view = "avatar",
64 id = member.id,
65 extension = "jpg"
66 }
67 end
68 }
69 end
70 },
71 {
72 label = _"Name",
73 content = function(member)
74 ui.link{
75 module = "member",
76 view = "show",
77 id = member.id,
78 content = member.name
79 }
80 if member.admin then
81 ui.image{
82 attr = {
83 alt = _"Administrator",
84 title = _"Administrator"
85 },
86 static = "icons/16/cog.png"
87 }
88 end
89 -- TODO performance
90 local contact = Contact:by_pk(app.session.member.id, member.id)
91 if contact then
92 ui.image{
93 attr = {
94 alt = _"Saved as contact",
95 title = _"Saved as contact"
96 },
97 static = "icons/16/book_edit.png"
98 }
99 end
100 end
101 }
102 }
104 if initiative then
105 columns[#columns+1] = {
106 label = _"Delegations",
107 field_attr = { style = "text-align: right;" },
108 content = function(member)
109 if member.weight > 1 then
110 ui.link{
111 content = member.weight,
112 module = "support",
113 view = "show_incoming",
114 params = { member_id = member.id, initiative_id = initiative.id }
115 }
116 end
117 end
118 }
119 end
121 --[[ ui.list{
122 records = members,
123 columns = columns
124 }
125 --]]
126 ---[[
127 for i, member in ipairs(members) do
128 execute.view{
129 module = "member",
130 view = "_show_thumb",
131 params = {
132 member = member,
133 initiative = initiative,
134 issue = issue,
135 trustee = trustee,
136 initiator = initiator
137 }
138 }
139 end
140 ---]]
141 end
142 }
143 slot.put('<br style="clear: left;" />')
144 if issue then
145 ui.field.timestamp{ label = _"Last snapshot:", value = issue.snapshot }
146 end
147 if initiative then
148 ui.field.timestamp{ label = _"Last snapshot:", value = initiative.issue.snapshot }
149 end
150 end
151 }
152 end
153 }