Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
santiago committed Aug 31, 2012
1 parent 40d1e0c commit 6f17554
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 19 deletions.
6 changes: 4 additions & 2 deletions domain/Evaluaciones.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ function Service(app) {

function getSesion(req, res, next) {
var Sesion = app.db.model('Taller');
console.log("\n\n\n\n\n");
console.log(req.params.taller_id);
Sesion.findById(req.params.taller_id, function(err, r) {
req.taller = r;
req.sesion = r;
next();
});
}
Expand Down Expand Up @@ -147,7 +149,7 @@ function Service(app) {
params: app.params,
participante: req.participante,
creativo: req.creativo,
sesion: req.sesion,
taller: req.sesion,
articulo: 'FormEvaluacion'
}
});
Expand Down
7 changes: 3 additions & 4 deletions public/javascripts/talleres.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ jQuery(document).ready(function($) {
});

$('.participante_item').click(function(e) {
var path = window.location.pathname;
var taller_id = path.substring(path.lastIndexOf('/') + 1);
var participante_id = '';
window.location = '/evaluaciones/new?taller=' + id +'&p=' + this.id;
var taller_id = location.pathname.split('/')[2];
var participante_id = $(this).attr('id');
window.location = '/taller/'+taller_id+'/participante/'+participante_id+'/evaluacion';
});
});
7 changes: 5 additions & 2 deletions public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1089,14 +1089,14 @@ article#equipamiento #agregar_sesion {
}
article#equipamiento #agregar_sesion select {
float: left;
width: 300px;
width: 290px;
margin: 0;
height: 30px;
margin-top: 5px;
}
article#equipamiento #agregar_sesion #fecha {
margin: 0 10px;
width: 300px;
width: 290px;
margin-top: 5px;
height: 28px;
}
Expand All @@ -1116,3 +1116,6 @@ article#equipamiento .taller_item .fecha {
#evaluacion .list_header a span.mask {
width: 159px;
}
article#equipamiento .list_header a#tab-participantes span.mask {
width: 128px;
}
43 changes: 36 additions & 7 deletions views/forms/eval_participante.jade
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- var habilidades = evaluacion ? evaluacion.habilidades : params.habilidades
article#evaluacion
header
.header-content
Expand Down Expand Up @@ -35,19 +36,47 @@ article#evaluacion
p Alto

ul
each habilidad in params.habilidades
each habilidad, i in habilidades
- var valor = evaluacion ? evaluacion.valores[i] : 0
li
.evaluacion
label #{habilidad}
input(name="i_#{habilidad}", value="1", type="radio")
-if (valor == '1')
input(name="i_#{habilidad}", value="1", type="radio", checked='checked', disabled='disabled')
-else if(evaluacion)
input(name="i_#{habilidad}", value="1", type="radio", disabled='disabled')
-else
input(name="i_#{habilidad}", value="1", type="radio")
label.radio_eval
input(name="i_#{habilidad}", value="2", type="radio")
-if (valor == '2')
input(name="i_#{habilidad}", value="2", type="radio", checked='checked', disabled='disabled')
-else if(evaluacion)
input(name="i_#{habilidad}", value="2", type="radio", disabled='disabled')
-else
input(name="i_#{habilidad}", value="2", type="radio")
label.radio_eval
input(name="i_#{habilidad}", value="3", type="radio")
-if (valor == '3')
input(name="i_#{habilidad}", value="3", type="radio", checked='checked', disabled='disabled')
-else if(evaluacion)
input(name="i_#{habilidad}", value="3", type="radio", disabled='disabled')
-else
input(name="i_#{habilidad}", value="3", type="radio")
label.radio_eval
input(name="i_#{habilidad}", value="4", type="radio")
-if (valor == '4')
input(name="i_#{habilidad}", value="4", type="radio", checked='checked', disabled='disabled')
-else if(evaluacion)
input(name="i_#{habilidad}", value="4", type="radio", disabled='disabled')
-else
input(name="i_#{habilidad}", value="4", type="radio")
label.radio_eval
input(name="i_#{habilidad}", value="5", type="radio")
-if (valor == '5')
input(name="i_#{habilidad}", value="5", type="radio", checked='checked', disabled='disabled')
-else if(evaluacion)
input(name="i_#{habilidad}", value="5", type="radio", disabled='disabled')
-else
input(name="i_#{habilidad}", value="5", type="radio")
label.radio_eval

button(class="submit") Envia
-if(!evaluacion)
button(class="submit") Envia

4 changes: 2 additions & 2 deletions views/partials/lista_talleres.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ each taller in talleres_base
.taller_item(id='#{taller._id}')
a.nombre(href='/talleres/#{taller._id}') #{taller.nombre}
.descripcion #{taller.descripcion}
a.ver-equipamientos(href='#') Ver equipamientos
a.cerrar-equipamientos(href='#', style='display:none;') Cerrar equipamientos
// a.ver-equipamientos(href='#') Ver equipamientos
// a.cerrar-equipamientos(href='#', style='display:none;') Cerrar equipamientos
.equipamientosTaller(style='display:none;')
.list_body
Expand Down
9 changes: 7 additions & 2 deletions views/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -762,13 +762,13 @@ article#equipamiento
padding-left: 30px
select
float: left
width: 300px
width: 290px
margin: 0
height: 30px
margin-top: 5px
#fecha
margin: 0 10px
width: 300px
width: 290px
margin-top: 5px
height: 28px
.taller_item
Expand All @@ -786,3 +786,8 @@ article#equipamiento
float: left
span.mask
width: 159px

article#equipamiento
.list_header a#tab-participantes
span.mask
width: 128px

0 comments on commit 6f17554

Please sign in to comment.