Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
Merge origin/master
Browse files Browse the repository at this point in the history
  • Loading branch information
miledrousset committed Sep 7, 2016
2 parents 6163c12 + f14d867 commit 13a7d94
Show file tree
Hide file tree
Showing 12 changed files with 308 additions and 103 deletions.
57 changes: 50 additions & 7 deletions src/main/java/mom/trd/opentheso/SelectedBeans/SelectedTerme.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import mom.trd.opentheso.bdd.helper.nodes.NodeImage;
import mom.trd.opentheso.bdd.helper.nodes.NodeMetaData;
import mom.trd.opentheso.bdd.helper.nodes.NodeNT;
import mom.trd.opentheso.bdd.helper.nodes.NodeNTier;
import mom.trd.opentheso.bdd.helper.nodes.NodePermute;
import mom.trd.opentheso.bdd.helper.nodes.NodeRT;
import mom.trd.opentheso.bdd.helper.nodes.concept.NodeConcept;
Expand Down Expand Up @@ -158,6 +159,7 @@ public class SelectedTerme implements Serializable {
private NodePermute nodePe;

private String identifierType;
public String icon = "+";

// Variables resourcesBundle
String cheminNotice1;
Expand Down Expand Up @@ -521,6 +523,20 @@ private void majTSpeConcept() {
}
}

public void majTSpeConceptOrder() {
termesSpecifique = new ArrayList<>();
ArrayList<NodeNT> tempNT = new RelationsHelper().getListNTOrderByDate(connect.getPoolConnexion(), idC, idTheso, idlangue);
for (NodeNT nnt : tempNT) {
HashMap<String, String> tempMap1 = new HashMap<>();
if (nnt.getStatus().equals("hidden")) {
tempMap1.put(nnt.getIdConcept(), "<del>" + nnt.getTitle() + "</del>");
} else {
tempMap1.put(nnt.getIdConcept(), nnt.getTitle());
}
termesSpecifique.addAll(tempMap1.entrySet());
}
}

private void majTGen() {
termeGenerique = new ArrayList<>();
// On ajoute le domaine
Expand Down Expand Up @@ -1348,7 +1364,7 @@ public void editDef() {
} else {
new NoteHelper().addTermNote(connect.getPoolConnexion(), idT, idlangue, idTheso, definition, "definition", idUser);
}
vue.setAddNote(0);
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info3")));
}

Expand All @@ -1367,7 +1383,7 @@ public void editNote() {
} else {
new NoteHelper().addConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, note, "note", idUser);
}
vue.setAddNote(0);
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info12")));
}
/**
Expand Down Expand Up @@ -1468,7 +1484,7 @@ public void editNoteApp() {
} else {
new NoteHelper().addConceptNote(connect.getPoolConnexion(), idC, idlangue, idTheso, noteApplication, "scopeNote", idUser);
}
vue.setAddNote(0);
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info12")));
}

Expand All @@ -1486,7 +1502,7 @@ public void editNoteHisto() {
} else {
new NoteHelper().addTermNote(connect.getPoolConnexion(), idT, idlangue, idTheso, noteHistorique, "historyNote", idUser);
}
vue.setAddNote(0);
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info12")));
}

Expand All @@ -1505,7 +1521,7 @@ public void editNoteEdit() {
} else {
new NoteHelper().addTermNote(connect.getPoolConnexion(), idT, idlangue, idTheso, noteEditoriale, "editorialNote", idUser);
}
vue.setAddNote(0);
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info5")));
}

Expand Down Expand Up @@ -1552,7 +1568,7 @@ public void delSyno(String value, String status) {
public void delTrad(String lang) {
new TermHelper().deleteTraductionOfTerm(connect.getPoolConnexion(), idT, lang, idTheso, user.getUser().getId());
majLangueConcept();
vue.setAddTrad(0);
majNotes();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(langueBean.getMsg("info") + " :", langueBean.getMsg("sTerme.info10")));
}

Expand Down Expand Up @@ -1944,6 +1960,25 @@ public boolean initConceptFusion() {

return true;
}

/**
* Permet de voir les nouvelles notes et changer l'icon pour pouvoir voir
* touts les notes dans les autres langues;
*/
public void valide(){
if (allLangue==true){
allLangue=false;
majNotes();
icon="+";
}
else{
allLangue=true;

majNotes2();
icon="-";
}
}


/**
* Renvoie le type du concept générique
Expand Down Expand Up @@ -2798,7 +2833,15 @@ public boolean isAllLangue() {

public void setAllLangue(boolean allLangue) {
this.allLangue = allLangue;
}
}


public String getIcon() {
return icon;
}

public void setIcon(String icon) {
this.icon = icon;
}

}
Loading

0 comments on commit 13a7d94

Please sign in to comment.