Subversion Repositories eFlore/Applications.del

Rev

Rev 1592 | Rev 1865 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1592 Rev 1862
Line 44... Line 44...
44
		ConstantesNavigation.PARAM_TYPE_TOUS, 
44
		ConstantesNavigation.PARAM_TYPE_TOUS, 
45
		ConstantesNavigation.PARAM_TYPE_A_DETERMINER,
45
		ConstantesNavigation.PARAM_TYPE_A_DETERMINER,
46
		ConstantesNavigation.PARAM_TYPE_EN_DISCUSSION,
46
		ConstantesNavigation.PARAM_TYPE_EN_DISCUSSION,
47
		ConstantesNavigation.PARAM_TYPE_VALIDEES
47
		ConstantesNavigation.PARAM_TYPE_VALIDEES
48
	};
48
	};
-
 
49
	private ModeTri modeTri = ModeTri.TRI_ASCENDANT;
Line 49... Line 50...
49
	
50
	
50
	public void supprimerFiltreStatut() {
51
	public void supprimerFiltreStatut() {
51
		this.statut = null;
52
		this.statut = null;
Line 150... Line 151...
150
			if (pageInt != null) {
151
			if (pageInt != null) {
151
				setPageCouranteRechercheObservations(pageInt);
152
				setPageCouranteRechercheObservations(pageInt);
152
			}
153
			}
153
		}
154
		}
Line -... Line 155...
-
 
155
		
154
		
156
		definirOrdreTriCourantParUrl();
155
		String tri = Location.getParameter("tri");
157
		String tri = Location.getParameter("tri");
156
		String ordre = Location.getParameter("ordre");
-
 
157
		
158
		if (urlCourante.contains(urlAppliImg)) {
158
		if (tri != null) {
159
			if (tri != null) {
159
			ModeTri modeTri = ModeTri.TRI_ASCENDANT;
160
				// Pour PictoFlora
160
			if (ordre != null && ordre.equals("asc")) {
161
				if (tri.equals("moyenne-arithmetique")) {
161
				modeTri = ModeTri.TRI_ASCENDANT;
-
 
162
			}
-
 
163
			
162
					rechercheParArguments.setTriParMoyenneArithmetique(modeTri);
164
			if (ordre != null && ordre.equals("desc")) {
163
				} else if (tri.equals("points")) {
165
				modeTri = ModeTri.TRI_DESCENDANT;
-
 
166
			}
-
 
167
			
164
					rechercheParArguments.setTriParNbPoints(modeTri);
168
			if (tri.equals("votes")) {
165
				} else if (tri.equals("tags")) {
-
 
166
					rechercheParArguments.setTriParNbTags(modeTri);
-
 
167
				} else {
169
				rechercheParArguments.setTriParNbVotes(modeTri);
168
					rechercheParArguments.setTriParDate(modeTri);
170
			}
169
				}
171
			
170
			} else {
172
			if (tri.equals("tags")) {
171
				// Tri par défaut pour PictoFlora
173
				rechercheParArguments.setTriParNbTags(modeTri);
172
				rechercheParArguments.setTriParDate(ModeTri.TRI_DESCENDANT);
174
			}
173
			}
-
 
174
		} else {
175
			
175
			// Pour IdentiPlante
176
			if (tri.equals("date_observation")) {
176
			if (tri != null && tri.equals("date_observation")) {
-
 
177
				rechercheParArguments.setTriParDate(modeTri);
-
 
178
			} else {
-
 
179
				// Tri par défaut pour IdentiPlante
177
				rechercheParArguments.setTriParDate(modeTri);
180
				rechercheParArguments.setTriParDate(ModeTri.TRI_DESCENDANT);
178
			}
181
			}
Line 179... Line 182...
179
		}
182
		}
Line 202... Line 205...
202
		informationsRechercheObservation = rechercheParArguments;
205
		informationsRechercheObservation = rechercheParArguments;
Line 203... Line 206...
203
		
206
		
204
		mettreAjourUrlCourante();
207
		mettreAjourUrlCourante();
Line -... Line 208...
-
 
208
	}
-
 
209
	
-
 
210
	private void definirOrdreTriCourantParUrl() {
-
 
211
		String ordre = Location.getParameter("ordre");
-
 
212
		if (ordre != null) {
-
 
213
			if (ordre.equals("asc")) {
-
 
214
				this.modeTri = ModeTri.TRI_ASCENDANT;
-
 
215
			} else if (ordre.equals("desc")) {
-
 
216
				this.modeTri = ModeTri.TRI_DESCENDANT;
-
 
217
			}
-
 
218
		}
205
	}
219
	}
206
	
220
	
207
	public void setIdProtocoleEnAttente(String idProtocole) {
221
	public void setIdProtocoleEnAttente(String idProtocole) {
Line 208... Line 222...
208
		idProtocoleEnAttente = idProtocole;
222
		idProtocoleEnAttente = idProtocole;