Commit ae3e73029e15fd9ddc16da494c4b66aa55715fbe
1 parent
a6bf9f63c1
Exists in
master
guardar pdf tambien en el directorio de thumbnails
Showing
2 changed files
with
24 additions
and
19 deletions
Show diff stats
app/Resources/views/cea/ascenso_mostar.html.twig
| ... | ... | @@ -61,30 +61,32 @@ |
| 61 | 61 | </table> |
| 62 | 62 | |
| 63 | 63 | <p><strong>Escalafón Solicita:</strong> {{ ascenso.idEscalafones.nombre }} </p> |
| 64 | - | |
| 65 | - | |
| 64 | + {% set añadirJurado = false %} | |
| 65 | + {% if (ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion') %} | |
| 66 | 66 | <h4>Jurados propuestos por el Docente</h4> |
| 67 | 67 | {% set añadirJurado = true %} |
| 68 | 68 | {% set cantidadJurado = 6 %} |
| 69 | - <div id="seccion_jurados"> | |
| 70 | - {% for tutor in ascenso.tutoresAscenso %} | |
| 71 | - {{ loop.length }} | |
| 69 | + <div id="seccion_jurados" class="well"> | |
| 70 | + <ul> | |
| 71 | + {% for tutor in ascenso.tutoresAscenso %} | |
| 72 | 72 | {% if loop.length == 6 %} |
| 73 | 73 | {% set añadirJurado = false %} |
| 74 | 74 | {% else %} |
| 75 | 75 | {% set cantidadJurado = cantidadJurado - 1 %} |
| 76 | 76 | {% endif %} |
| 77 | 77 | |
| 78 | - <p class="well" id="well_{{tutor.id}}"> | |
| 78 | + <li id="well_{{tutor.id}}"> | |
| 79 | 79 | |
| 80 | 80 | <strong>{{ tutor.nombres }} {{ tutor.apellidos }}:</strong> |
| 81 | 81 | {{ tutor.institucion }} -> {{ tutor.idEscala.nombre }} |
| 82 | 82 | <input type="button" class="btn btn-warning btn-xs" value="act" id="actualizar_tutor"> |
| 83 | 83 | <input type="button" class="btn btn-danger btn-xs eliminar_jurado" value="X" id="{{ tutor.id }}"> |
| 84 | - </p> | |
| 84 | + </li> | |
| 85 | 85 | |
| 86 | 86 | {% endfor %} |
| 87 | + </ul> | |
| 87 | 88 | </div> |
| 89 | + {% endif %} | |
| 88 | 90 | {% if añadirJurado %} |
| 89 | 91 | <p id="falta" class="label label-danger" data-faltaid = '{{cantidadJurado}}'> |
| 90 | 92 | El docente no tiene o le faltó completar posibles jurados |
| ... | ... | @@ -140,7 +142,7 @@ |
| 140 | 142 | |
| 141 | 143 | <div class="col-xs-4"> |
| 142 | 144 | <div class="thumbnail"> |
| 143 | - <a href="{{asset('uploads/ascenso/'~ ascenso.trabajo)}}" data-lightbox="adscripcion"> | |
| 145 | + <a href="{{asset('uploads/ascenso/'~ ascenso.trabajo)}}" data-lightbox="trabajo"> | |
| 144 | 146 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.trabajo) }}" /> |
| 145 | 147 | </a> |
| 146 | 148 | <div class="caption"> |
| ... | ... | @@ -152,7 +154,7 @@ |
| 152 | 154 | |
| 153 | 155 | <div class="col-xs-4"> |
| 154 | 156 | <div class="thumbnail"> |
| 155 | - <a href="{{asset('uploads/ascenso/'~ ascenso.expediente)}}" data-lightbox="adscripcion"> | |
| 157 | + <a href="{{asset('uploads/ascenso/'~ ascenso.expediente)}}" data-lightbox="expediente"> | |
| 156 | 158 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.expediente) }}" /> |
| 157 | 159 | </a> |
| 158 | 160 | <div class="caption"> |
| ... | ... | @@ -164,7 +166,7 @@ |
| 164 | 166 | |
| 165 | 167 | <div class="col-xs-4"> |
| 166 | 168 | <div class="thumbnail"> |
| 167 | - <a href="{{asset('uploads/ascenso/'~ ascenso.pida)}}" data-lightbox="adscripcion"> | |
| 169 | + <a href="{{asset('uploads/ascenso/'~ ascenso.pida)}}" data-lightbox="pida"> | |
| 168 | 170 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.pida) }}" /> |
| 169 | 171 | </a> |
| 170 | 172 | <div class="caption"> |
| ... | ... | @@ -177,7 +179,7 @@ |
| 177 | 179 | |
| 178 | 180 | <div class="col-xs-4"> |
| 179 | 181 | <div class="thumbnail"> |
| 180 | - <a href="{{asset('uploads/ascenso/'~ ascenso.nai)}}" data-lightbox="adscripcion"> | |
| 182 | + <a href="{{asset('uploads/ascenso/'~ ascenso.nai)}}" data-lightbox="nai"> | |
| 181 | 183 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.nai) }}" /> |
| 182 | 184 | </a> |
| 183 | 185 | <div class="caption"> |
| ... | ... | @@ -190,7 +192,7 @@ |
| 190 | 192 | |
| 191 | 193 | <div class="col-xs-4"> |
| 192 | 194 | <div class="thumbnail"> |
| 193 | - <a href="{{asset('uploads/ascenso/'~ ascenso.investigacion)}}" data-lightbox="adscripcion"> | |
| 195 | + <a href="{{asset('uploads/ascenso/'~ ascenso.investigacion)}}" data-lightbox="investigacion"> | |
| 194 | 196 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.investigacion) }}" /> |
| 195 | 197 | </a> |
| 196 | 198 | <div class="caption"> |
| ... | ... | @@ -202,7 +204,7 @@ |
| 202 | 204 | {% if ascenso.pertinencia is not null %} |
| 203 | 205 | <div class="col-xs-4"> |
| 204 | 206 | <div class="thumbnail"> |
| 205 | - <a href="{{asset('uploads/ascenso/'~ ascenso.pertinencia)}}" data-lightbox="adscripcion"> | |
| 207 | + <a href="{{asset('uploads/ascenso/'~ ascenso.pertinencia)}}" data-lightbox="pertinencia"> | |
| 206 | 208 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.pertinencia) }}" /> |
| 207 | 209 | </a> |
| 208 | 210 | <div class="caption"> |
| ... | ... | @@ -216,7 +218,7 @@ |
| 216 | 218 | {% if ascenso.aprobacion is not null %} |
| 217 | 219 | <div class="col-xs-4"> |
| 218 | 220 | <div class="thumbnail"> |
| 219 | - <a href="{{asset('uploads/ascenso/'~ ascenso.aprobacion)}}" data-lightbox="adscripcion"> | |
| 221 | + <a href="{{asset('uploads/ascenso/'~ ascenso.aprobacion)}}" data-lightbox="aprobacion"> | |
| 220 | 222 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.aprobacion) }}" /> |
| 221 | 223 | </a> |
| 222 | 224 | <div class="caption"> |
| ... | ... | @@ -231,7 +233,7 @@ |
| 231 | 233 | {% if ascenso.curriculo is not null %} |
| 232 | 234 | <div class="col-xs-4"> |
| 233 | 235 | <div class="thumbnail"> |
| 234 | - <a href="{{asset('uploads/ascenso/'~ ascenso.curriculo)}}" data-lightbox="adscripcion"> | |
| 236 | + <a href="{{asset('uploads/ascenso/'~ ascenso.curriculo)}}" data-lightbox="curriculo"> | |
| 235 | 237 | <img src="{{ asset('uploads/ascenso/thumb/'~ ascenso.curriculo) }}" /> |
| 236 | 238 | </a> |
| 237 | 239 | <div class="caption"> | ... | ... |
src/AppBundle/Controller/AscensoController.php
| ... | ... | @@ -250,9 +250,12 @@ class AscensoController extends Controller |
| 250 | 250 | $this->container->getParameter('ascenso_directory'), |
| 251 | 251 | $nombreCurriculo |
| 252 | 252 | ); |
| 253 | - thumbnail2($nombreCurriculo, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | |
| 254 | - $ascenso->setCurriculo($nombreCurriculo); | |
| 255 | - //$ascenso->setIdLineaInvestigacion($form->get('lineas_investigacion')->getData()); | |
| 253 | + $constanciaCurriculo->move( | |
| 254 | + $this->container->getParameter('ascenso_thumb_directory'), | |
| 255 | + $nombreCurriculo | |
| 256 | + ); | |
| 257 | + //thumbnail2($nombreCurriculo, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | |
| 258 | + $ascenso->setCurriculo($nombreCurriculo); | |
| 256 | 259 | |
| 257 | 260 | } |
| 258 | 261 | |
| ... | ... | @@ -755,7 +758,7 @@ function thumbnail2 ($filename, $fuente, $destino){ |
| 755 | 758 | |
| 756 | 759 | imagejpeg($nm, $destino . "/" . $filename); |
| 757 | 760 | }else{ |
| 758 | - move_uploaded_file($fuente . "/" . $filename, $destino); | |
| 761 | + move_uploaded_file($filename, $destino); | |
| 759 | 762 | } |
| 760 | 763 | } |
| 761 | 764 | ... | ... |