# HG changeset patch # User luisf # Date 1321465078 0 # Node ID c761e467a39063c9adb7fde7b56be92184cd8f77 # Parent c4f8106ce808af26411e4e5d69c52fee8c9e7196 getter and setter functions for the session variables holding the collapsible fieldsets statuses. diff -r c4f8106ce808 -r c761e467a390 vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb --- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Wed Nov 16 14:50:17 2011 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Wed Nov 16 17:37:58 2011 +0000 @@ -40,14 +40,31 @@ @offset ||= @project_pages.current.offset end + def set_fieldset_status(field, status) + session[(field + "_status").to_sym] = status + end + + # gets the status of the collabsible fieldsets + def get_fieldset_statuses + if session[:filter_status].nil? + @filter_status = session[:filter_status] + else + @filter_status = false + end + + if session[:myproj_status].nil? + @myproj_status = session[:myproj_status] + else + @myproj_status = true + end + end # Lists visible projects. Paginator is for top-level projects only # (subprojects belong to them) def filtered_index @project = Project.new filter_projects - - debugger + get_fieldset_statuses respond_to do |format| format.html {