From 74aea714a5ae150c47e7e41f214c52813ce2c363 Mon Sep 17 00:00:00 2001 From: "P. Mark Anderson" Date: Sat, 3 Dec 2011 17:55:25 -0800 Subject: [PATCH] Added tag field to event filter UI. It's populated with all tags. Still need to repopulate that field after executing the search. Oh, and the tag_search param needs to be worked into the search. --- app/controllers/events_controller.rb | 3 +++ themes/activate/views/events/index.html.erb | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index ac57a304d..248090eb6 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -8,6 +8,9 @@ class EventsController < ApplicationController def index @start_date = date_or_default_for(:start) @end_date = date_or_default_for(:end) + @tag_search = params[:tag_search] + + # TODO: Include tag_search in this query: query = Event.non_duplicates.ordered_by_ui_field(params[:order]).includes(:venue, :tags) @events = params[:date] ? diff --git a/themes/activate/views/events/index.html.erb b/themes/activate/views/events/index.html.erb index f284e9ef6..10f36221b 100644 --- a/themes/activate/views/events/index.html.erb +++ b/themes/activate/views/events/index.html.erb @@ -22,12 +22,19 @@ <%= text_field_tag 'date[end]', @end_date.strftime('%Y-%m-%d'), :id => 'date_end', :class => 'date_picker' %> -
- - <%= submit_tag 'Filter' %> - <%= link_to 'Reset', events_url %> -
- + + +
+
+ + <%= submit_tag 'Filter' %> + <%= link_to 'Reset', events_url %> +
<% end %>

Subscribe to