/trunk/services/modules/0.1/observations/ListeObservations.php |
---|
128,7 → 128,8 |
$this->sql->getLimit(). |
' -- '.__FILE__.':'.__LINE__; |
} |
/*echo "REQ: "; var_dump($requete); |
exit;*/ |
return $requete; |
} |
/trunk/services/configurations/config.defaut.ini |
---|
245,6 → 245,7 |
masques_possibles = "masque,masque.famille,masque.genre, |
masque.referentiel, masque.ns, masque.nn, masque.auteur, masque.date, |
masque.commune, masque.departement, masque.tag_cel, masque.espece, |
masque.pninscritsseulement, |
navigation.depart, navigation.limite, tri, ordre, masque.type, masque.pays" |
; Valeurs par défaut pour les paramètres de l'url : |
parametres_valeurs_defaut = " |
289,6 → 290,7 |
masque.commune, masque.departement, masque.id_zone_geo, |
masque.auteur, masque.date, masque.type, masque.milieu, |
masque.tag, masque.tag_cel, masque.tag_del, |
masque.pninscritsseulement, |
navigation.depart, navigation.limite, tri, ordre, format, masque.pays" |
; Valeurs par défaut pour les paramètres de l'url : |
parametres_valeurs_defaut = " |
/trunk/services/bibliotheque/ParametresFiltrage.php |
---|
194,6 → 194,8 |
$this->filtrerCommune(); |
$this->filtrerType(); |
$this->filtrerPnInscrits(); |
$this->filtrerTagCel(); |
$this->filtrerTagDel(); |
} |
344,6 → 346,14 |
} |
} |
protected function filtrerPnInscrits() { |
if (isset($this->parametres['masque.pninscritsseulement'])) { |
if ($this->parametres['masque.pninscritsseulement'] == 1) { |
$this->parametresFiltres['masque.pninscritsseulement'] = 1; |
} |
} |
} |
/** masque.commune (zone_geo) |
* TODO: que faire avec des '%' en INPUT ? |
* Le masque doit *permettre* une regexp et non l'imposer. Charge au client de faire son travail. |
/trunk/services/bibliotheque/Sql.php |
---|
70,11 → 70,11 |
} |
private function etreAppliImg() { |
return $this->appli === 'IMG' ? true : false; |
return $this->appli === 'IMG'; |
} |
private function etreAppliObs() { |
return $this->appli === 'OBS' ? true : false; |
return $this->appli === 'OBS'; |
} |
public function getRequeteSql() { |
158,8 → 158,6 |
} |
/** |
* |
* @param $p les paramètres (notamment de masque) passés par l'URL et déjà traités/filtrés (sauf quotes) |
* @param $req le tableau, passé par référence représentant les composants de la requête à bâtir |
*/ |
175,6 → 173,7 |
$this->ajouterContrainteNn(); |
$this->ajouterContrainteReferentiel(); |
$this->ajouterContrainteCommune(); |
$this->ajouterContraintePnInscrits(); |
} |
private function ajouterContrainteAuteur() { |
380,6 → 379,21 |
} |
} |
/** |
* Si masque.pninscritsseulement vaut true, les observations ayant un tag |
* "plantnet" mais dont l'auteur n'est pas inscrit à TB seront éliminées |
* (décision FlorisTic 2016-09) |
*/ |
protected function ajouterContraintePnInscrits() { |
if (isset($this->parametres['masque.pninscritsseulement'])) { |
// avec la classe ParametresFiltrage, on ne passe là que si le masque vaut 1 |
$motifMotClePlantnet = "'%plantnet%'"; |
$this->addWhere('masque.pninscritsseulement', "((do.mots_cles_texte NOT LIKE $motifMotClePlantnet OR do.mots_cles_texte IS NULL) OR do.ce_utilisateur != 0)"); |
$this->ajouterJoinObsSiNecessaire(); |
} |
} |
private function ajouterJoinObsSiNecessaire() { |
if ($this->etreAppliImg()) { |
$this->addJoin($this->getSqlJointureObs()); |
391,10 → 405,11 |
return $typeJointure.' JOIN del_observation AS do ON (di.ce_observation = do.id_observation) '; |
} |
// la constrainte de nostre bon roy |
public function ajouterConstrainteAppliObs() { |
$this->ajouterContrainteTagCel(); |
$this->ajouterContrainteType(); |
// TODO : ATTENTION -> vue que l'on utilise une vue basée sur les images, nous devons grouper par obs |
// TODO : ATTENTION -> vu que l'on utilise une vue basée sur les images, nous devons grouper par obs |
$this->addGroupBy('do.id_observation'); |
} |
491,6 → 506,7 |
$this->ajouterContrainteTri(); |
$this->ajouterContrainteTagCel(); |
$this->ajouterContrainteTagDel(); |
$this->ajouterContraintePnInscrits(); |
} |
private function ajouterContrainteMilieu() { |
/trunk/services |
---|
Property changes: |
Modified: svn:mergeinfo |
Merged /branches/v1.10-sodium/services:r2138-2139 |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRecherche.css |
---|
93,6 → 93,14 |
left: 25px; |
} |
.casePnInscritsSeulement { |
float: left; |
} |
.labelPnInscritsSeulement { |
margin-top: 4px; |
} |
.zoneRecherche { |
} |
.zoneRss { |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRechercheVue.ui.xml |
---|
90,6 → 90,9 |
<g:Button styleName="{style.boutonRecherche} {style.rechercherAvance}" ui:field="boutonRechercheAvancee" text="{constants.rechercher}"></g:Button> |
<g:HTMLPanel styleName="nettoyage" /> |
<g:CheckBox ui:field="casePnInscritsSeulement" styleName="{style.casePnInscritsSeulement}"></g:CheckBox> |
<g:Label text="{constants.pnInscritsSeulement}" ui:field="labelPnInscritsSeulement" styleName="{style.labelPnInscritsSeulement}" /> |
</g:HTMLPanel> |
<g:HTMLPanel styleName="droite"> |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRecherchePresenteur.java |
---|
56,6 → 56,8 |
public String getContientMots(); |
public boolean getPnInscritsSeulement(); |
public String getDepartement(); |
public HasWidgets getCommune(); |
78,6 → 80,8 |
public void setContientMots(String mots); |
public void setPnInscritsSeulement(boolean valeur); |
public void setValeurDepartement(String dpt); |
public void chargerValeursRecherchePrecedente(InformationsRecherche informationsRecherche); |
382,6 → 386,7 |
informationRecherche.setDate(vue.getDate()); |
informationRecherche.setReferentiel(vue.getReferentiel()); |
informationRecherche.setPays(vue.getPays()); |
informationRecherche.setPnInscritsSeulement(vue.getPnInscritsSeulement()); |
} |
if(CacheClient.getInstance().getReferentielNonModifiable()) { |
/trunk/src/org/tela_botanica/del/client/composants/moteurrecherche/MoteurRechercheVue.java |
---|
14,6 → 14,7 |
import com.google.gwt.user.client.DOM; |
import com.google.gwt.user.client.ui.Button; |
import com.google.gwt.user.client.ui.Composite; |
import com.google.gwt.user.client.ui.CheckBox; |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.Label; |
import com.google.gwt.user.client.ui.ListBox; |
40,7 → 41,7 |
@UiField |
Panel rechercheAvancee, taxon, commune, zoneRss, conteneurMotCle, conteneurMotCleCel, conteneurMotCleDel ; |
@UiField |
Label lienRechercheAvancee, recherchePrecedente; |
Label lienRechercheAvancee, recherchePrecedente, labelPnInscritsSeulement; |
@UiField |
Button boutonRecherche, boutonRechercheAvancee, boutonFermer, boutonVider; |
@UiField |
47,6 → 48,8 |
TextBox recherchePrincipale, contientMots, departement, famille, genre, motCle, motCleCel, motCleDel, auteur, date; |
@UiField |
ListBox referentiel, pays; |
@UiField |
CheckBox casePnInscritsSeulement; |
public MoteurRechercheVue(String labelRecherche) { |
initWidget(uiBinder.createAndBindUi(this)); |
135,6 → 138,14 |
contientMots.setText(mots); |
} |
public boolean getPnInscritsSeulement() { |
return casePnInscritsSeulement.getValue(); |
} |
public void setPnInscritsSeulement(boolean valeur) { |
casePnInscritsSeulement.setValue(valeur); |
} |
public String getPays() { |
return pays.getValue(pays.getSelectedIndex()); |
} |
209,6 → 220,7 |
motCleDel.setText(informationsRecherche.getMotClefDel()); |
auteur.setText(informationsRecherche.getAuteur()); |
date.setText(informationsRecherche.getDate()); |
casePnInscritsSeulement.setValue(informationsRecherche.getPnInscritsSeulement()); |
for(int i = 0; i < referentiel.getItemCount(); i++) { |
if(referentiel.getValue(i).equals(informationsRecherche.getReferentiel())) { |
286,6 → 298,9 |
if (informationRecherche.getReferentiel() != null && !informationRecherche.getReferentiel().equals("")) { |
texteRecherchePrecedente.append(I18n.getVocabulary().referentiel() + ":" + informationRecherche.getReferentiel() + " "); |
} |
if (informationRecherche.getPnInscritsSeulement()) { |
texteRecherchePrecedente.append(I18n.getVocabulary().pnISCourt() + ":non"); |
} |
recherchePrecedente.setText(texteRecherchePrecedente.toString()); |
} |
/trunk/src/org/tela_botanica/del/client/modeles/InformationsRecherche.java |
---|
1,6 → 1,7 |
package org.tela_botanica.del.client.modeles; |
import org.tela_botanica.del.client.config.Config; |
import org.tela_botanica.del.client.Del; |
import com.google.gwt.http.client.URL; |
import com.google.gwt.user.client.Window; |
32,6 → 33,8 |
private String commune; |
private boolean pnInscritsSeulement; |
private String famille; |
private String tag; |
128,6 → 131,14 |
return pays; |
} |
public boolean getPnInscritsSeulement() { |
return pnInscritsSeulement; |
} |
public void setPnInscritsSeulement(boolean pnInscritsSeulement) { |
this.pnInscritsSeulement = pnInscritsSeulement; |
} |
public String getCommune() { |
return commune; |
} |
246,6 → 257,8 |
chaine += estNonNull(famille) ? "&masque.famille=" + URL.encodeQueryString(famille) : ""; |
chaine += estNonNull(auteur) ? "&masque.auteur=" + URL.encodeQueryString(auteur) : ""; |
chaine += estNonNull(pays) ? "&masque.pays=" + URL.encodeQueryString(pays) : ""; |
Del.LogVersFirebug("Avant de composer l'URL, pninscritsseulement vaut : " + pnInscritsSeulement); |
chaine += "&masque.pninscritsseulement=" + (pnInscritsSeulement ? URL.encodeQueryString("1") : URL.encodeQueryString("0")); |
String urlCourante = Window.Location.getHref(); |
Config config = new Config(); |
/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.properties |
---|
230,6 → 230,8 |
pays = Pays |
commune = Commune |
famille = Famille (Latin) |
pnInscritsSeulement = Masquer les observations smartphone anonymes |
pnISCourt = Obs mobiles anonymes |
tag = Tag |
tagDel = Tag pictoflora |
tagCel = Tag cel |
/trunk/src/org/tela_botanica/del/client/i18n/Vocabulary.java |
---|
394,6 → 394,24 |
String departement(); |
/** |
* Translated "Masquer les observations smartphone anonymes". |
* |
* @return translated "Masquer les observations smartphone anonymes" |
*/ |
@DefaultStringValue("Masquer les observations smartphone anonymes") |
@Key("pnInscritsSeulement") |
String pnInscritsSeulement(); |
/** |
* Translated "Obs mobiles anonymes". |
* |
* @return translated "Obs mobiles anonymes" |
*/ |
@DefaultStringValue("Obs mobiles anonymes") |
@Key("pnISCourt") |
String pnISCourt(); |
/** |
* Translated "Détermination la plus probable : ". |
* |
* @return translated "Détermination la plus probable : " |
/trunk/src/org/tela_botanica/del/client/cache/CacheClient.java |
---|
14,6 → 14,7 |
import org.tela_botanica.del.client.modeles.Protocole; |
import org.tela_botanica.del.client.modeles.Utilisateur; |
import org.tela_botanica.del.client.utils.URLUtils; |
import org.tela_botanica.del.client.Del; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.dom.client.Document; |
112,6 → 113,17 |
String statutParam = Location.getParameter("masque.type"); |
String paysParam = Location.getParameter("masque.pays"); |
String pnInscritsSeulement = Location.getParameter("masque.pninscritsseulement"); |
// filtrage par défaut |
boolean pnInscritsSeulementBool = true; |
if (pnInscritsSeulement != null) { |
Del.LogVersFirebug("le paramètre n'était pas NULL; on le teste"); |
// un jour on aura "0" et ça annulera le paramètre par défaut |
pnInscritsSeulementBool = pnInscritsSeulement.equals("1"); |
Del.LogVersFirebug("Il vaut : " + pnInscritsSeulementBool); |
} |
String page = Location.getParameter("page"); |
Integer pageInt = null; |
try { |
141,6 → 153,7 |
rechercheParArguments.setDate(date); |
rechercheParArguments.setTag(tag); |
rechercheParArguments.setPays(paysParam); |
rechercheParArguments.setPnInscritsSeulement(pnInscritsSeulementBool); |
if (protocole != null && !protocole.equals("")) { |
CacheClient.getInstance().setIdProtocoleEnAttente(protocole); |
/trunk |
---|
Property changes: |
Modified: svn:mergeinfo |
Merged /branches/v1.10-sodium:r2138-2139 |