Code: Select all
// file: hooks/patients-dv.js
// get an instance of AppGiniDetailView class
var dv = AppGiniHelper. DV;
// hide the id-field
dv.getField("id").hide();
// create a (full sized) row (width = 12) and
// add a headline "Patient" ("#Patient"), then
// add fields "last_name", "first_name", then
// add a divider-line ("-"), then
// add fields "birth_date" and "age".
// beautify label-alignment (sizeLabels(2))
var row_1 = new AppGiniLayout([12])
.add(1, ["#ELEVE & FAMILLE","NOM_ELEVE", "PRENOM_ELEVE","CLASSE_ELEVE","-","LOGIN_PRONOTE", "NOM_PRENOM_RESP", "EMAIL_RESP", "QUALITE_RESP", "TEL_RESP1","ADRESSE_RESP", "VILLE_RESP"])
.add(1, ["#GESTION VOEUX","VOEU1_PRO1", "VOEU1_PRO2", "VOEU1_PRO3", "VOEU1_PRO4"])
.sizeLabels(2);
// create a row with two columns.
// column 1: width = 8/12
// column 2: width = 4/12
// and add headlines (starting with "#") and other fields into columns 1 and 2
var row_2 = new AppGiniLayout([8, 4])
.add(1, ["#GESTION VOEUX","-", "VOEU1_PRO1", "VOEU1_PRO2", "VOEU1_PRO3", "VOEU1_PRO4"])
.add(1, ["#History", "surgical_history", "obstetric_history", "genetic_diseases", "other_details"])
.add(2, ["#Details", "image", "gender", "sexual_orientation", "weight", "height", "glasses"]);