liquid_feedback_frontend

changeset 606:c4b878748205

Fixed errors in search
author bsw
date Sun Jun 24 23:16:15 2012 +0200 (2012-06-24)
parents 42afe0765f86
children 6f4ee6090ff5
files app/main/index/search.lua app/main/member/_show_thumb.lua model/issue.lua
line diff
     1.1 --- a/app/main/index/search.lua	Sun Jun 24 23:08:24 2012 +0200
     1.2 +++ b/app/main/index/search.lua	Sun Jun 24 23:16:15 2012 +0200
     1.3 @@ -21,8 +21,7 @@
     1.4        foreign_records = {
     1.5          { id = "global", name = _"Global search" },
     1.6          { id = "member", name = _"Search for members" },
     1.7 -        { id = "issue", name = _"Search for issues" },
     1.8 -        { id = "initiative", name = _"Search for initiatives" },
     1.9 +        { id = "issue", name = _"Search for issues" }
    1.10        },
    1.11        foreign_id = "id",
    1.12        foreign_name = "name",
    1.13 @@ -45,16 +44,7 @@
    1.14      }
    1.15    end
    1.16  
    1.17 -  if search_for == "global" or search_for == "initiative" then
    1.18 -    local initiatives_selector = Initiative:get_search_selector(search_string)
    1.19 -    execute.view{
    1.20 -      module = "initiative",
    1.21 -      view = "_list",
    1.22 -      params = { initiatives_selector = initiatives_selector },
    1.23 -    }
    1.24 -  end
    1.25 -
    1.26 -  if search_for == "issue" then
    1.27 +  if search_for == "global" or search_for == "issue" then
    1.28      local issues_selector = Issue:get_search_selector(search_string)
    1.29      execute.view{
    1.30        module = "issue",
     2.1 --- a/app/main/member/_show_thumb.lua	Sun Jun 24 23:08:24 2012 +0200
     2.2 +++ b/app/main/member/_show_thumb.lua	Sun Jun 24 23:16:15 2012 +0200
     2.3 @@ -5,11 +5,11 @@
     2.4  local initiative = param.get("initiative", "table")
     2.5  local trustee = param.get("trustee", "table")
     2.6  
     2.7 -local name
     2.8 +local name_html
     2.9  if member.name_highlighted then
    2.10 -  name = encode.highlight(member.name_highlighted)
    2.11 +  name_html = encode.highlight(member.name_highlighted)
    2.12  else
    2.13 -  name = encode.html(member.name)
    2.14 +  name_html = encode.html(member.name)
    2.15  end
    2.16  
    2.17  local container_class = "member_thumb"
    2.18 @@ -171,7 +171,7 @@
    2.19          }
    2.20          ui.container{
    2.21            attr = { class = "member_name" },
    2.22 -          content = name
    2.23 +          content = function() slot.put(name_html) end
    2.24          }
    2.25        end
    2.26      }
     3.1 --- a/model/issue.lua	Sun Jun 24 23:08:24 2012 +0200
     3.2 +++ b/model/issue.lua	Sun Jun 24 23:16:15 2012 +0200
     3.3 @@ -215,8 +215,6 @@
     3.4      :add_group_by('"issue"."discussion_time"')
     3.5      :add_group_by('"issue"."verification_time"')
     3.6      :add_group_by('"issue"."voting_time"')
     3.7 -    :add_group_by('"_interest"."member_id"')
     3.8 -    :add_group_by("_delegating_interest.delegate_member_ids")
     3.9      --:set_distinct()
    3.10  end
    3.11  

Impressum / About Us