Commit a52cf66e authored by Yann Caumartin's avatar Yann Caumartin
Browse files

Adds crud views for missions

parent e11dc27f
{% extends "layout/base.html" %}
{% block content %}
<main role="main" class="container">
<h2>Edit mission #{{ mission.title }}</h2>
<hr>
<form action="" method="POST">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-name">Type</span>
</div>
<input type="text" name="type" class="form-control" placeholder="{{ mission.type }}" value="{{ mission.type }}" aria-label="Type">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-title">Name</span>
</div>
<input type="text" name="title" class="form-control" placeholder="{{ mission.title }}" value="{{ mission.title }}" aria-label="Title">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-title">Description</span>
</div>
<input type="text" name="description" class="form-control" placeholder="{{ mission.description }}" value="{{ mission.description }}" aria-label="Description">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-title">Start date</span>
</div>
<input type="text" name="start_date" class="form-control" placeholder="{{ mission.start_date }}" value="{{ mission.start_date }}" aria-label="Start date">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-title">Start date</span>
</div>
<input type="text" name="end_date" class="form-control" placeholder="{{ mission.end_date }}" value="{{ mission.end_date }}" aria-label="End date">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-title">Priority</span>
</div>
<input type="text" name="priority" class="form-control" placeholder="{{ mission.priority }}" value="{{ mission.priority }}" aria-label="Priority">
</div>
<button type="submit" type="button" class="btn btn-primary float-right">Submit modifications</button>
</form>
</main><!-- /.container -->
{% endblock %}
{% extends "layout/base.html" %}
{% block content %}
<main role="main" class="container">
<div class="row">
<div class="col-12">
{% include "partials/modals/add-misssion.html" %}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-misssion-modal">
Add new misssion
</button>
<hr>
<div class="list-group">
{% for misssion in misssions %}
<div class="list-group-item list-group-item-action align-items-start list-group-item-flex">
<div class="list-group-item-tools">
<a href="misssions/{{ misssion._id }}" title="Look mission"><i class="fas fa-eye"></i></a>
<a href="misssions/{{ misssion._id }}/edit" title="Edit mission"><i class="fas fa-pencil-alt"></i></a>
</div>
<div class="list-group-item-image">
<svg width="80" height="80" data-jdenticon-value="{{ misssion._id }}"></svg>
</div>
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ mission.title }}</h5>
</div>
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ mission.description }}</h5>
</div>
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ mission.priority }}</h5>
</div>
<p class="mb-1">{{ mission.start_date }}</p>
<p class="mb-1">{{ mission.end_date }}</p>
<p class="mb-1">{{ misssion.email }}</p>
<small>group-one, group-two</small>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</main><!-- /.container -->
{% endblock %}
<div class="modal fade" id="add-user-modal" tabindex="-1" role="dialog" aria-labelledby="add-user-modal-label" aria-hidden="true">
<div class="modal-dialog" role="document">
<form action="/users/" method="POST">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Add new user</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="input-email">Email</label>
<input type="email" class="form-control" id="input-email" name="email" aria-describedby="emailHelp" placeholder="Enter email">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Add user</button>
</div>
</div>
</form>
</div>
</div>
......@@ -27,4 +27,4 @@
</div>
</form>
</div>
</div>
\ No newline at end of file
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment