Subversion Repositories eFlore/Applications.coel

Rev

Rev 936 | Rev 948 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
934 jpm 1
package org.tela_botanica.client.vues.collection;
453 jp_milcent 2
 
883 jpm 3
import java.util.Iterator;
4
 
453 jp_milcent 5
import org.tela_botanica.client.ComposantClass;
6
import org.tela_botanica.client.ComposantId;
7
import org.tela_botanica.client.Mediateur;
8
import org.tela_botanica.client.interfaces.Rafraichissable;
883 jpm 9
import org.tela_botanica.client.modeles.Information;
453 jp_milcent 10
import org.tela_botanica.client.modeles.ValeurListe;
935 jpm 11
import org.tela_botanica.client.modeles.collection.Collection;
12
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
13
import org.tela_botanica.client.modeles.collection.CollectionAPersonneListe;
14
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
15
import org.tela_botanica.client.modeles.collection.CollectionAPublicationListe;
16
import org.tela_botanica.client.modeles.personne.Personne;
17
import org.tela_botanica.client.modeles.projet.ProjetListe;
18
import org.tela_botanica.client.modeles.publication.Publication;
19
import org.tela_botanica.client.modeles.structure.Structure;
938 jpm 20
import org.tela_botanica.client.util.Debug;
936 jpm 21
import org.tela_botanica.client.vues.DetailVue;
453 jp_milcent 22
 
23
import com.extjs.gxt.ui.client.Style.Scroll;
24
import com.extjs.gxt.ui.client.util.Format;
25
import com.extjs.gxt.ui.client.util.Params;
26
import com.extjs.gxt.ui.client.widget.ContentPanel;
27
import com.extjs.gxt.ui.client.widget.Html;
28
import com.extjs.gxt.ui.client.widget.TabItem;
29
import com.extjs.gxt.ui.client.widget.TabPanel;
30
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
938 jpm 31
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
453 jp_milcent 32
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
33
import com.google.gwt.core.client.GWT;
34
 
