Guest User

Untitled

a guest
Jan 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppEntity;
  4.  
  5. use DoctrineORMMapping as ORM;
  6.  
  7. /**
  8. * @ORMEntity(repositoryClass="AppRepositoryIncidenciasRepository")
  9. */
  10. class Incidencias
  11. {
  12. /**
  13. * @ORMId()
  14. * @ORMGeneratedValue()
  15. * @ORMColumn(type="integer")
  16. */
  17. private $id;
  18.  
  19. /**
  20. * @ORMOneToOne(targetEntity="AppEntityTrazas", inversedBy="incidencias", cascade={"persist", "remove"})
  21. * @ORMJoinColumn(nullable=false)
  22. */
  23. private $idTrazas;
  24.  
  25. /**
  26. * @ORMOneToOne(targetEntity="AppEntityMedidasAdmin", inversedBy="incidencias", cascade={"persist", "remove"})
  27. * @ORMJoinColumn(nullable=false)
  28. */
  29. private $idMedidasAdmin;
  30.  
  31. /**
  32. * @ORMOneToOne(targetEntity="AppEntityMedidasSeguridad", inversedBy="incidencias", cascade={"persist", "remove"})
  33. * @ORMJoinColumn(nullable=false)
  34. */
  35. private $idMedidasSeguridad;
  36.  
  37. public function getId(): ?int
  38. {
  39. return $this->id;
  40. }
  41.  
  42. public function getIdTrazas(): ?trazas
  43. {
  44. return $this->idTrazas;
  45. }
  46.  
  47. public function setIdTrazas(trazas $idTrazas): self
  48. {
  49. $this->idTrazas = $idTrazas;
  50.  
  51. return $this;
  52. }
  53.  
  54. public function getIdMedidasAdmin(): ?medidasAdmin
  55. {
  56. return $this->idMedidasAdmin;
  57. }
  58.  
  59. public function setIdMedidasAdmin(medidasAdmin $idMedidasAdmin): self
  60. {
  61. $this->idMedidasAdmin = $idMedidasAdmin;
  62.  
  63. return $this;
  64. }
  65.  
  66. public function getIdMedidasSeguridad(): ?medidasSeguridad
  67. {
  68. return $this->idMedidasSeguridad;
  69. }
  70.  
  71. public function setIdMedidasSeguridad(medidasSeguridad $idMedidasSeguridad): self
  72. {
  73. $this->idMedidasSeguridad = $idMedidasSeguridad;
  74.  
  75. return $this;
  76. }
  77.  
  78. }
  79.  
  80. {% extends 'default/Plantilla.html.twig' %}
  81. {% block subtitle %}<h1>Incidencias de Seguridad Informática</h1>{% endblock %}
  82.  
  83. {% block body %}
  84. <br/>
  85.  
  86. <table class="table table-striped table-bordered dt-responsive nowrap">
  87. <thead>
  88. <tr>
  89. <th>Traza</th>
  90. <th>Medida de Seguridad Informática</th>
  91. <th>Medida Administrativa</th>
  92. <th width="185px">Gestionar</th>
  93. </tr>
  94. </thead>
  95. <tbody>
  96. {% for incidencia in incidencias %}
  97. <tr onmouseover="$(this).children('.columnAction').show();" onmouseout="$(this).children('.columnAction').hide();">
  98. <td>{{ incidencia.idTraza }}</td>
  99. <td>{{ incidencia.idMedidaAdmin }}</td>
  100. <td>{{ incidencia.idMedidaSeguridad }}</td>
  101. <td width="185px" class="columnAction">
  102.  
  103. <a class="btn btn-success" href="{{ path('incidencias_show', {'id': incidencia.id}) }}" id="botonShow"><i class="fa fa-eye" ></i></a>
  104. <a class="btn btn-success" href="{{ path('incidencias_edit', {'id': incidencia.id}) }}" id="botonEdit"><i class="fa fa-edit" ></i></a>
  105. {{ include('incidencias/_delete_form.html.twig') }}
  106.  
  107. </td>
  108. </tr>
  109. {% else %}
  110. <tr>
  111. <td colspan="2">No existen datos registrados</td>
  112. </tr>
  113. {% endfor %}
  114. </tbody>
  115. </table>
  116.  
  117. <a class="btn btn-success" href="{{ path('incidencias_new') }}" id="botonAñadir"><i class="fa fa-plus-circle" ></i> Añadir</a>
  118. {% endblock %}
Add Comment
Please, Sign In to add comment