From 2095f4014600765e38aff0299262118461be2f6e Mon Sep 17 00:00:00 2001 From: rkv Date: Wed, 30 Jan 2013 12:51:54 +0000 Subject: [PATCH] Fix for mantis #0022066: Search form not conform to specifications (SC03): The "I'm involved in, Public, Either" radio button should be removed. --- .../Siman/WebContent/study/searchStudy.jsp | 24 ---------- .../org/splat/simer/SearchStudyAction.java | 48 +++---------------- 2 files changed, 7 insertions(+), 65 deletions(-) diff --git a/Workspace/Siman/WebContent/study/searchStudy.jsp b/Workspace/Siman/WebContent/study/searchStudy.jsp index f62b825..7ba827c 100644 --- a/Workspace/Siman/WebContent/study/searchStudy.jsp +++ b/Workspace/Siman/WebContent/study/searchStudy.jsp @@ -107,30 +107,6 @@ - - - -    -    - - - -    -    - - - -    -    - - - -    -    - - - -   diff --git a/Workspace/Siman/src/org/splat/simer/SearchStudyAction.java b/Workspace/Siman/src/org/splat/simer/SearchStudyAction.java index 37beb4b..423e39c 100644 --- a/Workspace/Siman/src/org/splat/simer/SearchStudyAction.java +++ b/Workspace/Siman/src/org/splat/simer/SearchStudyAction.java @@ -24,10 +24,6 @@ public class SearchStudyAction extends AbstractSearchBaseAction { */ private static final long serialVersionUID = -1910481357051393077L; - /** - * "Private", "Public", "All". - */ - private String _visibility = null; /** * "In-Work", "In-Draft", "In-Check"... */ @@ -122,28 +118,13 @@ public class SearchStudyAction extends AbstractSearchBaseAction { sprop.setManager(him); } // Set of the visibility - if ("all".equals(_visibility)) { - Study.Properties other = sprop.copy(); - - other.setVisibility(Visibility.PUBLIC); - sprop.setVisibility(Visibility.PRIVATE); - sprop.setActor(getConnectedUser()); - - _result = getSearchService().selectStudiesWhere(sprop, other); - } else { - Visibility reparea = null; - if ("onlypublic".equals(_visibility)) { - reparea = Visibility.PUBLIC; - } else { - reparea = Visibility.valueOf(_visibility); - } - sprop.setVisibility(reparea); - if (reparea == Visibility.PRIVATE) { - sprop.setActor(getConnectedUser()); - } - - _result = getSearchService().selectStudiesWhere(sprop); - } + Study.Properties other = sprop.copy(); + + other.setVisibility(Visibility.PUBLIC); + sprop.setVisibility(Visibility.PRIVATE); + sprop.setActor(getConnectedUser()); + + _result = getSearchService().selectStudiesWhere(sprop, other); session.put(RESULT_KEY, _result); // For redisplaying the page without re-executing the search return "refresh"; } @@ -168,10 +149,6 @@ public class SearchStudyAction extends AbstractSearchBaseAction { return _state; } - public String getVisibility() { - return _visibility; - } - public String getWords() { return _words; } @@ -196,10 +173,6 @@ public class SearchStudyAction extends AbstractSearchBaseAction { this._state = value; } - public void setVisibility(final String value) { - this._visibility = value; - } - public void setWords(final String value) { this._words = value; } @@ -222,11 +195,9 @@ public class SearchStudyAction extends AbstractSearchBaseAction { @SuppressWarnings("unchecked") protected void loadFilter() { Map session = getSession(); - User user = getConnectedUser(); Map filter = (Map) session .get("study.filter"); // A default filter is supposed being set at start - _visibility = (String) filter.get("visibility"); _criteriaMatch = (String) filter.get("matchamong"); _contextMatch = (String) filter.get("matcontext"); _state = (String) filter.get("state"); @@ -234,10 +205,6 @@ public class SearchStudyAction extends AbstractSearchBaseAction { _reference = (String) filter.get("reference"); _words = (String) filter.get("title"); _context = (List) filter.get("context"); - - if (user == null) { - _visibility = "onlypublic"; - } } @Override @@ -247,7 +214,6 @@ public class SearchStudyAction extends AbstractSearchBaseAction { Map filter = (Map) session .get("study.filter"); // A default filter is supposed being set at start - filter.put("visibility", this._visibility); filter.put("matchamong", this._criteriaMatch); filter.put("matcontext", this._contextMatch); filter.put("state", this._state); -- 2.39.2