Compare commits
2 Commits
572a7b2282
...
b34045ad34
| Author | SHA1 | Date |
|---|---|---|
|
|
b34045ad34 | |
|
|
0cf2c6c19e |
|
|
@ -1,6 +1,9 @@
|
|||
package fr.geoffrey.medical_training_tracker.controller;
|
||||
|
||||
import static fr.geoffrey.medical_training_tracker.controller.IndexController.MODEL_MAP_NAVBAR_PAGE;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.Animal;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.Care;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.ConsentBehavior;
|
||||
import fr.geoffrey.medical_training_tracker.services.IServiceAnimal;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
|
@ -23,6 +26,8 @@ public class AnimalController {
|
|||
public static final String MODEL_MAP_ANIMAL_CARE_ID = "MODEL_MAP_ANIMAL_CARE_ID";
|
||||
public static final String MODEL_MAP_ANIMAL_CONSENT_BEHAVIOR_ID = "MODEL_MAP_ANIMAL_CONSENT_BEHAVIOR_ID";
|
||||
public static final String MODEL_MAP_PROGRESSION = "MODEL_MAP_PROGRESSION";
|
||||
public static final String MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS = "MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS";
|
||||
public static final String MODEL_MAP_LIST_REMAINING_CARES = "MODEL_MAP_LIST_REMAINING_CARES";
|
||||
|
||||
@Autowired
|
||||
IServiceAnimal serviceAnimal;
|
||||
|
|
@ -39,6 +44,8 @@ public class AnimalController {
|
|||
UserDetails userDetails = (UserDetails) oUserDetails;
|
||||
List<Animal> animals = serviceAnimal.getAnimals(userDetails.getUsername());
|
||||
pModel.addAttribute(MODEL_MAP_ANIMAL_LIST, animals);
|
||||
|
||||
pModel.addAttribute(MODEL_MAP_NAVBAR_PAGE, IndexController.MODEL_MAP_NAVBAR_PAGE_VALUE_MY_ANIMALS);
|
||||
}
|
||||
|
||||
ret = IndexController.PAGE_ANIMAL_LIST;
|
||||
|
|
@ -211,6 +218,55 @@ public class AnimalController {
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@RequestMapping(value = IndexController.URL_ANIMAL_PROGRESSION_ADD, method = RequestMethod.POST)
|
||||
public String doPostAddProgression(final ModelMap pModel, HttpSession httpSession,
|
||||
@PathVariable(value = "animal_id") final int animalId,
|
||||
@RequestParam(name = "care_id", required = true) int careId,
|
||||
@RequestParam(name = "consent_behavior_id", required = true) int consentBehaviorId) {
|
||||
String ret;
|
||||
|
||||
if (LoginController.isUserAlreadyAuth(httpSession)) {
|
||||
Authentication authentication = (Authentication) httpSession.getAttribute(IndexController.SESSION_ATTRIBUTE_AUTHENTICATION);
|
||||
Object oUserDetails = authentication.getPrincipal();
|
||||
if (oUserDetails instanceof UserDetails) {
|
||||
UserDetails userDetails = (UserDetails) oUserDetails;
|
||||
|
||||
serviceAnimal.addProgression(animalId, careId, consentBehaviorId);
|
||||
}
|
||||
|
||||
// TODO Where do redirection ?
|
||||
ret = IndexController.URL_REDIRECT + IndexController.URL_ANIMAL_CARES_AND_BEHAVIORS_LIST.replaceAll("\\{animal_id\\}", animalId + "");
|
||||
} else {
|
||||
ret = IndexController.URL_REDIRECT + IndexController.URL_LOGIN;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@RequestMapping(value = IndexController.URL_ANIMAL_PROGRESSION_DELETE, method = RequestMethod.POST)
|
||||
public String doPostDeleteProgression(final ModelMap pModel, HttpSession httpSession,
|
||||
@PathVariable(value = "animal_id") final int animalId,
|
||||
@PathVariable(value = "progression_id") final int progressionId) {
|
||||
String ret;
|
||||
|
||||
if (LoginController.isUserAlreadyAuth(httpSession)) {
|
||||
Authentication authentication = (Authentication) httpSession.getAttribute(IndexController.SESSION_ATTRIBUTE_AUTHENTICATION);
|
||||
Object oUserDetails = authentication.getPrincipal();
|
||||
if (oUserDetails instanceof UserDetails) {
|
||||
UserDetails userDetails = (UserDetails) oUserDetails;
|
||||
|
||||
serviceAnimal.deleteAnimalProgression(animalId, userDetails.getUsername(), progressionId);
|
||||
}
|
||||
|
||||
// TODO Where do redirection ?
|
||||
ret = IndexController.URL_REDIRECT + IndexController.URL_ANIMAL_CARES_AND_BEHAVIORS_LIST.replaceAll("\\{animal_id\\}", animalId + "");
|
||||
} else {
|
||||
ret = IndexController.URL_REDIRECT + IndexController.URL_LOGIN;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
@RequestMapping(value = IndexController.URL_ANIMAL_CARE, method = RequestMethod.GET)
|
||||
|
|
@ -231,6 +287,12 @@ public class AnimalController {
|
|||
List<Animal> animals = serviceAnimal.getAnimals(userDetails.getUsername());
|
||||
pModel.addAttribute(MODEL_MAP_ANIMAL_LIST, animals);
|
||||
|
||||
List<ConsentBehavior> listRemainingConsentBehaviors = serviceAnimal.getAnimalConsentBehaviors(userDetails.getUsername(), animalId);
|
||||
for (ConsentBehavior cb: animal.getListConsentBehavior()) {
|
||||
listRemainingConsentBehaviors.remove(cb);
|
||||
}
|
||||
pModel.addAttribute(MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS, listRemainingConsentBehaviors);
|
||||
|
||||
pModel.addAttribute(MODEL_MAP_ANIMAL_CARE_ID, careId);
|
||||
}
|
||||
|
||||
|
|
@ -260,6 +322,12 @@ public class AnimalController {
|
|||
List<Animal> animals = serviceAnimal.getAnimals(userDetails.getUsername());
|
||||
pModel.addAttribute(MODEL_MAP_ANIMAL_LIST, animals);
|
||||
|
||||
List<Care> listRemainingCares = serviceAnimal.getAnimalCares(userDetails.getUsername(), animalId);
|
||||
for (Care care: animal.getListCares()) {
|
||||
listRemainingCares.remove(care);
|
||||
}
|
||||
pModel.addAttribute(MODEL_MAP_LIST_REMAINING_CARES, listRemainingCares);
|
||||
|
||||
pModel.addAttribute(MODEL_MAP_ANIMAL_CONSENT_BEHAVIOR_ID, consentBehaviorId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,12 @@ public class IndexController {
|
|||
// Add URL
|
||||
public static final String URL_ANIMAL_CARES_ADD = "/animal/{animal_id}/add/care";
|
||||
public static final String URL_ANIMAL_CONSENT_BEHAVIOR_ADD = "/animal/{animal_id}/add/consent_behavior";
|
||||
public static final String URL_ANIMAL_PROGRESSION_ADD = "/animal/{animal_id}/add/progression";
|
||||
// Delete URL
|
||||
public static final String URL_ANIMAL_DELETE = "/animal/delete/{animal_id}";
|
||||
public static final String URL_ANIMAL_CARES_DELETE = "/animal/{animal_id}/delete/care/{care_id}";
|
||||
public static final String URL_ANIMAL_CONSENT_BEHAVIOR_DELETE = "/animal/{animal_id}/delete/consent_behavior/{consent_behavior_id}";
|
||||
public static final String URL_ANIMAL_PROGRESSION_DELETE = "/animal/{animal_id}/delete/progression/{progression_id}";
|
||||
|
||||
public static final String URL_REDIRECT = "redirect:";
|
||||
//</editor-fold>
|
||||
|
|
@ -62,6 +64,9 @@ public class IndexController {
|
|||
public static final String SESSION_ATTRIBUTE_LOGIN = "user";
|
||||
public static final String SESSION_ATTRIBUTE_AUTHENTICATION = "authentication";
|
||||
|
||||
public static final String MODEL_MAP_NAVBAR_PAGE = "MODEL_MAP_NAVBAR_PAGE";
|
||||
public static final String MODEL_MAP_NAVBAR_PAGE_VALUE_MY_ANIMALS = "MODEL_MAP_NAVBAR_PAGE_VALUE_MY_ANIMALS";
|
||||
|
||||
@Autowired
|
||||
IServiceAnimal serviceAnimal;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,4 +19,6 @@ public interface IProgressionDao extends CommonDao {
|
|||
public void fillAnimalProgressionByMe(Animal animal, String progressionByMe);
|
||||
public void fillAnimalProgressionBySomeoneElse(Animal animal, String progressionBySomeoneElse);
|
||||
public void fillAnimalProgressionByVeterinary(Animal animal, String progressionByVeterinary);
|
||||
|
||||
public void addProgression(int animalId, int careId, int consentBehaviorId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -493,4 +493,42 @@ public class ProgressionDao extends PostgresSqlDao implements IProgressionDao {
|
|||
}
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
@Override
|
||||
public void addProgression(int animalId, int careId, int consentBehaviorId) {
|
||||
Connection conn = null;
|
||||
PreparedStatement statement = null;
|
||||
try {
|
||||
conn = mDataSource.getConnection();
|
||||
statement = conn.prepareStatement("INSERT INTO "+TABLE_NAME+" (id, animal, care, consent_behavior, progression_by_me, progression_by_someone_else, progression_by_veterinary) VALUES (nextval(?), ?, ?, ?, ?, ?, ?);");
|
||||
statement.setString(1, SEQUENCE_NAME);
|
||||
statement.setInt(2, animalId);
|
||||
statement.setInt(3, careId);
|
||||
statement.setInt(4, consentBehaviorId);
|
||||
statement.setString(5, Progression.PROGRESSION_VALUE_NOT_TRAINED);
|
||||
statement.setString(6, Progression.PROGRESSION_VALUE_NOT_TRAINED);
|
||||
statement.setString(7, Progression.PROGRESSION_VALUE_NOT_TRAINED);
|
||||
System.out.println(IndexController.LOG_TAG + " SQL -> " + statement.toString());
|
||||
statement.executeUpdate();
|
||||
} catch (SQLException ex) {
|
||||
System.err.println(IndexController.LOG_TAG + " SQLException -> addProgression()");
|
||||
System.err.println(ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
if (statement != null) {
|
||||
try {
|
||||
statement.close();
|
||||
} catch (SQLException ex) {
|
||||
System.err.println(IndexController.LOG_TAG + " Failed close statement -> addProgression()");
|
||||
}
|
||||
}
|
||||
if (conn != null) {
|
||||
try {
|
||||
conn.close();
|
||||
} catch (SQLException ex) {
|
||||
System.err.println(IndexController.LOG_TAG + " Failed close connection -> addProgression()");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,29 @@ public class Care {
|
|||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
hash = 53 * hash + this.id;
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Care other = (Care) obj;
|
||||
if (this.id != other.id) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,29 @@ public class ConsentBehavior {
|
|||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 41 * hash + this.id;
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final ConsentBehavior other = (ConsentBehavior) obj;
|
||||
if (this.id != other.id) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package fr.geoffrey.medical_training_tracker.services;
|
||||
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.Animal;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.Care;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.ConsentBehavior;
|
||||
import java.util.List;
|
||||
|
||||
public interface IServiceAnimal {
|
||||
|
|
@ -10,11 +12,13 @@ public interface IServiceAnimal {
|
|||
public Animal getAnimalCareProgression(String owner, int animalId, int careId);
|
||||
public Animal getAnimalConsentBehaviorProgression(String owner, int animalId, int consentBehaviorId);
|
||||
public Animal getAnimalProgressionByMe(String username, int animalId, String progressionValue);
|
||||
public List<ConsentBehavior> getAnimalConsentBehaviors(String username, int animalId);
|
||||
public List<Care> getAnimalCares(String username, int animalId);
|
||||
|
||||
public void addAnimal(String name, String owner);
|
||||
public void addCare(int animalId, String name, String description);
|
||||
public void addConsentBehavior(int animalId, String name, String description);
|
||||
// public void addProgression(int animalId,, int careId, int consentBehaviorId)
|
||||
public void addProgression(int animalId, int careId, int consentBehaviorId);
|
||||
|
||||
public void deleteAnimal(int animalId, String owner);
|
||||
public void deleteAnimalCare(int animalId, String owner, int careId);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import fr.geoffrey.medical_training_tracker.dao.ICareDao;
|
|||
import fr.geoffrey.medical_training_tracker.dao.IConsentBehaviorDao;
|
||||
import fr.geoffrey.medical_training_tracker.dao.IProgressionDao;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.Animal;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.Care;
|
||||
import fr.geoffrey.medical_training_tracker.dao.bean.ConsentBehavior;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -115,4 +117,19 @@ public class ServiceAnimal implements IServiceAnimal {
|
|||
}
|
||||
return animal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ConsentBehavior> getAnimalConsentBehaviors(String username, int animalId) {
|
||||
return consentBehaviorDao.getAllAnialConsentBehavior(username, animalId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Care> getAnimalCares(String username, int animalId) {
|
||||
return careDao.getAllAnimalCares(username, animalId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addProgression(int animalId, int careId, int consentBehaviorId) {
|
||||
progressionDao.addProgression(animalId, careId, consentBehaviorId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="paw"
|
||||
class="svg-inline--fa fa-paw fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="multiple-paw-solid-white.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1027"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83984375"
|
||||
inkscape:cx="198.7426"
|
||||
inkscape:cy="253.92702"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4"
|
||||
inkscape:document-rotation="0" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m 383.57287,284.5534 c -38.46568,0 -93.00355,59.46414 -93.00355,96.99979 0,16.90534 12.98659,27.00494 34.75039,27.00494 23.65778,0 39.27946,-12.14859 58.25316,-12.14859 19.13838,0 34.80367,12.14859 58.25316,12.14859 21.7638,0 34.75039,-10.0996 34.75039,-27.00494 0,-37.53565 -54.53786,-96.99979 -93.00355,-96.99979 z m -71.34147,-6.10821 c -5.03769,-16.78423 -20.55766,-27.65402 -34.6632,-24.28264 -14.10554,3.37138 -21.45379,19.70997 -16.41609,36.4942 5.03769,16.78424 20.55765,27.65403 34.66319,24.28265 14.10554,-3.37138 21.45379,-19.70997 16.4161,-36.49421 z m 41.03782,-10.06569 c 14.98713,-3.94296 22.48554,-24.19061 16.75032,-45.22298 -5.73522,-21.03236 -22.53398,-34.88117 -37.52112,-30.93821 -14.98713,3.94296 -22.48554,24.19061 -16.75032,45.22298 5.73521,21.03236 22.53882,34.88602 37.52112,30.93821 z M 489.5727,254.1674 c -14.10554,-3.37138 -29.62067,7.4984 -34.6632,24.28264 -5.03769,16.78423 2.31055,33.12283 16.41609,36.4942 14.10554,3.37138 29.62067,-7.49841 34.6632,-24.28264 5.03769,-16.78424 -2.31056,-33.12283 -16.41609,-36.4942 z m -75.69618,14.2121 c 14.98714,3.94296 31.78591,-9.90585 37.52113,-30.93821 5.73521,-21.03237 -1.7632,-41.27517 -16.75033,-45.22298 -14.98714,-3.94781 -31.7859,9.90585 -37.52112,30.93821 -5.73522,21.03237 1.76319,41.28002 16.75032,45.22298 z"
|
||||
id="path2"
|
||||
style="stroke-width:0.484394;fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m 147.64894,364.33367 c -38.4657,0 -93.003555,59.46414 -93.003555,96.99979 0,16.90534 12.98659,27.00494 34.75039,27.00494 23.657775,0 39.279465,-12.14859 58.253165,-12.14859 19.13838,0 34.80367,12.14859 58.25316,12.14859 21.7638,0 34.75039,-10.0996 34.75039,-27.00494 0,-37.53565 -54.53786,-96.99979 -93.00355,-96.99979 z m -71.341475,-6.10821 c -5.03769,-16.78423 -20.55766,-27.65402 -34.6632,-24.28264 -14.10554,3.37138 -21.45379,19.70997 -16.4161,36.4942 5.0377,16.78424 20.55766,27.65403 34.6632,24.28265 14.10554,-3.37138 21.45379,-19.70997 16.4161,-36.49421 z m 41.037805,-10.06569 c 14.98715,-3.94296 22.48556,-24.19061 16.75034,-45.22298 -5.73522,-21.03236 -22.53399,-34.88117 -37.521125,-30.93821 -14.98713,3.94296 -22.48554,24.19061 -16.75033,45.22298 5.73522,21.03236 22.538825,34.88602 37.521115,30.93821 z m 136.3035,-14.21211 c -14.10554,-3.37138 -29.62067,7.49841 -34.6632,24.28265 -5.03769,16.78423 2.31055,33.12283 16.41609,36.4942 14.10554,3.37138 29.62067,-7.49841 34.6632,-24.28264 5.03769,-16.78424 -2.31056,-33.12283 -16.41609,-36.49421 z m -75.69618,14.21211 c 14.98714,3.94296 31.78591,-9.90585 37.52113,-30.93821 5.73521,-21.03237 -1.7632,-41.27517 -16.75033,-45.22298 -14.98714,-3.94781 -31.7859,9.90585 -37.52112,30.93821 -5.73522,21.03237 1.76319,41.28002 16.75032,45.22298 z"
|
||||
id="path2-2"
|
||||
style="stroke-width:0.484394;fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m 186.94196,110.71507 c -38.46568,0 -93.003551,59.46415 -93.003551,96.9998 0,16.90534 12.986591,27.00494 34.750391,27.00494 23.65778,0 39.27946,-12.14859 58.25316,-12.14859 19.13838,0 34.80367,12.14859 58.25316,12.14859 21.7638,0 34.75039,-10.0996 34.75039,-27.00494 0,-37.53565 -54.53786,-96.9998 -93.00355,-96.9998 z m -71.34147,-6.10821 C 110.5628,87.822633 95.042829,76.952843 80.937286,80.324223 c -14.10554,3.37138 -21.45379,19.709967 -16.41609,36.494207 5.03769,16.78424 20.55766,27.65403 34.663193,24.28265 14.105541,-3.37138 21.453791,-19.70997 16.416101,-36.49422 z m 41.03782,-10.065687 c 14.98713,-3.94296 22.48554,-24.19062 16.75032,-45.22298 -5.73522,-21.03237 -22.53398,-34.881179 -37.52112,-30.938209 -14.98713,3.94296 -22.48554,24.190609 -16.75032,45.222969 5.73522,21.03237 22.53883,34.88603 37.52112,30.93822 z m 136.30348,-14.21211 c -14.10554,-3.37138 -29.62067,7.49841 -34.6632,24.282647 -5.03769,16.78424 2.31055,33.12284 16.41609,36.49421 14.10554,3.37138 29.62067,-7.49841 34.6632,-24.28264 5.03769,-16.78425 -2.31056,-33.122837 -16.41609,-36.494217 z m -75.69618,14.21211 c 14.98714,3.94296 31.78591,-9.90585 37.52113,-30.93822 5.73521,-21.03236 -1.7632,-41.275169 -16.75033,-45.222969 -14.98714,-3.94781 -31.7859,9.905839 -37.52112,30.938209 -5.73522,21.03236 1.76319,41.28002 16.75032,45.22298 z"
|
||||
id="path2-24"
|
||||
style="stroke-width:0.484394;fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="paw"
|
||||
class="svg-inline--fa fa-paw fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="multiple-paw-solid.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1027"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83984375"
|
||||
inkscape:cx="198.7426"
|
||||
inkscape:cy="253.92702"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4"
|
||||
inkscape:document-rotation="0" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m 147.64409,284.5534 c 38.46568,0 93.00355,59.46414 93.00355,96.99979 0,16.90534 -12.98659,27.00494 -34.75039,27.00494 -23.65778,0 -39.27946,-12.14859 -58.25316,-12.14859 -19.13838,0 -34.80367,12.14859 -58.253165,12.14859 -21.7638,0 -34.75039,-10.0996 -34.75039,-27.00494 0,-37.53565 54.537865,-96.99979 93.003555,-96.99979 z m 71.34147,-6.10821 c 5.03769,-16.78423 20.55766,-27.65402 34.6632,-24.28264 14.10554,3.37138 21.45379,19.70997 16.41609,36.4942 -5.03769,16.78424 -20.55765,27.65403 -34.66319,24.28265 -14.10554,-3.37138 -21.45379,-19.70997 -16.4161,-36.49421 z M 177.94774,268.3795 c -14.98713,-3.94296 -22.48554,-24.19061 -16.75032,-45.22298 5.73522,-21.03236 22.53398,-34.88117 37.52112,-30.93821 14.98713,3.94296 22.48554,24.19061 16.75032,45.22298 -5.73521,21.03236 -22.53882,34.88602 -37.52112,30.93821 z M 41.644255,254.1674 c 14.10554,-3.37138 29.62067,7.4984 34.6632,24.28264 5.03769,16.78423 -2.31055,33.12283 -16.41609,36.4942 -14.10554,3.37138 -29.62067,-7.49841 -34.6632,-24.28264 -5.03769,-16.78424 2.31056,-33.12283 16.41609,-36.4942 z m 75.696185,14.2121 c -14.98714,3.94296 -31.785915,-9.90585 -37.521135,-30.93821 -5.73521,-21.03237 1.7632,-41.27517 16.75033,-45.22298 14.987145,-3.94781 31.785905,9.90585 37.521125,30.93821 5.73522,21.03237 -1.76319,41.28002 -16.75032,45.22298 z"
|
||||
id="path2"
|
||||
style="fill:#9d9d9d;fill-opacity:1;stroke-width:0.484394" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m 383.56802,364.33367 c 38.4657,0 93.00355,59.46414 93.00355,96.99979 0,16.90534 -12.98659,27.00494 -34.75039,27.00494 -23.65777,0 -39.27946,-12.14859 -58.25316,-12.14859 -19.13838,0 -34.80367,12.14859 -58.25316,12.14859 -21.7638,0 -34.75039,-10.0996 -34.75039,-27.00494 0,-37.53565 54.53786,-96.99979 93.00355,-96.99979 z m 71.34147,-6.10821 c 5.03769,-16.78423 20.55766,-27.65402 34.6632,-24.28264 14.10554,3.37138 21.45379,19.70997 16.4161,36.4942 -5.0377,16.78424 -20.55766,27.65403 -34.6632,24.28265 -14.10554,-3.37138 -21.45379,-19.70997 -16.4161,-36.49421 z m -41.0378,-10.06569 c -14.98715,-3.94296 -22.48556,-24.19061 -16.75034,-45.22298 5.73522,-21.03236 22.53399,-34.88117 37.52112,-30.93821 14.98713,3.94296 22.48554,24.19061 16.75033,45.22298 -5.73522,21.03236 -22.53882,34.88602 -37.52111,30.93821 z m -136.3035,-14.21211 c 14.10554,-3.37138 29.62067,7.49841 34.6632,24.28265 5.03769,16.78423 -2.31055,33.12283 -16.41609,36.4942 -14.10554,3.37138 -29.62067,-7.49841 -34.6632,-24.28264 -5.03769,-16.78424 2.31056,-33.12283 16.41609,-36.49421 z m 75.69618,14.21211 c -14.98714,3.94296 -31.78591,-9.90585 -37.52113,-30.93821 -5.73521,-21.03237 1.7632,-41.27517 16.75033,-45.22298 14.98714,-3.94781 31.7859,9.90585 37.52112,30.93821 5.73522,21.03237 -1.76319,41.28002 -16.75032,45.22298 z"
|
||||
id="path2-2"
|
||||
style="fill:#9d9d9d;fill-opacity:1;stroke-width:0.484394" />
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="m 344.275,110.71507 c 38.46568,0 93.00355,59.46415 93.00355,96.9998 0,16.90534 -12.98659,27.00494 -34.75039,27.00494 -23.65778,0 -39.27946,-12.14859 -58.25316,-12.14859 -19.13838,0 -34.80367,12.14859 -58.25316,12.14859 -21.7638,0 -34.75039,-10.0996 -34.75039,-27.00494 0,-37.53565 54.53786,-96.9998 93.00355,-96.9998 z m 71.34147,-6.10821 c 5.03769,-16.784227 20.55766,-27.654017 34.6632,-24.282637 14.10554,3.37138 21.45379,19.709967 16.41609,36.494207 -5.03769,16.78424 -20.55766,27.65403 -34.66319,24.28265 -14.10554,-3.37138 -21.45379,-19.70997 -16.4161,-36.49422 z M 374.57865,94.541173 c -14.98713,-3.94296 -22.48554,-24.19062 -16.75032,-45.22298 5.73522,-21.03237 22.53398,-34.881179 37.52112,-30.938209 14.98713,3.94296 22.48554,24.190609 16.75032,45.222969 -5.73522,21.03237 -22.53883,34.88603 -37.52112,30.93822 z M 238.27517,80.329063 c 14.10554,-3.37138 29.62067,7.49841 34.6632,24.282647 5.03769,16.78424 -2.31055,33.12284 -16.41609,36.49421 -14.10554,3.37138 -29.62067,-7.49841 -34.6632,-24.28264 -5.03769,-16.78425 2.31056,-33.122837 16.41609,-36.494217 z m 75.69618,14.21211 c -14.98714,3.94296 -31.78591,-9.90585 -37.52113,-30.93822 -5.73521,-21.03236 1.7632,-41.275169 16.75033,-45.222969 14.98714,-3.94781 31.7859,9.905839 37.52112,30.938209 5.73522,21.03236 -1.76319,41.28002 -16.75032,45.22298 z"
|
||||
id="path2-24"
|
||||
style="fill:#9d9d9d;fill-opacity:1;stroke-width:0.484394" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
|
|
@ -0,0 +1 @@
|
|||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="paw" class="svg-inline--fa fa-paw fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 224c-79.41 0-192 122.76-192 200.25 0 34.9 26.81 55.75 71.74 55.75 48.84 0 81.09-25.08 120.26-25.08 39.51 0 71.85 25.08 120.26 25.08 44.93 0 71.74-20.85 71.74-55.75C448 346.76 335.41 224 256 224zm-147.28-12.61c-10.4-34.65-42.44-57.09-71.56-50.13-29.12 6.96-44.29 40.69-33.89 75.34 10.4 34.65 42.44 57.09 71.56 50.13 29.12-6.96 44.29-40.69 33.89-75.34zm84.72-20.78c30.94-8.14 46.42-49.94 34.58-93.36s-46.52-72.01-77.46-63.87-46.42 49.94-34.58 93.36c11.84 43.42 46.53 72.02 77.46 63.87zm281.39-29.34c-29.12-6.96-61.15 15.48-71.56 50.13-10.4 34.65 4.77 68.38 33.89 75.34 29.12 6.96 61.15-15.48 71.56-50.13 10.4-34.65-4.77-68.38-33.89-75.34zm-156.27 29.34c30.94 8.14 65.62-20.45 77.46-63.87 11.84-43.42-3.64-85.21-34.58-93.36s-65.62 20.45-77.46 63.87c-11.84 43.42 3.64 85.22 34.58 93.36z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1013 B |
|
|
@ -3,11 +3,13 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<spring:url value="/animal/${MODEL_MAP_ANIMAL.getId()}/delete/progression" var="animalDeleteProgressionURL" />
|
||||
<spring:url value="/animal/${MODEL_MAP_ANIMAL.getId()}/add/progression" var="animalAddProgressionURL" />
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp" %>
|
||||
<style type="text/css">
|
||||
|
|
@ -34,6 +36,7 @@
|
|||
<h4>${MODEL_MAP_ANIMAL.getConsentBehaviorById(MODEL_MAP_ANIMAL_CONSENT_BEHAVIOR_ID).getName()}</h4>
|
||||
<p>${MODEL_MAP_ANIMAL.getConsentBehaviorById(MODEL_MAP_ANIMAL_CONSENT_BEHAVIOR_ID).getDescription()}</p>
|
||||
<h4>Progression</h4>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -41,6 +44,7 @@
|
|||
<th>Réalisé par moi</th>
|
||||
<th>Réalisé par quelqu'un d'autre</th>
|
||||
<th>Réalisé par le vétérinaire</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -62,10 +66,32 @@
|
|||
<c:if test="${progression.getProgressionByVeterinary() == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||
<c:if test="${progression.getProgressionByVeterinary() == 'NOT_TRAINED'}">active</c:if>
|
||||
">${progression.getProgressionByVeterinary()}</td>
|
||||
<td>
|
||||
<!--TODO MODIFICATION-->
|
||||
<form class="pull-right" action="${animalDeleteProgressionURL}/${progression.getId()}" method="POST">
|
||||
<button class="btn btn-danger" type="submit" data-toggle="tooltip" data-placement="bottom" title="Suppression"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr/>
|
||||
<h4>Ajouter un soins pour ce comportement de consentement</h4>
|
||||
<form class="form-inline" action="${animalAddProgressionURL}" method="POST">
|
||||
<label class="sr-only" for="form_consent_behavior_id">Consent Behavior ID</label>
|
||||
<input id="form_consent_behavior_id" name="consent_behavior_id" value="${MODEL_MAP_ANIMAL_CONSENT_BEHAVIOR_ID}" hidden />
|
||||
<label class="sr-only" for="form_care_id">Care ID</label>
|
||||
<select id="form_care_id" class="form-control" name="care_id">
|
||||
<c:forEach items="${MODEL_MAP_LIST_REMAINING_CARES}" var="care">
|
||||
<option value="${care.getId()}">${care.getName()}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input id="form_care_id" name="care_id" value="${MODEL_MAP_ANIMAL_CONSENT_BEHAVIOR_ID}" hidden />
|
||||
<button class="btn btn-success" type="submit" data-toggle="tooltip" data-placement="bottom" title="Ajouter"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
|
||||
<%@ include file="base/footer.jsp" %>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<spring:url value="/animal/${MODEL_MAP_ANIMAL.getId()}/delete/progression" var="animalDeleteProgressionURL" />
|
||||
<spring:url value="/animal/${MODEL_MAP_ANIMAL.getId()}/add/progression" var="animalAddProgressionURL" />
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp" %>
|
||||
<style type="text/css">
|
||||
|
|
@ -34,6 +36,7 @@
|
|||
<h4>${MODEL_MAP_ANIMAL.getCareById(MODEL_MAP_ANIMAL_CARE_ID).getName()}</h4>
|
||||
<p>${MODEL_MAP_ANIMAL.getCareById(MODEL_MAP_ANIMAL_CARE_ID).getDescription()}</p>
|
||||
<h4>Progression</h4>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -41,6 +44,7 @@
|
|||
<th>Réalisé par moi</th>
|
||||
<th>Réalisé par quelqu'un d'autre</th>
|
||||
<th>Réalisé par le vétérinaire</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -66,10 +70,31 @@
|
|||
<c:if test="${progression.getProgressionByVeterinary() == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||
<c:if test="${progression.getProgressionByVeterinary() == 'NOT_TRAINED'}">active</c:if>
|
||||
">${progression.getProgressionByVeterinary()}</td>
|
||||
<td>
|
||||
<!--TODO MODIFICATION-->
|
||||
<form class="pull-right" action="${animalDeleteProgressionURL}/${progression.getId()}" method="POST">
|
||||
<button class="btn btn-danger" type="submit" data-toggle="tooltip" data-placement="bottom" title="Suppression"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr/>
|
||||
<h4>Ajouter un comportement de consentement pour ce soin</h4>
|
||||
<form class="form-inline" action="${animalAddProgressionURL}" method="POST">
|
||||
<label class="sr-only" for="form_care_id">Care ID</label>
|
||||
<input id="form_care_id" name="care_id" value="${MODEL_MAP_ANIMAL_CARE_ID}" hidden />
|
||||
<label class="sr-only" for="form_consent_behavior_id">Consent Behavior ID</label>
|
||||
<select id="form_consent_behavior_id" class="form-control" name="consent_behavior_id">
|
||||
<c:forEach items="${MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS}" var="consent_behavior">
|
||||
<option value="${consent_behavior.getId()}">${consent_behavior.getName()}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<button class="btn btn-success" type="submit" data-toggle="tooltip" data-placement="bottom" title="Ajouter"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
|
||||
<%@ include file="base/footer.jsp" %>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp" %>
|
||||
<style type="text/css">
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp" %>
|
||||
<style type="text/css">
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
<a class="list-group-item" href="${animalURL}/${animal.getId()}/cares_and_behaviors">
|
||||
${animal.getName()}
|
||||
<form class="pull-right" action="${animalDeleteURL}/${animal.getId()}" method="POST">
|
||||
<button class="btn btn-sm btn-danger" type="submit" data-toggle="tooltip" data-placement="bottom" title="Suppression"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
|
||||
<button class="btn btn-xs btn-danger" type="submit" data-toggle="tooltip" data-placement="bottom" title="Suppression"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
</a>
|
||||
<!-- <div class="list-group-item">
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp" %>
|
||||
<style type="text/css">
|
||||
|
|
@ -41,7 +41,11 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${MODEL_MAP_ANIMAL.getProgressionList()}" var="progression">
|
||||
<tr>
|
||||
<tr class="
|
||||
<c:if test="${MODEL_MAP_PROGRESSION == 'TRAINED'}">success</c:if>
|
||||
<c:if test="${MODEL_MAP_PROGRESSION == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||
<c:if test="${MODEL_MAP_PROGRESSION == 'NOT_TRAINED'}">active</c:if>
|
||||
">
|
||||
<td><a href="${animalURL}/${MODEL_MAP_ANIMAL.getId()}/care/${progression.getCare().getId()}">${progression.getCare().getName()}</a></td>
|
||||
<td><a href="${animalURL}/${MODEL_MAP_ANIMAL.getId()}/consent_behavior/${progression.getConsentBehavior().getId()}">${progression.getConsentBehavior().getName()}</a></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
<%@ page isELIgnored="false" %>
|
||||
|
||||
<spring:url value="/static/img/logo.png" var="logoPNG" />
|
||||
<spring:url value="/static/img/multiple-paw-solid.svg" var="pawSVG" />
|
||||
<spring:url value="/static/img/multiple-paw-solid-white.svg" var="whitePawSVG" />
|
||||
<spring:url value="/" var="indexURL" />
|
||||
<spring:url value="/animal" var="animalURL" />
|
||||
<spring:url value="/login" var="loginURL" />
|
||||
|
|
@ -29,7 +31,7 @@
|
|||
<ul class="nav navbar-nav">
|
||||
<% if (authentication != null) { %>
|
||||
<c:forEach items="${MODEL_MAP_ANIMAL_LIST}" var="animal">
|
||||
<li><a href="${animalURL}/${animal.getId()}/cares_and_behaviors">${animal.getName()}</a></li>
|
||||
<li <c:if test="${MODEL_MAP_ANIMAL.getId() == animal.getId()}">class="active"</c:if>><a href="${animalURL}/${animal.getId()}/cares_and_behaviors">${animal.getName()}</a></li>
|
||||
<!-- <li class="dropdown <c:if test="${MODEL_MAP_ANIMAL.getId() == animal.getId()}">active</c:if>" >
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${animal.getName()} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
|
@ -42,11 +44,13 @@
|
|||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<% if (authentication == null) { %>
|
||||
<li><a href="${loginURL}"><fmt:message key="navbar.signin"></fmt:message></a></li>
|
||||
<li><a href="${registerURL}"><fmt:message key="navbar.signup"></fmt:message></a></li>
|
||||
<li><a href="${loginURL}"><span class="glyphicon glyphicon-log-in"></span> <fmt:message key="navbar.signin"></fmt:message></a></li>
|
||||
<li><a href="${registerURL}"><span class="glyphicon glyphicon-user"></span> <fmt:message key="navbar.signup"></fmt:message></a></li>
|
||||
<% } else { %>
|
||||
<li><a href="${animalURL}"><fmt:message key="navbar.my_animals"></fmt:message></a></li>
|
||||
<li><a href="${deconnexionURL}"><fmt:message key="navbar.logout"></fmt:message></a></li>
|
||||
<li <c:if test="${MODEL_MAP_NAVBAR_PAGE == 'MODEL_MAP_NAVBAR_PAGE_VALUE_MY_ANIMALS'}">class="active"</c:if>>
|
||||
<a href="${animalURL}"><img id="my_animals_icon" src="${pawSVG}" alt="" width="16" /> <fmt:message key="navbar.my_animals"></fmt:message></a>
|
||||
</li>
|
||||
<li><a href="${deconnexionURL}"><span class="glyphicon glyphicon-log-out"></span> <fmt:message key="navbar.logout"></fmt:message></a></li>
|
||||
<% }%>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><fmt:message key="navbar.language"></fmt:message> (${language})<span class="caret"></span></a>
|
||||
|
|
@ -59,5 +63,3 @@
|
|||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@
|
|||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@ page isELIgnored="false"%>
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp"%>
|
||||
<spring:url value="/static/css/signin.css" var="signinCSS" />
|
||||
|
|
@ -36,37 +38,5 @@
|
|||
|
||||
|
||||
<%@ include file="base/footer.jsp"%>
|
||||
|
||||
<spring:url value="/static/js/jquery.md5.js" var="md5JS" />
|
||||
<script src="${md5JS}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
// TODO md5 password
|
||||
var toto = "${isErrorAuth}";
|
||||
if (toto != "") {
|
||||
$('#errorAuth').removeAttr("hidden");
|
||||
}
|
||||
|
||||
|
||||
$("form").attr('action', window.location.pathname);
|
||||
$("#loginForm").submit(function() {
|
||||
//$('#inputPassword').val($.md5($('#inputPassword').val()));
|
||||
console.log("Password: "+$('#inputPassword').val());
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
var redirectTo = "${REDIRECTION_URL}";
|
||||
var isBddOk = ${IS_BDD_OK};
|
||||
if (!isBddOk) {
|
||||
$('#errorBDD').removeAttr("hidden");
|
||||
$('#errorBDD').html("Erreur de connexion à la base de données.");
|
||||
|
||||
if (redirectTo != "") {
|
||||
$('#errorBDD').html("<br/>Redirection vers : <a href=\""+redirectTo+"\" style=\"color: red; text-decoration: underline;\">"+redirectTo+"</a>");
|
||||
setTimeout(function(){window.location.href = redirectTo;}, 5000);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ page isELIgnored="false"%>
|
||||
|
||||
<%@ include file="base/language.jsp" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="${language}">
|
||||
<head>
|
||||
<%@ include file="base/header.jsp"%>
|
||||
<spring:url value="/static/css/signin.css" var="signinCSS" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue