Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1560 Rev 1566
Line 41... Line 41...
41
	private ModeTri triParNbVotes = ModeTri.PAS_DE_TRI;
41
	private ModeTri triParNbVotes = ModeTri.PAS_DE_TRI;
Line 42... Line 42...
42
 
42
 
Line 43... Line 43...
43
	private ModeTri triParDate = ModeTri.PAS_DE_TRI;
43
	private ModeTri triParDate = ModeTri.PAS_DE_TRI;
-
 
44
	
-
 
45
	private ModeTri triParNbTag = ModeTri.PAS_DE_TRI;
Line 44... Line 46...
44
	
46
	
45
	private ModeTri triParNbTag = ModeTri.PAS_DE_TRI;
47
	private ModeTri triParNbPoints = ModeTri.PAS_DE_TRI;
46
 
48
 
Line 185... Line 187...
185
 
187
 
186
	public void setTriParNbTags(ModeTri triParTag) {
188
	public void setTriParNbTags(ModeTri triParTag) {
187
		this.triParNbTag = triParTag;
189
		this.triParNbTag = triParTag;
Line -... Line 190...
-
 
190
	}
-
 
191
	
-
 
192
	public ModeTri getTriParNbPoints() {
-
 
193
		return this.triParNbPoints;
-
 
194
	}
-
 
195
 
-
 
196
	public void setTriParNbPoints(ModeTri triParPoints) {
-
 
197
		this.triParNbPoints = triParPoints;
188
	}
198
	}
189
	
199
	
190
	public ModeTri getTriParNbTags() {
200
	public ModeTri getTriParNbTags() {
Line 191... Line 201...
191
		return this.triParNbTag;
201
		return this.triParNbTag;
Line 204... Line 214...
204
		chaine += estNonNull(date) ? "&masque.date=" + URL.encodeQueryString(date) : "";
214
		chaine += estNonNull(date) ? "&masque.date=" + URL.encodeQueryString(date) : "";
205
		chaine += estNonNull(commune) ? "&masque.commune=" + URL.encodeQueryString(commune) : "";
215
		chaine += estNonNull(commune) ? "&masque.commune=" + URL.encodeQueryString(commune) : "";
206
		chaine += estNonNull(famille) ? "&masque.famille=" + URL.encodeQueryString(famille) : "";
216
		chaine += estNonNull(famille) ? "&masque.famille=" + URL.encodeQueryString(famille) : "";
207
		chaine += estNonNull(auteur) ? "&masque.auteur=" + URL.encodeQueryString(auteur) : "";
217
		chaine += estNonNull(auteur) ? "&masque.auteur=" + URL.encodeQueryString(auteur) : "";
Line 208... Line 218...
208
		
218
		
209
		//TODO: réadapter les web services pour que ceux-ci prennent en compte un tri
219
		//TODO: réadapter les web services pour que ceux-ci prennent en compte un tri
210
		String urlCourante = Window.Location.getHref();
220
		String urlCourante = Window.Location.getHref();
211
		Config config = new Config();
221
		Config config = new Config();
212
		String urlAppliImg = config.getUrl("pictoflora");
222
		String urlAppliImg = config.getUrl("pictoflora");
213
		if (urlCourante.contains(urlAppliImg)) {
223
		if (urlCourante.contains(urlAppliImg)) {
214
			chaine += triParNbVotes != ModeTri.PAS_DE_TRI ? "&tri=votes" : "";
224
			chaine += triParNbVotes != ModeTri.PAS_DE_TRI ? "&tri=votes" : "";
215
			chaine += triParDate != ModeTri.PAS_DE_TRI ? "&ordre=" + triParDate : "";
225
			chaine += triParDate != ModeTri.PAS_DE_TRI ? "&ordre=" + triParDate : "";
216
			chaine += triParNbVotes != ModeTri.PAS_DE_TRI ? "&ordre=" + triParNbVotes : "";
226
			chaine += triParNbVotes != ModeTri.PAS_DE_TRI ? "&ordre=" + triParNbVotes : "";
217
			chaine += triParNbTag != ModeTri.PAS_DE_TRI ? "&tri=tags" : "";
227
			chaine += triParNbTag != ModeTri.PAS_DE_TRI ? "&tri=tags" : "";
-
 
228
			chaine += triParNbTag != ModeTri.PAS_DE_TRI ? "&ordre=" + triParNbTag : "";
-
 
229
			chaine += triParNbPoints != ModeTri.PAS_DE_TRI ? "&tri=points" : "";
218
			chaine += triParNbTag != ModeTri.PAS_DE_TRI ? "&ordre=" + triParNbTag : "";
230
			chaine += triParNbPoints != ModeTri.PAS_DE_TRI ? "&ordre=" + triParNbPoints : "";
219
			chaine += estNonNull(idProtocoleSelectionne) ? "&protocole=" + idProtocoleSelectionne : "";			
231
			chaine += estNonNull(idProtocoleSelectionne) ? "&protocole=" + idProtocoleSelectionne : "";			
220
		} else {
232
		} else {
221
			chaine += triParDate != ModeTri.PAS_DE_TRI ? "&tri=date_observation" : "";
233
			chaine += triParDate != ModeTri.PAS_DE_TRI ? "&tri=date_observation" : "";
222
		}
-
 
223
 
234
		}
224
		return chaine;
235
		return chaine;
Line 225... Line 236...
225
	}
236
	}
226
 
237