35
public class CollectionDetailVue extends DetailVue implements Rafraichissable {
36
 
883 jpm 37
	private Collection collection = null;
38
	private boolean collectionChargementOk = false;
39
	private boolean personnesLieesChargementOk = false;
40
	private boolean publicationsLieesChargementOk = false;
468 jp_milcent 41
	private Structure structure = null;
883 jpm 42
 
453 jp_milcent 43
	private String enteteTpl = null;
44
	private String generalTpl = null;
883 jpm 45
	private String personneTpl = null;
46
	private String tableauPersonnesLieesTpl = null;
47
	private String lignePersonneLieeTpl = null;
687 jp_milcent 48
	private String publicationTpl = null;
883 jpm 49
	private String tableauPublicationsLieesTpl = null;
50
	private String lignePublicationLieeTpl = null;
630 jp_milcent 51
	private String descriptionTpl = null;
52
	private String contenuTpl = null;
53
	private String inventaireTpl = null;
453 jp_milcent 54
 
55
	private ContentPanel panneauPrincipal = null;
56
	private Html entete = null;
57
	private TabPanel onglets = null;
58
	private TabItem generalOnglet = null;
862 jpm 59
	private TabItem personneOnglet = null;
687 jp_milcent 60
	private TabItem publicationOnglet = null;
630 jp_milcent 61
	private TabItem descriptionOnglet = null;
62
	private TabItem contenuOnglet = null;
63
	private TabItem inventaireOnglet = null;
883 jpm 64
 
453 jp_milcent 65
 
66
	public CollectionDetailVue(Mediateur mediateurCourant) {
67
		super(mediateurCourant);
68
		initialiserTousLesTpl();
69
		chargerOntologie();
70
 
71
		panneauPrincipal = new ContentPanel();
938 jpm 72
		panneauPrincipal.setLayout(new FitLayout());
453 jp_milcent 73
		panneauPrincipal.setHeaderVisible(false);
74
		panneauPrincipal.setBodyBorder(false);
75
 
76
	    entete = new Html();
77
	    entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
78
	    panneauPrincipal.setTopComponent(entete);
79
 
80
		onglets = new TabPanel();
81
		onglets.setId(ComposantId.ZONE_DETAIL_CORPS);
82
		onglets.setBodyBorder(false);
83
 
84
		generalOnglet = new TabItem(i18nC.structureInfoGeneral());
85
		generalOnglet.setLayout(new AnchorLayout());
86
		generalOnglet.setScrollMode(Scroll.AUTO);
87
		onglets.add(generalOnglet);
88
 
862 jpm 89
		personneOnglet = new TabItem(i18nC.collectionPersonne());
90
		personneOnglet.setLayout(new AnchorLayout());
91
		personneOnglet.setScrollMode(Scroll.AUTO);
92
		onglets.add(personneOnglet);
630 jp_milcent 93
 
687 jp_milcent 94
		publicationOnglet = new TabItem(i18nC.collectionPublication());
95
		publicationOnglet.setLayout(new AnchorLayout());
96
		publicationOnglet.setScrollMode(Scroll.AUTO);
97
		onglets.add(publicationOnglet);
98
 
630 jp_milcent 99
		descriptionOnglet = new TabItem(i18nC.collectionDescription());
100
		descriptionOnglet.setLayout(new AnchorLayout());
101
		descriptionOnglet.setScrollMode(Scroll.AUTO);
102
		onglets.add(descriptionOnglet);
103
 
104
		contenuOnglet = new TabItem(i18nC.collectionContenu());
105
		contenuOnglet.setLayout(new AnchorLayout());
106
		contenuOnglet.setScrollMode(Scroll.AUTO);
107
		onglets.add(contenuOnglet);
862 jpm 108
 
630 jp_milcent 109
		inventaireOnglet = new TabItem(i18nC.collectionInventaire());
110
		inventaireOnglet.setLayout(new AnchorLayout());
111
		inventaireOnglet.setScrollMode(Scroll.AUTO);
112
		onglets.add(inventaireOnglet);
113
 
453 jp_milcent 114
		panneauPrincipal.add(onglets);
115
		add(panneauPrincipal);
116
	}
117
 
118
	private void initialiserTousLesTpl() {
119
		initialiserEnteteHtmlTpl();
120
		initialiserGeneralTpl();
883 jpm 121
		initialiserPersonneTpl();
122
		initialiserTableauPersonnesLieesTpl();
123
		initialiserLignePersonneLieeTpl();
687 jp_milcent 124
		initialiserPublicationTpl();
883 jpm 125
		initialiserTableauPublicationsLieesTpl();
126
		initialiserLignePublicationLieeTpl();
630 jp_milcent 127
		initialiserContenuTpl();
128
		initialiserDescriptionTpl();
129
		initialiserInventaireTpl();
453 jp_milcent 130
	}
131
 
132
	private void initialiserEnteteHtmlTpl() {
133
		enteteTpl =
134
			"<div id='{css_id}'>"+
135
			"	<h1>{nom}</h1>"+
813 jpm 136
			"	<h2>{structure}<span class='{css_meta}'>{projet} <br /> {i18n_id}:{id} - {guid}</span></h2>" +
453 jp_milcent 137
			"</div>";
138
	}
139
 
140
	private void initialiserGeneralTpl() {
141
		generalTpl =
142
			"<div class='{css_corps}'>"+
143
			"	<div class='{css_fieldset}'>"+
144
			"		<h2>{i18n_titre_identification}</h2>"+
630 jp_milcent 145
			"		<span class='{css_label}'>{i18n_nom_alternatif} :</span> {nom_alternatif}<br />"+
477 jp_milcent 146
			"		<span class='{css_label}'>{i18n_acronyme} :</span> {acronyme}<br />"+
147
			"		<span class='{css_label}'>{i18n_code} :</span> {code}<br />"+
630 jp_milcent 148
			"		<span class='{css_label}'>{i18n_cote} :</span> {cote}<br />"+
149
			"		<span class='{css_label}'>{i18n_mere} :</span> {mere}<br />"+
687 jp_milcent 150
			"		<span class='{css_label}'>{i18n_type_ncd} :</span> {type_ncd}<br />"+
151
			"		<span class='{css_label}'>{i18n_type_depot} :</span> {type_depot}<br />"+
453 jp_milcent 152
			"	</div>"+
477 jp_milcent 153
			"	<div class='{css_fieldset}'>"+
630 jp_milcent 154
			"		<h2>{i18n_general_collection_titre}</h2>"+
477 jp_milcent 155
			"		<span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
156
			"		<span class='{css_label}'>{i18n_description_specialiste} :</span> {description_specialiste}<br />"+
630 jp_milcent 157
			"		<span class='{css_label}'>{i18n_historique} :</span> {historique}<br />"+
158
			"		<span class='{css_label}'>{i18n_web} :</span> {web}<br />"+
159
			"		<span class='{css_label}'>{i18n_groupement_principe} :</span> {groupement_principe}<br />"+
160
			"		<span class='{css_label}'>{i18n_groupement_but} :</span> {groupement_but}<br />"+
477 jp_milcent 161
			"	</div>"+
162
			"	<hr class='{css_clear}'/>"+
453 jp_milcent 163
			"</div>";
164
	}
165
 
883 jpm 166
	private void initialiserPersonneTpl() {
167
		personneTpl =
630 jp_milcent 168
			"<div class='{css_corps}'>"+
169
			"	<div class='{css_fieldset}'>"+
883 jpm 170
			"		<h2>{i18n_titre_personne}</h2>"+
171
			"		{tableau_personnes_liees}"+
630 jp_milcent 172
			"	</div>"+
173
			"	<hr class='{css_clear}'/>"+
174
			"</div>";
175
	}
176
 
883 jpm 177
 
178
	private void initialiserTableauPersonnesLieesTpl() {
179
		tableauPersonnesLieesTpl =
180
			"<h3>{i18n_titre_membre}</h3>"+
181
			"<table>"+
182
			"	<thead>"+
183
			"		<tr>" +
184
			"			<th>{i18n_prenom}</th>" +
185
			"			<th>{i18n_nom}</th>" +
186
			"		</tr>"+
187
			"	</thead>"+
188
			"	<tbody>"+
189
			"		{lignes}"+
190
			"	</tbody>"+
191
			"</table>";
192
	}
193
 
194
	private void initialiserLignePersonneLieeTpl() {
195
		lignePersonneLieeTpl =
196
			"<tr>"+
197
			"	<td>{prenom}</td>"+
198
			"	<td>{nom}</td>"+
199
			"</tr>";
200
	}
201
 
687 jp_milcent 202
	private void initialiserPublicationTpl() {
203
		publicationTpl =
204
			"<div class='{css_corps}'>"+
205
			"	<div class='{css_fieldset}'>"+
206
			"		<h2>{i18n_titre_publication}</h2>"+
883 jpm 207
			"		{tableau_publications_liees}"+
687 jp_milcent 208
			"	</div>"+
209
			"	<hr class='{css_clear}'/>"+
210
			"</div>";
211
	}
212
 
883 jpm 213
	private void initialiserTableauPublicationsLieesTpl() {
214
		tableauPublicationsLieesTpl =
215
			"<table>"+
216
			"	<thead>"+
217
			"		<tr>" +
218
			"			<th>{i18n_auteur}</th>" +
219
			"			<th>{i18n_titre}</th>" +
220
			"		</tr>"+
221
			"	</thead>"+
222
			"	<tbody>"+
223
			"		{lignes}"+
224
			"	</tbody>"+
225
			"</table>";
226
	}
227
 
228
	private void initialiserLignePublicationLieeTpl() {
229
		lignePublicationLieeTpl =
230
			"<tr>"+
231
			"	<td>{auteur}</td>"+
232
			"	<td>{titre}</td>"+
233
			"</tr>";
234
	}
235
 
630 jp_milcent 236
	private void initialiserDescriptionTpl() {
237
		descriptionTpl =
238
			"<div class='{css_corps}'>"+
239
			"	<div class='{css_fieldset}'>"+
240
			"		<h2>{i18n_titre_description}</h2>"+
875 jpm 241
			"		<span class='{css_label}'>{i18n_type_botanique} :</span> {type_botanique}<br />"+
242
			"		<span class='{css_label}'>{i18n_nbre_echantillon} :</span> {nbre_echantillon}<br />"+
630 jp_milcent 243
			"	</div>"+
244
			"	<hr class='{css_clear}'/>"+
245
			"</div>";
246
	}
247
 
248
	private void initialiserContenuTpl() {
249
		contenuTpl =
250
			"<div class='{css_corps}'>"+
251
			"	<div class='{css_fieldset}'>"+
252
			"		<h2>{i18n_titre_contenu}</h2>"+
253
			"	</div>"+
254
			"	<hr class='{css_clear}'/>"+
255
			"</div>";
256
	}
257
 
258
	private void initialiserInventaireTpl() {
259
		inventaireTpl =
260
			"<div class='{css_corps}'>"+
261
			"	<div class='{css_fieldset}'>"+
262
			"		<h2>{i18n_titre_inventaire}</h2>"+
263
			"	</div>"+
264
			"	<hr class='{css_clear}'/>"+
265
			"</div>";
266
	}
267
 
453 jp_milcent 268
	private void chargerOntologie() {
875 jpm 269
		String[] listesCodes = {"typeCollectionBota", "typeCollectionNcd", "typeDepot", "groupementPrincipe", "realisationBut"};
813 jpm 270
		lancerChargementListesValeurs(listesCodes);
453 jp_milcent 271
	}
272
 
811 jpm 273
	public void rafraichir(Object nouvellesDonnees) {
274
		if (nouvellesDonnees instanceof Collection) {
275
			collection = (Collection) nouvellesDonnees;
813 jpm 276
			collectionChargementOk = true;
811 jpm 277
		} else if (nouvellesDonnees instanceof ProjetListe) {
278
			projets = (ProjetListe) nouvellesDonnees;
813 jpm 279
			projetsChargementOk = true;
811 jpm 280
		} else if (nouvellesDonnees instanceof ValeurListe) {
813 jpm 281
			ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
816 jpm 282
			receptionerListeValeurs(listeValeursReceptionnee);
883 jpm 283
		} else if (nouvellesDonnees instanceof Information) {
284
			Information info = (Information) nouvellesDonnees;
285
			if (info.getType().equals("liste_collection_a_personne")) {
286
				lierCollectionAPersonne((CollectionAPersonneListe) info.getDonnee(0));
287
			} else if (info.getType().equals("liste_collection_a_publication")) {
288
				lierCollectionAPublication((CollectionAPublicationListe) info.getDonnee(0));
289
			}
453 jp_milcent 290
		} else {
862 jpm 291
			GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
453 jp_milcent 292
		}
813 jpm 293
 
294
		if (avoirDonneesChargees()) {
295
			afficherDetail();
296
		}
453 jp_milcent 297
	}
298
 
883 jpm 299
	protected void lierCollectionAPersonne(CollectionAPersonneListe personnes) {
300
		collection.setPersonnesLiees(personnes);
301
		personnesLieesChargementOk = true;
302
	}
303
 
304
	protected void lierCollectionAPublication(CollectionAPublicationListe publications) {
305
		collection.setPublicationsLiees(publications);
306
		publicationsLieesChargementOk = true;
307
	}
308
 
813 jpm 309
	private boolean avoirDonneesChargees() {
310
		boolean ok = false;
938 jpm 311
		Debug.log("projetsChargementOk:"+projetsChargementOk+"-collectionChargementOk:"+collectionChargementOk+"-ontologieChargementOk:"+ontologieChargementOk+"-personnesLieesChargementOk:"+personnesLieesChargementOk+"-publicationsLieesChargementOk:"+publicationsLieesChargementOk);
883 jpm 312
		if (projetsChargementOk && collectionChargementOk && ontologieChargementOk && personnesLieesChargementOk && publicationsLieesChargementOk) {
813 jpm 313
			ok = true;
314
		}
315
		return ok;
316
	}
317
 
453 jp_milcent 318
	private void afficherDetail() {
319
		if (collection != null) {
320
			afficherEntete();
321
			afficherIdentification();
883 jpm 322
			afficherPersonne();
687 jp_milcent 323
			afficherPublication();
630 jp_milcent 324
			afficherDescription();
325
			afficherContenu();
326
			afficherInventaire();
453 jp_milcent 327
		}
328
		layout();
329
	}
330
 
331
	private void afficherEntete() {
332
		Params enteteParams = new Params();
333
		enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
334
		enteteParams.set("css_meta", ComposantClass.META);
335
 
813 jpm 336
		enteteParams.set("i18n_id", i18nC.id());
337
 
453 jp_milcent 338
		enteteParams.set("nom", collection.getNom());
468 jp_milcent 339
		enteteParams.set("structure", collection.getStructureNom());
453 jp_milcent 340
		enteteParams.set("id", collection.getId());
341
		enteteParams.set("guid", collection.getGuid());
342
		enteteParams.set("projet", construireTxtProjet(collection.getIdProjet()));
343
 
344
		String eHtml = Format.substitute(enteteTpl, enteteParams);
345
		entete.getElement().setInnerHTML(eHtml);
346
	}
347
 
348
	private void afficherIdentification() {
349
		Params generalParams = new Params();
350
		generalParams.set("i18n_titre_identification", i18nC.titreAdministratif());
687 jp_milcent 351
		generalParams.set("i18n_nom_alternatif", i18nC.nomAlternatif());
453 jp_milcent 352
		generalParams.set("i18n_acronyme", i18nC.acronyme());
477 jp_milcent 353
		generalParams.set("i18n_code", i18nC.code());
354
		generalParams.set("i18n_cote", i18nC.cote());
355
		generalParams.set("i18n_mere", i18nC.collectionMere());
687 jp_milcent 356
		generalParams.set("i18n_type_ncd", i18nC.typeCollectionNcd());
357
		generalParams.set("i18n_type_depot", i18nC.typeDepot());
358
 
630 jp_milcent 359
		generalParams.set("i18n_general_collection_titre", i18nC.collectionGeneralTitre());
477 jp_milcent 360
		generalParams.set("i18n_description", i18nC.description());
361
		generalParams.set("i18n_description_specialiste", i18nC.descriptionSpecialiste());
362
		generalParams.set("i18n_historique", i18nC.historique());
363
		generalParams.set("i18n_web", i18nC.siteWeb());
364
		generalParams.set("i18n_groupement_principe", i18nC.groupementPrincipe());
365
		generalParams.set("i18n_groupement_but", i18nC.groupementBut());
366
 
367
		String acronyme = construireTxtTruck(collection.getIdAlternatif());
630 jp_milcent 368
		String code = construireTxtTruck(collection.getCode());
369
		String nomAlternatif = construireTxtTruck(collection.getNomAlternatif());
370
		String urls = construireTxtTruck(collection.getUrls());
371
		String typeNcd = construireTxtListeOntologie(collection.getTypeNcd());
372
		String typeDepot = construireTxtListeOntologie(collection.getTypeDepot());
875 jpm 373
		String groupementBut = construireTxtListeOntologie(collection.getGroupementBut());
374
		String groupementPrincipe = construireTxtListeOntologie(collection.getGroupementPrincipe());
630 jp_milcent 375
 
376
		generalParams.set("nom_alternatif", nomAlternatif);
453 jp_milcent 377
		generalParams.set("acronyme", acronyme);
630 jp_milcent 378
		generalParams.set("code", code);
379
		generalParams.set("cote", collection.getCote());
380
		generalParams.set("mere", collection.getCollectionMereNom());
687 jp_milcent 381
		generalParams.set("type_ncd", typeNcd);
382
		generalParams.set("type_depot", typeDepot);
383
 
477 jp_milcent 384
		generalParams.set("description", collection.getDescription());
385
		generalParams.set("description_specialiste", collection.getDescriptionSpecialiste());
630 jp_milcent 386
		generalParams.set("historique", collection.getHistorique());
387
		generalParams.set("web", urls);
875 jpm 388
		generalParams.set("groupement_principe", groupementPrincipe);
389
		generalParams.set("groupement_but", groupementBut);
453 jp_milcent 390
 
391
		afficherOnglet(generalTpl, generalParams, generalOnglet);
392
	}
393
 
883 jpm 394
	private void afficherPersonne() {
395
		String tableauPersonneHtml = "";
914 jpm 396
		if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
883 jpm 397
			tableauPersonneHtml = construireTableauPersonnesLiees();
398
		}
630 jp_milcent 399
 
883 jpm 400
		Params personneParams = new Params();
401
		personneParams.set("i18n_titre_personne", i18nC.collectionPersonneTitre());
402
		personneParams.set("tableau_personnes_liees", tableauPersonneHtml);
403
 
404
		afficherOnglet(personneTpl, personneParams, personneOnglet);
630 jp_milcent 405
	}
