# HG changeset patch # User bsw/jbe # Date 1266700231 -3600 # Node ID 00d1004545f16a2b74dfd8fb6d5a448c4e1456e8 # Parent fc9e748660c80a6934b66252c04661594139ce05 Dynamic interface using XMLHttpRequests, and many other changes Bugfixes: - Only allow voting on admitted initiatives - Repaired issue search - Don't display delegations for closed issues on member page - Don't show revoke link in initiative, when issue is already half_frozen - Localization for voting JavaScript - Display author of suggestions Disclosure of voting data after voting is finished: - Possibility to inspect every ballot including preferences - Show number of voters preferring one initiative to another initiative Interface behaviour changes: - Reversed default order of drafts - Default order of suggestions changed - Show new drafts of initiatives only once per day in timeline Accessibility: - Barrier-free voting implemented - POST links are now accessible without JavaScript - Changed gray for unsatisfied supporters in bar graph to a lighter gray Other interface improvements: - Optical enhancements - Dynamic interface using XMLHttpRequests - Show usage terms in about section - Show own membership in area listing - Show uninformed supporters greyed out and marked with yellow question mark - Warning box in non-admitted initiatives - When voted, don't display voting notice and change label of voting link - Show object counts in more tabulator heads - Enlarged member statement input field Miscellaneous: - Code cleanup - Added README file containing installation instructions - Use new WebMCP function ui.filters{...} instead of own ui.filter and ui.order functions diff -r fc9e748660c8 -r 00d1004545f1 Makefile --- a/Makefile Tue Feb 02 00:31:06 2010 +0100 +++ b/Makefile Sat Feb 20 22:10:31 2010 +0100 @@ -1,14 +1,6 @@ default: -db: - create_db liquid_feedback - psql liquid_feedback -f db/core.sql - -demo-db: db - psql liquid_feedback -f db/demo.sql - - translations-de: cd ../webmcp/framework/bin/ && ./langtool.lua ~/workspace/liquid_feedback/locale/translations.de.lua ~/workspace/liquid_feedback/app ~/workspace/liquid_feedback/locale/translations.de.lua diff -r fc9e748660c8 -r 00d1004545f1 README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Sat Feb 20 22:10:31 2010 +0100 @@ -0,0 +1,61 @@ + +################ +# Installation # +################ + + +1. Choose a directory where to install the software, e.g. /opt : + +$ cd /opt + + +2. Get the repositories of the core, the frondend and the web application + framework WebMCP: + +$ hg clone http://www.public-software-group.org/mercurial/liquid_feedback_core +$ hg clone http://www.public-software-group.org/mercurial/liquid_feedback_frontend +$ hg clone http://www.public-software-group.org/mercurial/webmcp + + +3. Install LiquidFeedback Core: + +$ cd /opt/liquid_feedback_core +$ make +$ createdb liquid_feedback +$ psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback + +You should initiatize your database using the command +"psql liquid_feedback" and the examples shown in file "init.sql". + + +4. Compile WebMCP + +$ cd /opt/webmcp +$ make + +If you experience trouble during compilation, you might want to edit the +file "Makefile.options" (i.e. to add -fPIC to compiler options) and then +retry: + +$ vi Makefile.options +$ make clean +$ make + + +5. Install Wiki-to-HTML converters + +Download latest LiquidFeedback Edition of RocketWiki from +http://www.public-software-group.org/pub/projects/rocketwiki/liquid_feedback_edition/ + +Compile the binaries by calling make, and copy them to a place of your +choice, e.g. /opt/rocketwiki-lqfb/ + + +6. Configure the webserver and the LiquidFeedback Frontend application: + +Edit the configuration files in /opt/liquid_feedback_frontend/config/ + +Use /opt/webmcp/doc/lighttpd.example.conf (or apache.sample.conf) to setup +your webserver appropriatly. + + diff -r fc9e748660c8 -r 00d1004545f1 app/main/_filter_view/30_navigation.lua --- a/app/main/_filter_view/30_navigation.lua Tue Feb 02 00:31:06 2010 +0100 +++ b/app/main/_filter_view/30_navigation.lua Sat Feb 20 22:10:31 2010 +0100 @@ -4,36 +4,28 @@ if app.session.member == nil then slot.select('navigation', function() ui.link{ - content = function() - ui.image{ static = "icons/16/key.png" } - slot.put(_"Login") - end, + image = { static = "icons/16/key.png" }, + text = _"Login", module = 'index', - view = 'login' + view = 'login' } ui.link{ - content = function() - ui.image{ static = "icons/16/book_edit.png" } - slot.put(_"Registration") - end, + image = { static = "icons/16/book_edit.png" }, + text = _"Registration", module = 'index', - view = 'register' + view = 'register' } ui.link{ - content = function() - ui.image{ static = "icons/16/key_forgot.png" } - slot.put(_"Reset password") - end, + image = { static = "icons/16/key_forgot.png" }, + text = _"Reset password", module = 'index', - view = 'reset_password' + view = 'reset_password' } ui.link{ - content = function() - ui.image{ static = "icons/16/information.png" } - slot.put('About / Impressum') - end, + image = { static = "icons/16/information.png" }, + text = _"About / Impressum", module = 'index', - view = 'about' + view = 'about' } end) execute.inner() @@ -43,75 +35,46 @@ slot.select('navigation', function() ui.link{ - content = function() - ui.image{ static = "icons/16/house.png" } - slot.put(_"Home") - end, + image = { static = "icons/16/house.png" }, + text = _"Home", module = 'index', - view = 'index' + view = 'index' } - local setting_key = "liquidfeedback_frontend_timeline_current_options" - local setting = Setting:by_pk(app.session.member.id, setting_key) - - timeline_params = {} - if setting then - for event_ident, filter_idents in setting.value:gmatch("(%S+):(%S+)") do - timeline_params["option_" .. event_ident] = true - if filter_idents ~= "*" then - for filter_ident in filter_idents:gmatch("([^\|]+)") do - timeline_params["option_" .. event_ident .. "_" .. filter_ident] = true - end - end - end - end - - timeline_params.date = param.get("date") or today - ui.link{ - content = function() - ui.image{ static = "icons/16/time.png" } - slot.put(_"Timeline") - end, + image = { static = "icons/16/time.png" }, + text = _"Timeline", module = "timeline", - action = "update" --- params = timeline_params + view = "index" } ui.link{ - content = function() - ui.image{ static = "icons/16/package.png" } - slot.put(_"Areas") - end, + image = { static = "icons/16/package.png" }, + text = _"Areas", module = 'area', - view = 'list' + view = 'list' } ui.link{ - content = function() - ui.image{ static = "icons/16/group.png" } - slot.put(_"Members") - end, + image = { static = "icons/16/group.png" }, + text = _"Members", module = 'member', - view = 'list' + view = 'list', + params = { member_list = "newest" } } ui.link{ - content = function() - ui.image{ static = "icons/16/book_edit.png" } - slot.put(_"Contacts") - end, + image = { static = "icons/16/book_edit.png" }, + text = _"Contacts", module = 'contact', - view = 'list' + view = 'list' } ui.link{ - content = function() - ui.image{ static = "icons/16/information.png" } - slot.put(_"About") - end, + image = { static = "icons/16/information.png" }, + text = _"About", module = 'index', - view = 'about' + view = 'about' } if app.session.member.admin then @@ -119,13 +82,11 @@ slot.put(" ") ui.link{ - attr = { class = { "admin_only" } }, - content = function() - ui.image{ static = "icons/16/cog.png" } - slot.put(_'Admin') - end, + attr = { class = { "admin_only" } }, + image = { static = "icons/16/cog.png" }, + text = _"Admin", module = 'admin', - view = 'index' + view = 'index' } end @@ -139,5 +100,3 @@ end execute.inner() - - diff -r fc9e748660c8 -r 00d1004545f1 app/main/_filter_view/31_logout_button.lua --- a/app/main/_filter_view/31_logout_button.lua Tue Feb 02 00:31:06 2010 +0100 +++ b/app/main/_filter_view/31_logout_button.lua Sat Feb 20 22:10:31 2010 +0100 @@ -5,10 +5,8 @@ slot.select('logout_button', function() ui.link{ - content = function() - ui.image{ static = "icons/16/stop.png" } - slot.put(_'Logout') - end, + image = { static = "icons/16/stop.png" }, + text = _"Logout", module = 'index', action = 'logout' } diff -r fc9e748660c8 -r 00d1004545f1 app/main/_filter_view/33_help_hidden.lua --- a/app/main/_filter_view/33_help_hidden.lua Tue Feb 02 00:31:06 2010 +0100 +++ b/app/main/_filter_view/33_help_hidden.lua Sat Feb 20 22:10:31 2010 +0100 @@ -28,9 +28,9 @@ attr = { class = "help_icon" }, static = "icons/16/help.png" } - end + end, + text = _"Show help text" } end end) end - diff -r fc9e748660c8 -r 00d1004545f1 app/main/_filter_view/34_stylesheet.lua --- a/app/main/_filter_view/34_stylesheet.lua Tue Feb 02 00:31:06 2010 +0100 +++ b/app/main/_filter_view/34_stylesheet.lua Sat Feb 20 22:10:31 2010 +0100 @@ -11,4 +11,40 @@ slot.put_into("stylesheet_url", config.absolute_base_url .. "static/style.css") end -execute.inner() \ No newline at end of file +if os.getenv("HTTP_USER_AGENT"):find("Android.*AppleWebKit.*Mobile Safari") then + slot.select("html_head", function() + ui.tag{ + tag = "style", + content = "body, td, th { font-size: 16px; };" + } + end) +end + +if app.session.member then + local tab_mode = app.session.member:get_setting_value("tab_mode") + if tab_mode then + config.user_tab_mode = tab_mode + end +end + +local web20 = config.user_tab_mode == "accordeon" + or config.user_tab_mode == "accordeon_first_expanded" + or config.user_tab_mode == "accordeon_all_expanded" + +if web20 then + ui.enable_partial_loading() +end + +if request.get_json_request_slots() then + slot.set_layout("blank") +end + + +ui.container{ + attr = { + class = web20 and "web20" or "web10" + }, + content = function() + execute.inner() + end +} \ No newline at end of file diff -r fc9e748660c8 -r 00d1004545f1 app/main/_layout/atom.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/main/_layout/atom.html Sat Feb 20 22:10:31 2010 +0100 @@ -0,0 +1,12 @@ + + + + + foo + + LiquidFeedback + Initiatives + urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6 + 2003-12-14T10:20:09Z + + diff -r fc9e748660c8 -r 00d1004545f1 app/main/_layout/blank.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/main/_layout/blank.html Sat Feb 20 22:10:31 2010 +0100 @@ -0,0 +1,1 @@ + \ No newline at end of file diff -r fc9e748660c8 -r 00d1004545f1 app/main/_layout/default.html --- a/app/main/_layout/default.html Tue Feb 02 00:31:06 2010 +0100 +++ b/app/main/_layout/default.html Sat Feb 20 22:10:31 2010 +0100 @@ -6,6 +6,8 @@ + +
@@ -67,7 +69,9 @@
TRACE