Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Corentin Mors
avis-de-template-server
Commits
264989f3
Commit
264989f3
authored
Dec 07, 2018
by
Yann Caumartin
Browse files
Adds crud for camp
parent
d8bfd8df
Changes
3
Hide whitespace changes
Inline
Side-by-side
views/camp/view.html
View file @
264989f3
...
...
@@ -9,6 +9,9 @@
<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"
>
...
...
@@ -40,6 +43,16 @@
<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
...
...
views/partials/modals/add-user-resource.html
deleted
100644 → 0
View file @
d8bfd8df
<div
class=
"modal fade"
id=
"add-resource-modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"add-resource-modal-label"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
role=
"document"
>
<form
action=
""
method=
"POST"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Add new resource
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<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"
>
</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"
>
</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"
>
</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>
</div>
</div>
</form>
</div>
</div>
views/users/view.html
View file @
264989f3
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment