Geen omschrijving

formacurso.html 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html lang="en-US">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  7. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
  8. <style>
  9. .alt {
  10. background-color:#ccc;
  11. }
  12. .d-flex {
  13. display: -ms-flexbox!important;
  14. display: flex!important;
  15. }
  16. .align-items-center {
  17. -ms-flex-align: center!important;
  18. align-items: center!important;
  19. }
  20. </style>
  21. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  22. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  23. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  24. <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
  25. <script src="{{ url_for('static', filename='curso.js') }}"></script>
  26. </head>
  27. <body>
  28. {% raw %}
  29. <div ng-app="curso" ng-controller="CursoController">
  30. <div class="container-fluid">
  31. <form name="cursoForm" ng-submit="submitForm()">
  32. <div class="row">
  33. <div class="col-sm-12">
  34. <input type="hidden" ng-model="curso.codigo">
  35. <div class="form-group">
  36. <label for="codigo">Código del curso:</label>
  37. <input type="text" ng-model="curso.codigo" class="form-control" placeholder="CCOM" required>
  38. </div>
  39. <div class="form-group">
  40. <label for="codigo">Título del curso:</label>
  41. <input type="text" ng-model="curso.titulo" class="form-control" placeholder="Introduccion a ..." required>
  42. </div>
  43. <div class="form-group">
  44. <label for="codigo">Grado:</label>
  45. <input type="text" ng-model="curso.grado" class="form-control" placeholder="K" required>
  46. </div>
  47. <div class="form-group">
  48. <label for="codigo">Descripción:</label>
  49. <input type="text" ng-model="curso.descripcion" class="form-control" placeholder="El departamento blah">
  50. </div>
  51. <button type="submit" class="btn btn-danger btn-md">
  52. <i class="fa fa-plus"></i> {{operacion}}
  53. </button>
  54. </div>
  55. </div>
  56. </form>
  57. </div>
  58. <div class="container-fluid">
  59. <div class="row">
  60. <div class="col-sm-10">
  61. <h2>Cursos</h2>
  62. </div>
  63. <div class="col-sm-2 align-self-center">
  64. <button type="button" class="btn btn-danger btn-md" ng-click="anadir()">
  65. <i class="fa fa-plus"></i> Añadir Curso
  66. </button>
  67. </div>
  68. </div>
  69. <div class="row" ng-repeat="curso in cursos" ng-class-odd="'alt'">
  70. <div class="col-sm-10 align-self-center">
  71. <div class="row">
  72. <div class="col-sm-1">Codigo:</div><div class="col-sm-11">{{curso.codigo}}</div>
  73. </div>
  74. <div class="row">
  75. <div class="col-sm-1">Titulo:</div><div class="col-sm-11">{{curso.titulo}}</div>
  76. </div>
  77. <div class="row">
  78. <div class="col-sm-1">Grado:</div><div class="col-sm-11">{{curso.grado}}</div>
  79. </div>
  80. <div class="row">
  81. <div class="col-sm-1">Descripción:</div><div class="col-sm-11"> {{curso.descripcion}}</div>
  82. </div>
  83. </div>
  84. <div class="col-sm-1 align-self-center">
  85. <a href="#" role="button" class="btn btn-danger btn-sm" ng-click="edit(curso)">
  86. <i class="fa fa-edit"></i> Editar
  87. </a>
  88. </div>
  89. <div class="col-sm-1 align-self-center">
  90. <button type="button" class="btn btn-danger btn-sm" ng-confirm-click="Are you sure to delete this course?" confirmed-click="delCourse(curso.id)">
  91. <i class="fa fa-trash"></i> Borrar
  92. </button>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. {% endraw %}
  98. </body>
  99. </html>