406
 
883 jpm 407
	private String construireTableauPersonnesLiees() {
408
		Params contenuParams = new Params();
409
		contenuParams.set("i18n_prenom", i18nC.personnePrenom());
410
		contenuParams.set("i18n_nom", i18nC.personneNom());
411
 
412
		String lignesPersonnel = "";
413
 
414
		Iterator<String> it = collection.getPersonnesLiees().keySet().iterator();
415
		while (it.hasNext()) {
416
			CollectionAPersonne relationCollectionAPersonne = collection.getPersonnesLiees().get(it.next());
417
			Personne personne = relationCollectionAPersonne.getPersonne();
418
			Params ligneParams = new Params();
419
 
420
			ligneParams.set("prenom", personne.getPrenom());
421
			ligneParams.set("nom", personne.getNom());
422
			lignesPersonnel += Format.substitute(lignePersonneLieeTpl, ligneParams);
423
		}
424
		contenuParams.set("lignes", lignesPersonnel);
425
 
426
		String cHtml = Format.substitute(tableauPersonnesLieesTpl, contenuParams);
427
		return cHtml;
428
	}
429
 
687 jp_milcent 430
	private void afficherPublication() {
431
		Params publicationParams = new Params();
432
		publicationParams.set("i18n_titre_publication", i18nC.collectionPublicationTitre());
433
 
883 jpm 434
		String tableauPublicationHtml = "";
914 jpm 435
		if (collection.getPersonnesLiees() != null && collection.getPersonnesLiees().size() > 0) {
883 jpm 436
			tableauPublicationHtml = construireTableauPublicationsLiees();
437
		}
438
		publicationParams.set("tableau_publications_liees", tableauPublicationHtml);
439
 
687 jp_milcent 440
		afficherOnglet(publicationTpl, publicationParams, publicationOnglet);
441
	}
442
 
883 jpm 443
	private String construireTableauPublicationsLiees() {
444
		Params contenuParams = new Params();
445
		contenuParams.set("i18n_auteur", i18nC.publicationAuteurs());
446
		contenuParams.set("i18n_titre", i18nC.publicationTitre());
447
 
448
		String lignesPublication = "";
449
 
450
		Iterator<String> it = collection.getPublicationsLiees().keySet().iterator();
451
		while (it.hasNext()) {
452
			CollectionAPublication relationCollectionAPublication = collection.getPublicationsLiees().get(it.next());
453
			Publication publication = relationCollectionAPublication.getPublication();
454
			Params ligneParams = new Params();
455
 
456
			ligneParams.set("auteur", publication.getAuteur());
457
			ligneParams.set("titre", publication.getTitre());
458
			lignesPublication += Format.substitute(lignePublicationLieeTpl, ligneParams);
459
		}
460
		contenuParams.set("lignes", lignesPublication);
461
 
462
		String cHtml = Format.substitute(tableauPublicationsLieesTpl, contenuParams);
463
		return cHtml;
464
	}
465
 
630 jp_milcent 466
	private void afficherDescription() {
467
		Params descriptionParams = new Params();
468
		descriptionParams.set("i18n_titre_description", i18nC.collectionDescriptionTitre());
875 jpm 469
		descriptionParams.set("i18n_type_botanique", i18nC.typeCollectionBotanique());
470
		descriptionParams.set("i18n_nbre_echantillon", i18nC.nbreEchantillon());
630 jp_milcent 471
 
875 jpm 472
		String typeBota = construireTxtListeOntologie(collection.getBotanique().getType());
473
 
474
		descriptionParams.set("type_botanique", typeBota);
475
		descriptionParams.set("nbre_echantillon", collection.getBotanique().getNbreEchantillon());
476
 
630 jp_milcent 477
		afficherOnglet(descriptionTpl, descriptionParams, descriptionOnglet);
478
	}
479
 
480
	private void afficherContenu() {
481
		Params contenuParams = new Params();
482
		contenuParams.set("i18n_titre_contenu", i18nC.collectionContenuTitre());
483
 
484
		afficherOnglet(contenuTpl, contenuParams, contenuOnglet);
485
	}
486
 
487
	private void afficherInventaire() {
488
		Params inventaireParams = new Params();
489
		inventaireParams.set("i18n_titre_inventaire", i18nC.collectionInventaireTitre());
490
 
491
		afficherOnglet(inventaireTpl, inventaireParams, inventaireOnglet);
492
	}
493
 
468 jp_milcent 494
	protected String getNomStructure() {
495
		String nomStructure = "";
496
		if (structure != null) {
497
			nomStructure = structure.getNom();
498
		} else {
499
			nomStructure = collection.getIdStructure();
453 jp_milcent 500
		}
468 jp_milcent 501
		return nomStructure;
453 jp_milcent 502
	}
503
}