Mercurial > hg > soundsoftware-site
changeset 773:c761e467a390 feature_14
getter and setter functions for the session variables holding the collapsible fieldsets statuses.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 16 Nov 2011 17:37:58 +0000 |
parents | c4f8106ce808 |
children | a7cb76a52ec0 |
files | vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb |
diffstat | 1 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 {