Commit 50e2e89c authored by jjaouen's avatar jjaouen
Browse files

task + checklist

parents 7b7f599f a52cf66e
{% extends "layout/base.html" %}
{% block content %}
<main role="main" class="container">
<div class="row">
<div class="col-12">
{% include "partials/modals/add-camp.html" %}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-camp-modal">
Add new camp
</button>
<hr>
<div class="list-group">
{% for camp in camps %}
<div class="list-group-item list-group-item-action align-items-start list-group-item-flex">
<div class="list-group-item-tools">
<a href="camps/{{ camp._id }}" title="Look camp"><i class="fas fa-eye"></i></a>
<a href="camps/{{ camp._id }}/edit" title="Edit"><i class="fas fa-pencil-alt"></i></a>
</div>
<div class="list-group-item-image">
<svg width="80" height="80" data-jdenticon-value="{{ camp._id }}"></svg>
</div>
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ camp.name }}</h5>
<small>Last login : 18 hours ago</small>
</div>
<p class="mb-1">{{ camp.email }}</p>
<small>group-one, group-two</small>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</main><!-- /.container -->
{% endblock %}
{% extends "layout/base.html" %}
{% block content %}
<main role="main" class="container">
<div class="row">
<div class="col-12">
<h2>View of camp #{{ camp._id }}</h2>
<hr>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-resource-modal">
Add new resource
</button>
<div class="list-group">
<div class="list-group-item list-group-item-action align-items-start list-group-item-flex">
<div class="list-group-item-tools">
<a href="#" title="Lock account"><i class="fas fa-lock"></i></a>
<a href="/camps/{{ camp._id }}/edit" title="Edit"><i class="fas fa-pencil-alt"></i></a>
<a href="/camps/{{ camp._id }}/delete" onclick="return confirm('Are you sure to delete this camp?')" title="Delete"><i class="far fa-trash-alt"></i></a>
</div>
<div class="list-group-item-image">
<svg width="80" height="80" data-jdenticon-value="{{ camp._id }}"></svg>
</div>
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ camp.name }}</h5>
</div>
</div>
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ camp.location.lat }}</h5>
</div>
</div>
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ camp.location.lon }}</h5>
</div>
</div>
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ camp.location.alt }}</h5>
</div>
</div>
{% for resource in resources %}
<div class="list-group-item list-group-item-action align-items-start list-group-item-flex">
<div class="list-group-item-tools">
<a href="/resources/{{ resource._id }}" title="Look resource"><i class="fas fa-eye"></i></a>
<a href="resources/{{ resource._id }}/edit" title="Edit resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ resource._id }}/consume" title="Consume resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ resource._id }}/delete" title="Delete resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ resource._id }}/transfer" title="Transfer resource"><i class="fas fa-pencil-alt"></i></a>
</div>
{% endfor %}
</div>
{% for log in logs %}
log.value
log.timestamp
log.source.name
{% endfor %}
</div>
</div>
</div>
</main><!-- /.container -->
{% endblock %}
......@@ -3,7 +3,7 @@
{% block content %}
<main role="main" class="container">
<h2>Edit task #{{ task.title }}</h2>
<h2>Edit mission #{{ mission.title }}</h2>
<hr>
......@@ -11,35 +11,42 @@
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-title">Title</span>
<span class="input-group-text" id="input-name">Type</span>
</div>
<input type="text" name="title" class="form-control" placeholder="{{ task.title }}" value="{{ task.title }}" aria-label="Title">
<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-description">Description</span>
<span class="input-group-text" id="input-title">Name</span>
</div>
<input type="text" name="description" class="form-control" placeholder="{{ task.description }}" value="{{ task.description }}" aria-label="Description">
<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-description">Deadline</span>
<span class="input-group-text" id="input-title">Description</span>
</div>
<input type="text" name="deadline" class="form-control" placeholder="{{ task.deadline }}" value="{{ task.deadline }}" aria-label="Deadline">
<input type="text" name="description" class="form-control" placeholder="{{ mission.description }}" value="{{ mission.description }}" aria-label="Description">
</div>
<!--Checkbox-->
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-done">Done</span>
<span class="input-group-text" id="input-title">Start date</span>
</div>
<input type="text" name="done" class="form-control" placeholder="{{ task.done }}" value="{{ task.done }}" aria-label="Deadline">
<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>
......@@ -47,4 +54,4 @@
</main><!-- /.container -->
{% endblock %}
\ No newline at end of file
{% 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 %}
{% extends "layout/base.html" %}
{% block content %}
<main role="main" class="container">
<div class="row">
<div class="col-12">
<h2>View of mission #{{ mission._id }}</h2>
<hr>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-participant-modal">
Add new participant
</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-checklist-modal">
Add new checklist
</button>
<div class="list-group">
<div class="list-group-item list-group-item-action align-items-start list-group-item-flex">
<div class="list-group-item-tools">
<a href="#" title="Lock account"><i class="fas fa-lock"></i></a>
<a href="/missions/{{ mission._id }}/edit" title="Edit"><i class="fas fa-pencil-alt"></i></a>
<a href="/missions/{{ mission._id }}/delete" onclick="return confirm('Are you sure to delete this mission?')" title="Delete"><i class="far fa-trash-alt"></i></a>
</div>
<div class="list-group-item-image">
<svg width="80" height="80" data-jdenticon-value="{{ mission._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>
</div>
</div>
<div class="list-group-item list-group-item-action align-items-start list-group-item-flex">
{% for checklist in checklists %}
<div class="list-group-item-tools">
<a href="/checklists/checklist._id" title="Look checklist"><i class="fas fa-eye"></i></a>
<a href="/checklists/checklist._id/delete" title="Delete checklist"><i class="fas fa-eye"></i></a>
</div>
{% endfor %}
{% for participant in participants %}
<div class="list-group-item-tools">
<a href="/users/participant._id" title="Look participant"><i class="fas fa-eye"></i></a>
<a href="/users/participant._id/delete" title="Delete participant"><i class="fas fa-eye"></i></a>
</div>
{% endfor %}
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ resource.type }}</h5>
</div>
<p class="mb-1">{{ resource.quantity }} {{ resource.unit }}</p>
</div>
</div>
</div>
</div>
</div>
</main><!-- /.container -->
{% endblock %}
<div class="modal fade" id="add-resource-modal" tabindex="-1" role="dialog" aria-labelledby="add-resource-modal-label" aria-hidden="true">
<div class="modal fade" id="add-camp-modal" tabindex="-1" role="dialog" aria-labelledby="add-camp-modal-label" aria-hidden="true">
<div class="modal-dialog" role="document">
<form action="" method="POST">
<form action="/camps/" method="POST">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Add new resource</h5>
<h5 class="modal-title" id="exampleModalLabel">Add new camp</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
......@@ -11,22 +11,26 @@
<div class="modal-body">
<div class="form-group">
<label for="input-type">Type</label>
<input type="text" class="form-control" id="input-type" name="type" aria-describedby="quantityHelp" placeholder="Enter type">
<label for="input-campname">Name</label>
<input type="text" class="form-control" id="input-campname" name="name" aria-describedby="nameHelp" placeholder="Enter name">
</div>
<div class="form-group">
<label for="input-quantity">quantity</label>
<input type="quantity" class="form-control" id="input-quantity" name="quantity" aria-describedby="quantityHelp" placeholder="Enter quantity">
<label for="input-lat">Latitude</label>
<input type="lat" class="form-control" id="input-lat" name="lat" aria-describedby="latHelp" placeholder="Enter lat">
</div>
<div class="form-group">
<label for="input-unit">unit</label>
<input type="unit" class="form-control" id="input-unit" name="unit" aria-describedby="unitHelp" placeholder="Enter unit">
<label for="input-lon">Longitude</label>
<input type="lon" class="form-control" id="input-lon" name="lon" aria-describedby="lonHelp" placeholder="Enter lon">
</div>
<div class="form-group">
<label for="input-alt">Altitude</label>
<input type="alt" class="form-control" id="input-alt" name="alt" aria-describedby="altHelp" placeholder="Enter alt">
</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 resource</button>
<button type="submit" class="btn btn-primary">Add camp</button>
</div>
</div>
</form>
......
<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>
{% extends "layout/base.html" %}
{% block content %}
<main role="main" class="container">
<h2>Transfer resource #{{ resource.type }}</h2>
<hr>
<form action="" method="POST">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="input-title">Unit</span>
</div>
<input type="unit" name="unit" class="form-control" placeholder="{{ resource.unit }}" value="{{ resource.unit }}" aria-label="Unit">
<select>
{% for transerable in transferables %} <!-- Entities to which the resource can be transfered -->
<option value="{{ transferable}}">{{ transferable}}</option>
{% endfor %}
</select>
</div>
<button type="submit" type="button" class="btn btn-primary float-right">Transfer</button>
</form>
</main><!-- /.container -->
{% endblock %}
......@@ -11,7 +11,7 @@
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-user-log-modal">
Add new log
</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-user-resource-modal">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#add-resource-modal">
Add new resource
</button>
......@@ -38,11 +38,13 @@
{% for resource in resources %}
<div class="list-group-item list-group-item-action align-items-start list-group-item-flex">
<div class="list-group-item-tools">
<a href="/users/{{ user._id }}/{{ resource._id }}" title="Look resource"><i class="fas fa-eye"></i></a>
<a href="resources/{{ user._id }}/{{ resource._id }}/edit" title="Edit resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ user._id }}/{{ resource._id }}/consume" title="Consume resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ user._id }}/{{ resource._id }}/delete" title="Delete resource"><i class="fas fa-pencil-alt"></i></a>
<a href="/resources/{{ resource._id }}" title="Look resource"><i class="fas fa-eye"></i></a>
<a href="resources/{{ resource._id }}/edit" title="Edit resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ resource._id }}/consume" title="Consume resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ resource._id }}/delete" title="Delete resource"><i class="fas fa-pencil-alt"></i></a>
<a href="resources/{{ resource._id }}/transfer" title="Transfer resource"><i class="fas fa-pencil-alt"></i></a>
</div>
{% endfor %}
<div class="list-group-item-content">
<div class="d-flex w-90 justify-content-between">
<h5 class="mb-1">{{ resource.type }}</h5>
......
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