123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <!DOCTYPE html>
- <html lang="en-US">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
-
- <style>
- .alt {
- background-color:#ccc;
- }
- .d-flex {
- display: -ms-flexbox!important;
- display: flex!important;
- }
- .align-items-center {
- -ms-flex-align: center!important;
- align-items: center!important;
- }
- </style>
-
- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
- <script src="{{ url_for('static', filename='curso.js') }}"></script>
-
- </head>
-
- <body>
-
- {% raw %}
- <div ng-app="curso" ng-controller="CursoController">
- <div class="container-fluid">
- <form name="cursoForm" ng-submit="submitForm()">
- <div class="row">
- <div class="col-sm-12">
- <input type="hidden" ng-model="curso.codigo">
- <div class="form-group">
- <label for="codigo">Código del curso:</label>
- <input type="text" ng-model="curso.codigo" class="form-control" placeholder="CCOM" required>
- </div>
- <div class="form-group">
- <label for="codigo">Título del curso:</label>
- <input type="text" ng-model="curso.titulo" class="form-control" placeholder="Introduccion a ..." required>
- </div>
- <div class="form-group">
- <label for="codigo">Grado:</label>
- <input type="text" ng-model="curso.grado" class="form-control" placeholder="K" required>
- </div>
- <div class="form-group">
- <label for="codigo">Descripción:</label>
- <input type="text" ng-model="curso.descripcion" class="form-control" placeholder="El departamento blah">
- </div>
- <button type="submit" class="btn btn-danger btn-md">
- <i class="fa fa-plus"></i> {{operacion}}
- </button>
- </div>
- </div>
- </form>
- </div>
-
- <div class="container-fluid">
- <div class="row">
- <div class="col-sm-10">
- <h2>Cursos</h2>
- </div>
- <div class="col-sm-2 align-self-center">
- <button type="button" class="btn btn-danger btn-md" ng-click="anadir()">
- <i class="fa fa-plus"></i> Añadir Curso
- </button>
- </div>
- </div>
- <div class="row" ng-repeat="curso in cursos" ng-class-odd="'alt'">
- <div class="col-sm-10 align-self-center">
- <div class="row">
- <div class="col-sm-1">Codigo:</div><div class="col-sm-11">{{curso.codigo}}</div>
- </div>
- <div class="row">
- <div class="col-sm-1">Titulo:</div><div class="col-sm-11">{{curso.titulo}}</div>
- </div>
- <div class="row">
- <div class="col-sm-1">Grado:</div><div class="col-sm-11">{{curso.grado}}</div>
- </div>
- <div class="row">
- <div class="col-sm-1">Descripción:</div><div class="col-sm-11"> {{curso.descripcion}}</div>
- </div>
- </div>
- <div class="col-sm-1 align-self-center">
- <a href="#" role="button" class="btn btn-danger btn-sm" ng-click="edit(curso)">
- <i class="fa fa-edit"></i> Editar
- </a>
- </div>
- <div class="col-sm-1 align-self-center">
- <button type="button" class="btn btn-danger btn-sm" ng-confirm-click="Are you sure to delete this course?" confirmed-click="delCourse(curso.id)">
- <i class="fa fa-trash"></i> Borrar
- </button>
- </div>
- </div>
- </div>
-
- </div>
- {% endraw %}
-
- </body>
- </html>
|