LORDCHANNEL2.0/templates/cerca-film.html

71 lines
3.4 KiB
HTML
Raw Normal View History

2021-03-13 18:36:50 +00:00
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
{% if nome_film %}
<div class="container mt-4">
<div class="card">
<div class="row no-gutters">
<img class="card-img-top col-4" class="img-fluid" width="300px" height="600px" src="{{ poster_image }}" alt="Card image cap">
<div class="card-body col-8">
<h5 class="card-title text-center">{{ nome_film }}</h5>
<p class="card-text text-center px-3">Descrizione : {{ descrizione_film }}.</p>
<p class="card-text text-center">Generi : {{ lista_generi_film }}</p>
<div class="text-center">
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#exampleModal">
Salva Film
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Vuoi Salvare il Film nel DB?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Vuoi Salvare {{ nome_film }}?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">No</button>
<form action="{% url 'salva-film' titolo=film_cercato %}" method="GET">
<!-- {% csrf_token %} -->
<input type="submit" class="btn btn-success" value="Si,Salva il Film nel Database">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% elif nome_film == None %}
<div class="container mt-3">
<div class="card">
<div class="card-header">
<h3>Nessun Film Trovato! Riprova!</h3>
</div>
</div>
</div>
{% endif %}
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>