Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 163 Rev 165
Line 228... Line 228...
228
		$limite = $this->parametres->get('navigation.limite');
228
		$limite = $this->parametres->get('navigation.limite');
229
		$departActuel = $this->parametres->get('navigation.depart');
229
		$departActuel = $this->parametres->get('navigation.depart');
230
		$departPrecedent = $departActuel - $limite;
230
		$departPrecedent = $departActuel - $limite;
231
		$href = null;
231
		$href = null;
232
		if ($departPrecedent >= 0) {
232
		if ($departPrecedent >= 0) {
233
			$squelette = $this->listeUrl.'?navigation.depart=%s&navigation.limite=%s';
233
			$squelette = $this->construireTplHrefNavigation();
234
			$href = sprintf($squelette, $departPrecedent, $limite);
234
			$href = sprintf($squelette, $departPrecedent, $limite);
235
		}
235
		}
236
		return $href;
236
		return $href;
237
	}
237
	}
Line 240... Line 240...
240
		$limite = $this->parametres->get('navigation.limite');
240
		$limite = $this->parametres->get('navigation.limite');
241
		$departActuel = $this->parametres->get('navigation.depart');
241
		$departActuel = $this->parametres->get('navigation.depart');
242
		$departSuivant = $departActuel + $limite;
242
		$departSuivant = $departActuel + $limite;
243
		$href = null;
243
		$href = null;
244
		if ($departSuivant < $this->nbreNomsTotal) {
244
		if ($departSuivant < $this->nbreNomsTotal) {
245
			$squelette = $this->listeUrl.'?navigation.depart=%s&navigation.limite=%s';
245
			$squelette = $this->construireTplHrefNavigation();
246
			$href = sprintf($squelette, $departSuivant, $limite);
246
			$href = sprintf($squelette, $departSuivant, $limite);
247
		}
247
		}
248
		return $href;
248
		return $href;
249
	}
249
	}
-
 
250
 
-
 
251
	private function construireTplHrefNavigation() {
-
 
252
		$requetes = array();
-
 
253
		$this->parametres->rewind();
-
 
254
		while (is_null($parametre = $this->parametres->key()) === false) {
-
 
255
			if (strpos($parametre, 'navigation') === false) {
-
 
256
				$valeur = $this->parametres->current();
-
 
257
				$requetes[] = "$parametre=$valeur";
-
 
258
			}
-
 
259
			$this->parametres->next();
-
 
260
		}
-
 
261
		$requetes[] = "navigation.depart=%s";
-
 
262
		$requetes[] = "navigation.limite=%s";
-
 
263
		$tpl = $this->listeUrl.'?'.implode('&', $requetes);
-
 
264
		return $tpl;
-
 
265
	}
250
}
266
}
251
?>
267
?>
252
268