refactor: Refactors HTML templates for consistency
Updates Django templates to unify block definition format Removes unnecessary whitespace and aligns code for better readability Standardizes form method attribute casing for uniformity These changes enhance maintainability and readability across templates.
This commit is contained in:
parent
f932922cd7
commit
f3d6154259
34 changed files with 1038 additions and 831 deletions
|
@ -1,16 +1,17 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this dream? This cannot be undone.</p>
|
||||
<form action="" method="POST">{% csrf_token %}<button class="form-control btn-danger" type="submit">Delete Dream</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this dream? This cannot be undone.</p>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="form-control btn-danger" type="submit">Delete Dream</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,60 +1,133 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ field.name }}: {{ error }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.title }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr><th><label for="id_timestamp">Timestamp:</label></th><td><input type="text" name="timestamp" value="{% if object.timestamp %}{{ object.timestamp | date:"Y-m-d H:i" }}{% else %}{% now "Y-m-d H:i" %}{% endif %}" required id="id_timestamp"><input type="hidden" name="initial-timestamp" value="2020-12-26 19:24:14" id="initial-id_timestamp"></td></tr>
|
||||
<tr><th><label for="id_type">Type:</label></th><td><select name="type" required="" id="id_type">
|
||||
{% for value, text in form.type.field.choices %}
|
||||
{% block content %}
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">{{ field.name }}: {{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.title }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_timestamp">Timestamp:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text"
|
||||
name="timestamp"
|
||||
value="{% if object.timestamp %}{{ object.timestamp | date:"Y-m-d H:i" }}{% else %}{% now "Y-m-d H:i" %}{% endif %}"
|
||||
required
|
||||
id="id_timestamp">
|
||||
<input type="hidden"
|
||||
name="initial-timestamp"
|
||||
value="2020-12-26 19:24:14"
|
||||
id="initial-id_timestamp">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_type">Type:</label>
|
||||
</th>
|
||||
<td>
|
||||
<select name="type" required="" id="id_type">
|
||||
{% for value, text in form.type.field.choices %}
|
||||
<option value="{{ value }}" {% if object.type == value %}selected{% endif %}>{{ text }}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select></td></tr>
|
||||
<tr><th><label for="id_title">Title:</label></th><td><input value="{{ object.title }}" type="text" name="title" maxlength="64" id="id_title"></td></tr>
|
||||
|
||||
<tr><th><label for="id_content">Text:</label></th><td><textarea name="content" cols="40" rows="10" id="id_content">{{ object.content }}</textarea></td></tr>
|
||||
|
||||
<tr><th><label for="id_mood">Mood:</label></th><td><select name="mood" class="dtb" required id="id_mood">
|
||||
<option value="" {% if not object.mood %}selected{% endif %}>---------</option>
|
||||
|
||||
{% for mood in request.user.mood_set.all|dictsort:"value" %}
|
||||
<option data-icon="{{ mood.icon }}" value="{{ mood.id }}" {% if object.mood == mood %}selected{% endif %}>{{ mood }}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select></td></tr>
|
||||
|
||||
|
||||
<tr><th><label for="id_lucid">Lucid:</label></th><td><input type="checkbox" {% if object.lucid %}checked{% endif %} name="lucid"> <i class="fas fa-exclamation"></i> Lucid Dream?<br></td></tr>
|
||||
<tr><th><label for="id_lucid">Wet:</label></th><td><input type="checkbox" {% if object.wet %}checked{% endif %} name="wet"> <i class="fas fa-tint"></i> Wet Dream?<br></td></tr>
|
||||
|
||||
<tr><th><label for="activities">Themes:</label></th><td>
|
||||
{% for theme in request.user.theme_set.all %}
|
||||
<input type="checkbox" {% if theme in object.theme_set %}checked{% endif %} value="{{ theme.id }}" name="themes"> <i class="{{ theme.icon }}" style="color:{{ theme.color }};"></i> {{ theme }}<br>
|
||||
{% endfor %}
|
||||
</td></tr>
|
||||
|
||||
<tr><th><label for="id_uploads">Uploads:</label></th><td><input type="file" name="uploads" id="id_uploads" multiple="multiple"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px;" class="form-control btn-primary" type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_title">Title:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input value="{{ object.title }}"
|
||||
type="text"
|
||||
name="title"
|
||||
maxlength="64"
|
||||
id="id_title">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_content">Text:</label>
|
||||
</th>
|
||||
<td>
|
||||
<textarea name="content" cols="40" rows="10" id="id_content">{{ object.content }}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_mood">Mood:</label>
|
||||
</th>
|
||||
<td>
|
||||
<select name="mood" class="dtb" required id="id_mood">
|
||||
<option value="" {% if not object.mood %}selected{% endif %}>---------</option>
|
||||
{% for mood in request.user.mood_set.all|dictsort:"value" %}
|
||||
<option data-icon="{{ mood.icon }}"
|
||||
value="{{ mood.id }}"
|
||||
{% if object.mood == mood %}selected{% endif %}>{{ mood }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_lucid">Lucid:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox" {% if object.lucid %}checked{% endif %} name="lucid">
|
||||
<i class="fas fa-exclamation"></i> Lucid Dream?
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_lucid">Wet:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox" {% if object.wet %}checked{% endif %} name="wet">
|
||||
<i class="fas fa-tint"></i> Wet Dream?
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="activities">Themes:</label>
|
||||
</th>
|
||||
<td>
|
||||
{% for theme in request.user.theme_set.all %}
|
||||
<input type="checkbox"
|
||||
{% if theme in object.theme_set %}checked{% endif %}
|
||||
value="{{ theme.id }}"
|
||||
name="themes">
|
||||
<i class="{{ theme.icon }}" style="color:{{ theme.color }};"></i> {{ theme }}
|
||||
<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_uploads">Uploads:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="file" name="uploads" id="id_uploads" multiple="multiple">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px"
|
||||
class="form-control btn-primary"
|
||||
type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,34 +1,46 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Dreams</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table data-order="[[ 0, "desc" ]]" class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>Mood</th>
|
||||
<th>Themes</th>
|
||||
<th>Title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dream in object_list %}
|
||||
<tr onclick="window.location.href='{% url "dreams:dream_view" dream.id %}'">
|
||||
<td data-order="{{ dream.timestamp | date:"U" }}">{{ dream.timestamp }}</td>
|
||||
<td><i data-order="{{ dream.mood.value }}" style="color:{{ dream.mood.color }};" class="{{ dream.mood.icon }}"></i> {{ dream.mood }}</td>
|
||||
<td>{% for theme in dream.dreamtheme_set.all %}<i title="{{ theme.theme }}{% if theme.comment %} - {{ theme.comment }}{% endif %}" style="color:{{ theme.theme.color }};" class="{{ theme.theme.icon }}"></i> {% endfor %}</td>
|
||||
<td>{{ dream.short_text }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Dreams</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table data-order="[[ 0, "desc" ]]"
|
||||
class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>Mood</th>
|
||||
<th>Themes</th>
|
||||
<th>Title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dream in object_list %}
|
||||
<tr onclick="window.location.href='{% url "dreams:dream_view" dream.id %}'">
|
||||
<td data-order="{{ dream.timestamp | date:"U" }}">{{ dream.timestamp }}</td>
|
||||
<td>
|
||||
<i data-order="{{ dream.mood.value }}"
|
||||
style="color:{{ dream.mood.color }}"
|
||||
class="{{ dream.mood.icon }}"></i> {{ dream.mood }}
|
||||
</td>
|
||||
<td>
|
||||
{% for theme in dream.dreamtheme_set.all %}
|
||||
<i title="{{ theme.theme }}{% if theme.comment %} - {{ theme.comment }}{% endif %}"
|
||||
style="color:{{ theme.theme.color }}"
|
||||
class="{{ theme.theme.icon }}"></i>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{ dream.short_text }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,70 +1,78 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- Entry details -->
|
||||
<div class="col-xl-8 col-lg-7">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Dream Entry</h6>
|
||||
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<p><i>{{ object.timestamp }}</i></p>
|
||||
<h3>{{ object.title }}</h3>
|
||||
<blockquote>{{ object.content|linebreaks }}</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mood -->
|
||||
<div class="col-xl-4 col-lg-5">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Mood</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<i title="{{ object.mood }}" style="color: {{ object.mood.color }}; font-size: 200px;" title="" class="{{ object.mood.icon }}"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<!-- Entry details -->
|
||||
<div class="col-xl-8 col-lg-7">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Dream Entry</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<p>
|
||||
<i>{{ object.timestamp }}</i>
|
||||
</p>
|
||||
<h3>{{ object.title }}</h3>
|
||||
<blockquote>
|
||||
{{ object.content|linebreaks }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mood -->
|
||||
<div class="col-xl-4 col-lg-5">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Mood</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<i title="{{ object.mood }}"
|
||||
style="color: {{ object.mood.color }};
|
||||
font-size: 200px"
|
||||
title=""
|
||||
class="{{ object.mood.icon }}"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Themes</h6>
|
||||
</div>
|
||||
<div class="py-3">
|
||||
<div class="container">
|
||||
<div class="row" id="cards">
|
||||
{% for theme in object.dreamtheme_set.all %}
|
||||
<div class="card">
|
||||
<i title="{{ theme.theme }}"
|
||||
style="display: inline;
|
||||
color: {{ theme.theme.color }};
|
||||
font-size: 50px"
|
||||
title=""
|
||||
class="{{ theme.theme.icon }}"></i>
|
||||
</div>
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Themes</h6>
|
||||
</div>
|
||||
<div class="py-3">
|
||||
<div class="container">
|
||||
<div class="row" id="cards">
|
||||
{% for theme in object.dreamtheme_set.all %}
|
||||
<div class="card">
|
||||
<i title="{{ theme.theme }}" style="display: inline; color: {{ theme.theme.color }}; font-size: 50px;" title="" class="{{ theme.theme.icon }}"></i>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Attachments</h6>
|
||||
</div>
|
||||
<div class="py-3">
|
||||
<div class="container">
|
||||
<ul>
|
||||
{% for attachment in object.dreammedia_set.all %}
|
||||
<li><a href="{{ attachment.media.url }}">{{ attachment.basename }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Attachments</h6>
|
||||
</div>
|
||||
<div class="py-3">
|
||||
<div class="container">
|
||||
<ul>
|
||||
{% for attachment in object.dreammedia_set.all %}
|
||||
<li>
|
||||
<a href="{{ attachment.media.url }}">{{ attachment.basename }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,28 +1,35 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Moods</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name <i>(Value)</i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for mood in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:mood_edit" mood.id %}'">
|
||||
<td><i data-order="{{ mood.value }}" style="color:{{ mood.color }};" class="{{ mood.icon }}"></i> {{ mood }} <i>({{ mood.value }})</i></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Moods</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Name <i>(Value)</i>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for mood in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:mood_edit" mood.id %}'">
|
||||
<td>
|
||||
<i data-order="{{ mood.value }}"
|
||||
style="color:{{ mood.color }}"
|
||||
class="{{ mood.icon }}"></i> {{ mood }} <i>({{ mood.value }})</i>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object.time }} Notification?</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this notification? This cannot be undone.</p>
|
||||
<form action="" method="POST">{% csrf_token %}<button class="form-control btn-danger" type="submit">Delete Notification</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object.time }} Notification?</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this notification? This cannot be undone.</p>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="form-control btn-danger" type="submit">Delete Notification</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,30 +1,40 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ field.name }}: {{ error }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.time }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr><th><label for="id_time">Time:</label></th><td><input type="time" name="time" value="{% if object.time %}{{ object.time|date:"H:i" }}{% else %}12:00{% endif %}" maxlength="64" required id="id_time"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px;" class="form-control btn-primary" type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">{{ field.name }}: {{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.time }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_time">Time:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="time"
|
||||
name="time"
|
||||
value="{% if object.time %}{{ object.time|date:"H:i" }}{% else %}12:00{% endif %}"
|
||||
maxlength="64"
|
||||
required
|
||||
id="id_time">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px"
|
||||
class="form-control btn-primary"
|
||||
type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,28 +1,29 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Daily Notifications</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for notification in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:notification_edit" notification.id %}'">
|
||||
<td>{{ notification.time }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Daily Notifications</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for notification in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:notification_edit" notification.id %}'">
|
||||
<td>{{ notification.time }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete {{ object }}? This cannot be undone. Mood entries that are associated with this activity will not be deleted.</p>
|
||||
<form action="" method="POST">{% csrf_token %}<button class="form-control btn-danger" type="submit">Delete Activity</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>
|
||||
Are you sure you wish to delete {{ object }}? This cannot be undone. Mood entries that are associated with this activity will not be deleted.
|
||||
</p>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="form-control btn-danger" type="submit">Delete Activity</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,30 +1,63 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.name }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr><th><label for="id_name">Name:</label></th><td><input type="text" name="name" value="{{ object.name }}" maxlength="64" required id="id_name"></td></tr>
|
||||
<tr><th><label for="id_icon">Icon:</label></th><td><input style="visibility: hidden;" class="icp icp-auto" type="text" name="icon" value="{{ object.icon }}" maxlength="64" required id="id_icon"></td></tr>
|
||||
<tr><th><label for="id_color">Color:</label></th><td><input type="text"
|
||||
id="id_color"
|
||||
class="form-control colorfield_field jscolor"
|
||||
name="color"
|
||||
value="{{ object.color }}"
|
||||
placeholder="{{ object.color }}"
|
||||
data-jscolor="{hash:true,width:225,height:150,required:true}"
|
||||
required /></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px;" class="form-control btn-primary" type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.name }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_name">Name:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text"
|
||||
name="name"
|
||||
value="{{ object.name }}"
|
||||
maxlength="64"
|
||||
required
|
||||
id="id_name">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_icon">Icon:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input style="visibility: hidden"
|
||||
class="icp icp-auto"
|
||||
type="text"
|
||||
name="icon"
|
||||
value="{{ object.icon }}"
|
||||
maxlength="64"
|
||||
required
|
||||
id="id_icon">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_color">Color:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text"
|
||||
id="id_color"
|
||||
class="form-control colorfield_field jscolor"
|
||||
name="color"
|
||||
value="{{ object.color }}"
|
||||
placeholder="{{ object.color }}"
|
||||
data-jscolor="{hash:true,width:225,height:150,required:true}"
|
||||
required />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px"
|
||||
class="form-control btn-primary"
|
||||
type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,28 +1,33 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Themes</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for theme in object_list %}
|
||||
<tr onclick="window.location.href='{% url "dreams:theme_edit" theme.id %}'">
|
||||
<td><i data-order="{{ theme }}" style="color:{{ theme.color }};" class="{{ theme.icon }}"></i> {{ theme }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Themes</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for theme in object_list %}
|
||||
<tr onclick="window.location.href='{% url "dreams:theme_edit" theme.id %}'">
|
||||
<td>
|
||||
<i data-order="{{ theme }}"
|
||||
style="color:{{ theme.color }}"
|
||||
class="{{ theme.icon }}"></i> {{ theme }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,78 +1,66 @@
|
|||
{% include "frontend/header_admin.html" with title=title styles=styles %}
|
||||
{% include "frontend/sidebar.html" with title=title %}
|
||||
|
||||
<!-- Content Wrapper -->
|
||||
<div id="content-wrapper" class="d-flex flex-column">
|
||||
|
||||
<!-- Main Content -->
|
||||
<div id="content">
|
||||
|
||||
{% include "frontend/topbar.html" with user=user %}
|
||||
|
||||
<!-- Begin Page Content -->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Page Heading -->
|
||||
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
||||
<h1 class="h3 mb-2 text-gray-800">{{ title }}</h1>
|
||||
<div>
|
||||
<!-- Content Wrapper -->
|
||||
<div id="content-wrapper" class="d-flex flex-column">
|
||||
<!-- Main Content -->
|
||||
<div id="content">
|
||||
{% include "frontend/topbar.html" with user=user %}
|
||||
<!-- Begin Page Content -->
|
||||
<div class="container-fluid">
|
||||
<!-- Page Heading -->
|
||||
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
||||
<h1 class="h3 mb-2 text-gray-800">{{ title }}</h1>
|
||||
<div>
|
||||
{% for button in buttons %}
|
||||
<a href="{{ button.0 }}" class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-{{ button.2 }} fa-sm text-white-50"></i> {{ button.1 }}</a>
|
||||
<a href="{{ button.0 }}"
|
||||
class="d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-{{ button.2 }} fa-sm text-white-50"></i> {{ button.1 }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="mb-4">{{ subtitle }}</p>
|
||||
|
||||
|
||||
{% block "content" %}
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
</div>
|
||||
<!-- End of Main Content -->
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="sticky-footer bg-white">
|
||||
<div class="container my-auto">
|
||||
<div class="copyright text-center my-auto">
|
||||
<span>Brought to you by <a href="https://kumi.website">Kumi</a> |
|
||||
Source code available on <a href="https://git.private.coffee/kumi/kumify.git">Private.coffee Git</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- End of Footer -->
|
||||
|
||||
<p class="mb-4">{{ subtitle }}</p>
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
<!-- End of Content Wrapper -->
|
||||
|
||||
<!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- End of Page Wrapper -->
|
||||
|
||||
<!-- Scroll to Top Button-->
|
||||
<a class="scroll-to-top rounded" href="#page-top">
|
||||
<i class="fas fa-angle-up"></i>
|
||||
</a>
|
||||
|
||||
<!-- Logout Modal-->
|
||||
<div class="modal fade" id="logoutModal" 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">Ready to Leave?</h5>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
|
||||
<a class="btn btn-primary" href="{% url "logout" %}">Logout</a>
|
||||
</div>
|
||||
<!-- End of Main Content -->
|
||||
<!-- Footer -->
|
||||
<footer class="sticky-footer bg-white">
|
||||
<div class="container my-auto">
|
||||
<div class="copyright text-center my-auto">
|
||||
<span>Brought to you by <a href="https://kumi.website">Kumi</a> |
|
||||
Source code available on <a href="https://git.private.coffee/kumi/kumify.git">Private.coffee Git</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "frontend/footer.html" with scripts=scripts %}
|
||||
</footer>
|
||||
<!-- End of Footer -->
|
||||
</div>
|
||||
<!-- End of Content Wrapper -->
|
||||
</div>
|
||||
<!-- End of Page Wrapper -->
|
||||
<!-- Scroll to Top Button-->
|
||||
<a class="scroll-to-top rounded" href="#page-top">
|
||||
<i class="fas fa-angle-up"></i>
|
||||
</a>
|
||||
<!-- Logout Modal-->
|
||||
<div class="modal fade"
|
||||
id="logoutModal"
|
||||
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">Ready to Leave?</h5>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
|
||||
<a class="btn btn-primary" href="{% url "logout" %}">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include "frontend/footer.html" with scripts=scripts %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% load dashboard %}
|
||||
{% block "content" %}
|
||||
{% block content %}
|
||||
{% dashboard as dashboard %}
|
||||
{{ dashboard | safe }}
|
||||
{% endblock "content" %}
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,27 +1,17 @@
|
|||
{% load static %}
|
||||
|
||||
<!-- Bootstrap core JavaScript-->
|
||||
<script src="{% static "frontend/vendor/jquery/jquery.min.js" %}"></script>
|
||||
<script src="{% static "frontend/vendor/bootstrap/js/bootstrap.bundle.min.js" %}"></script>
|
||||
|
||||
<!-- Core plugin JavaScript-->
|
||||
<script src="{% static "frontend/vendor/jquery-easing/jquery.easing.min.js" %}"></script>
|
||||
|
||||
<!-- Custom scripts for all pages-->
|
||||
<script src="{% static "frontend/js/sb-admin-2.min.js" %}"></script>
|
||||
<script src="{% static "frontend/js/bosskey.js" %}"></script>
|
||||
|
||||
<!-- Page level plugins -->
|
||||
<script src="{% static "frontend/vendor/datatables/jquery.dataTables.min.js" %}"></script>
|
||||
<script src="{% static "frontend/vendor/datatables/dataTables.bootstrap4.min.js" %}"></script>
|
||||
|
||||
<script src="{% static "frontend/js/datatables-demo.js" %}"></script>
|
||||
|
||||
<!-- Page level custom scripts -->
|
||||
{% for script in scripts %}
|
||||
<script src="{{ script }}"></script>
|
||||
{% endfor %}
|
||||
|
||||
{% for script in scripts %}<script src="{{ script }}"></script>{% endfor %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
</div>
|
||||
|
||||
{% include "frontend/footer.html" with scripts=scripts %}
|
||||
{% include "frontend/footer.html" with scripts=scripts %}
|
||||
|
|
|
@ -1,30 +1,25 @@
|
|||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>{% if title %}{{ title }} - {% endif %}Kumify</title>
|
||||
|
||||
<!-- Custom fonts for this template -->
|
||||
<link href="https://fa.kumi.systems/css/all.min.css" rel="stylesheet" type="text/css">
|
||||
<link
|
||||
href="https://googledonts.private.coffee/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
|
||||
rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{% static "frontend/css/sb-admin-2.min.css" %}" rel="stylesheet">
|
||||
<link href="{% static "frontend/vendor/datatables/dataTables.bootstrap4.min.css" %}" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this page -->
|
||||
{% for style in styles %}
|
||||
<link href="{{ style }}" rel="stylesheet">
|
||||
{% endfor %}
|
||||
|
||||
</head>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<title>
|
||||
{% if title %}{{ title }} -{% endif %}
|
||||
Kumify</title>
|
||||
<!-- Custom fonts for this template -->
|
||||
<link href="https://fa.kumi.systems/css/all.min.css"
|
||||
rel="stylesheet"
|
||||
type="text/css">
|
||||
<link href="https://googledonts.private.coffee/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
|
||||
rel="stylesheet">
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{% static "frontend/css/sb-admin-2.min.css" %}" rel="stylesheet">
|
||||
<link href="{% static "frontend/vendor/datatables/dataTables.bootstrap4.min.css" %}" rel="stylesheet">
|
||||
<!-- Custom styles for this page -->
|
||||
{% for style in styles %}<link href="{{ style }}" rel="stylesheet">{% endfor %}
|
||||
</head>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{% include "frontend/header.html" with styles=styles title=title %}
|
||||
|
||||
<body id="page-top">
|
||||
|
||||
<!-- Page Wrapper -->
|
||||
<div id="wrapper">
|
||||
<div id="wrapper">
|
||||
|
|
|
@ -1,28 +1,25 @@
|
|||
{% load navigation %}
|
||||
|
||||
<!-- Sidebar -->
|
||||
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
|
||||
|
||||
<!-- Sidebar - Brand -->
|
||||
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="/">
|
||||
<div class="sidebar-brand-icon rotate-n-15">
|
||||
<i class="fas fa-laugh-wink"></i>
|
||||
</div>
|
||||
<div class="sidebar-brand-text mx-3">Kumify</div>
|
||||
</a>
|
||||
|
||||
<!-- Divider -->
|
||||
<hr class="sidebar-divider my-0">
|
||||
|
||||
{% autoescape off %}{% sidebar_nav %}{% endautoescape %}
|
||||
|
||||
<!-- Divider -->
|
||||
<hr class="sidebar-divider d-none d-md-block">
|
||||
|
||||
<!-- Sidebar Toggler (Sidebar) -->
|
||||
<div class="text-center d-none d-md-inline">
|
||||
<button class="rounded-circle border-0" id="sidebarToggle"></button>
|
||||
</div>
|
||||
|
||||
</ul>
|
||||
<!-- End of Sidebar -->
|
||||
<!-- Sidebar -->
|
||||
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion"
|
||||
id="accordionSidebar">
|
||||
<!-- Sidebar - Brand -->
|
||||
<a class="sidebar-brand d-flex align-items-center justify-content-center"
|
||||
href="/">
|
||||
<div class="sidebar-brand-icon rotate-n-15">
|
||||
<i class="fas fa-laugh-wink"></i>
|
||||
</div>
|
||||
<div class="sidebar-brand-text mx-3">Kumify</div>
|
||||
</a>
|
||||
<!-- Divider -->
|
||||
<hr class="sidebar-divider my-0">
|
||||
{% autoescape off %}
|
||||
{% sidebar_nav %}
|
||||
{% endautoescape %}
|
||||
<!-- Divider -->
|
||||
<hr class="sidebar-divider d-none d-md-block">
|
||||
<!-- Sidebar Toggler (Sidebar) -->
|
||||
<div class="text-center d-none d-md-inline">
|
||||
<button class="rounded-circle border-0" id="sidebarToggle"></button>
|
||||
</div>
|
||||
</ul>
|
||||
<!-- End of Sidebar -->
|
||||
|
|
|
@ -1,47 +1,57 @@
|
|||
<!-- Topbar -->
|
||||
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
|
||||
|
||||
<!-- Sidebar Toggle (Topbar) -->
|
||||
<form class="form-inline">
|
||||
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- Topbar Navbar -->
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<!-- Nav Item - User Information -->
|
||||
<li class="nav-item dropdown no-arrow">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{% if request.uset.get_full_name %}{{ request.user.get_full_name }}{% else %}{{ request.user.username }}{% endif %}</span>
|
||||
<img class="img-profile rounded-circle"
|
||||
src="img/undraw_profile.svg">
|
||||
</a>
|
||||
<!-- Dropdown - User Information -->
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="#">
|
||||
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Profile
|
||||
</a>
|
||||
<a class="dropdown-item" href="#">
|
||||
<i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="dropdown-item" href="#">
|
||||
<i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Activity Log
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
|
||||
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Logout
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<!-- End of Topbar -->
|
||||
<!-- Topbar -->
|
||||
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
|
||||
<!-- Sidebar Toggle (Topbar) -->
|
||||
<form class="form-inline">
|
||||
<button id="sidebarToggleTop"
|
||||
class="btn btn-link d-md-none rounded-circle mr-3">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</form>
|
||||
<!-- Topbar Navbar -->
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<!-- Nav Item - User Information -->
|
||||
<li class="nav-item dropdown no-arrow">
|
||||
<a class="nav-link dropdown-toggle"
|
||||
href="#"
|
||||
id="userDropdown"
|
||||
role="button"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<span class="mr-2 d-none d-lg-inline text-gray-600 small">
|
||||
{% if request.uset.get_full_name %}
|
||||
{{ request.user.get_full_name }}
|
||||
{% else %}
|
||||
{{ request.user.username }}
|
||||
{% endif %}
|
||||
</span>
|
||||
<img class="img-profile rounded-circle" src="img/undraw_profile.svg">
|
||||
</a>
|
||||
<!-- Dropdown - User Information -->
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="#">
|
||||
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Profile
|
||||
</a>
|
||||
<a class="dropdown-item" href="#">
|
||||
<i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="dropdown-item" href="#">
|
||||
<i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Activity Log
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item"
|
||||
href="#"
|
||||
data-toggle="modal"
|
||||
data-target="#logoutModal">
|
||||
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
Logout
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- End of Topbar -->
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete {{ object }}? This cannot be undone. Mood entries that are associated with this activity will not be deleted.</p>
|
||||
<form action="" method="POST">{% csrf_token %}<button class="form-control btn-danger" type="submit">Delete Activity</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>
|
||||
Are you sure you wish to delete {{ object }}? This cannot be undone. Mood entries that are associated with this activity will not be deleted.
|
||||
</p>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="form-control btn-danger" type="submit">Delete Activity</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.name }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
|
@ -71,4 +71,4 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,28 +1,33 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Activities</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for activity in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:activity_edit" activity.id %}'">
|
||||
<td><i data-order="{{ activity }}" style="color:{{ activity.color }};" class="{{ activity.icon }}"></i> {{ activity }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Activities</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for activity in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:activity_edit" activity.id %}'">
|
||||
<td>
|
||||
<i data-order="{{ activity }}"
|
||||
style="color:{{ activity.color }}"
|
||||
class="{{ activity.icon }}"></i> {{ activity }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{% load mood_stats %}
|
||||
|
||||
<!-- Mood calendar heatmap -->
|
||||
<div class="row">
|
||||
<div class="col-xl-12 mb-4">
|
||||
|
|
|
@ -1,40 +1,83 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ field.name }}: {{ error }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.name }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr><th><label for="id_name">Name:</label></th><td><input type="text" name="name" value="{{ object.name }}" maxlength="64" required id="id_name"></td></tr>
|
||||
<tr><th><label for="id_icon">Icon:</label></th><td><input style="visibility: hidden;" class="icp icp-auto" type="text" name="icon" value="{{ object.icon }}" maxlength="64" required id="id_icon"></td></tr>
|
||||
<tr><th><label for="id_color">Color:</label></th><td><input type="text"
|
||||
id="id_color"
|
||||
class="form-control colorfield_field jscolor"
|
||||
name="color"
|
||||
value="{{ object.color }}"
|
||||
placeholder="{{ object.color }}"
|
||||
data-jscolor="{hash:true,width:225,height:150,required:true}"
|
||||
required /></td></tr>
|
||||
<tr><th><label for="id_value">Value:</label></th><td><input name="value" type="number" step="1" value="{{ object.value }}" required id="id_value"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px;" class="form-control btn-primary" type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">{{ field.name }}: {{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.name }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_name">Name:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text"
|
||||
name="name"
|
||||
value="{{ object.name }}"
|
||||
maxlength="64"
|
||||
required
|
||||
id="id_name">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_icon">Icon:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input style="visibility: hidden"
|
||||
class="icp icp-auto"
|
||||
type="text"
|
||||
name="icon"
|
||||
value="{{ object.icon }}"
|
||||
maxlength="64"
|
||||
required
|
||||
id="id_icon">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_color">Color:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text"
|
||||
id="id_color"
|
||||
class="form-control colorfield_field jscolor"
|
||||
name="color"
|
||||
value="{{ object.color }}"
|
||||
placeholder="{{ object.color }}"
|
||||
data-jscolor="{hash:true,width:225,height:150,required:true}"
|
||||
required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_value">Value:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input name="value"
|
||||
type="number"
|
||||
step="1"
|
||||
value="{{ object.value }}"
|
||||
required
|
||||
id="id_value">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px"
|
||||
class="form-control btn-primary"
|
||||
type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,28 +1,35 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Moods</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name <i>(Value)</i></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for mood in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:mood_edit" mood.id %}'">
|
||||
<td><i data-order="{{ mood.value }}" style="color:{{ mood.color }};" class="{{ mood.icon }}"></i> {{ mood }} <i>({{ mood.value }})</i></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Moods</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Name <i>(Value)</i>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for mood in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:mood_edit" mood.id %}'">
|
||||
<td>
|
||||
<i data-order="{{ mood.value }}"
|
||||
style="color:{{ mood.color }}"
|
||||
class="{{ mood.icon }}"></i> {{ mood }} <i>({{ mood.value }})</i>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object.time }} Notification?</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this notification? This cannot be undone.</p>
|
||||
<form action="" method="POST">{% csrf_token %}<button class="form-control btn-danger" type="submit">Delete Notification</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object.time }} Notification?</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this notification? This cannot be undone.</p>
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<button class="form-control btn-danger" type="submit">Delete Notification</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,30 +1,40 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ field.name }}: {{ error }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.time }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr><th><label for="id_time">Time:</label></th><td><input type="time" name="time" value="{% if object.time %}{{ object.time|date:"H:i" }}{% else %}12:00{% endif %}" maxlength="64" required id="id_time"></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px;" class="form-control btn-primary" type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
<div class="alert alert-danger" role="alert">{{ field.name }}: {{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.time }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_time">Time:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="time"
|
||||
name="time"
|
||||
value="{% if object.time %}{{ object.time|date:"H:i" }}{% else %}12:00{% endif %}"
|
||||
maxlength="64"
|
||||
required
|
||||
id="id_time">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<button style="margin-top: 20px"
|
||||
class="form-control btn-primary"
|
||||
type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,28 +1,29 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Daily Notifications</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for notification in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:notification_edit" notification.id %}'">
|
||||
<td>{{ notification.time }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Daily Notifications</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for notification in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:notification_edit" notification.id %}'">
|
||||
<td>{{ notification.time }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,64 +1,58 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% load images %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- Entry details -->
|
||||
<div class="col-xl-8 col-lg-7">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Mood stats</h6>
|
||||
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<iframe id="plot" src="plot/" width="800px" height="450px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Mood stats</h6>
|
||||
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<iframe id="plot" src="pies/" width="800px" height="450px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-5">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Activities</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Activity</th>
|
||||
<th>7 days</th>
|
||||
<th>1 month</th>
|
||||
<th>1 year</th>
|
||||
</tr>
|
||||
{% for activity, counts in activities.items %}
|
||||
<tr onclick="window.location.href='activity/{{ activity.id }}/'">
|
||||
<td style="color:{{ activity.color }};"><i class="{{ activity.icon }}"></i><b> {{ activity }}</b></td>
|
||||
<td style="text-align: right;">{{ counts.weekly }}</td>
|
||||
<td style="text-align: right;">{{ counts.monthly }}</td>
|
||||
<td style="text-align: right;">{{ counts.yearly }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<!-- Entry details -->
|
||||
<div class="col-xl-8 col-lg-7">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Mood stats</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<iframe id="plot" src="plot/" width="800px" height="450px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Mood stats</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<iframe id="plot" src="pies/" width="800px" height="450px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-4 col-lg-5">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Activities</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div class="card-body">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Activity</th>
|
||||
<th>7 days</th>
|
||||
<th>1 month</th>
|
||||
<th>1 year</th>
|
||||
</tr>
|
||||
{% for activity, counts in activities.items %}
|
||||
<tr onclick="window.location.href='activity/{{ activity.id }}/'">
|
||||
<td style="color:{{ activity.color }};">
|
||||
<i class="{{ activity.icon }}"></i><b> {{ activity }}</b>
|
||||
</td>
|
||||
<td style="text-align: right;">{{ counts.weekly }}</td>
|
||||
<td style="text-align: right;">{{ counts.monthly }}</td>
|
||||
<td style="text-align: right;">{{ counts.yearly }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% load images %}
|
||||
{% block "content" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
@ -32,4 +32,4 @@
|
|||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock content %}
|
|
@ -1,16 +1,17 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this status? This cannot be undone.</p>
|
||||
<form action="" method="POST">{% csrf_token %}<button class="form-control btn-danger" type="submit">Delete Status</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Delete {{ object }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<p>Are you sure you wish to delete this status? This cannot be undone.</p>
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<button class="form-control btn-danger" type="submit">Delete Status</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% load mood_categories %}
|
||||
{% block "content" %}
|
||||
{% block content %}
|
||||
{% if form.errors %}
|
||||
{% for field in form %}
|
||||
{% for error in field.errors %}
|
||||
|
@ -13,7 +13,7 @@
|
|||
<h6 class="m-0 font-weight-bold text-primary">Edit {{ object.name }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="POST" enctype="multipart/form-data">
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
|
@ -122,4 +122,4 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,34 +1,46 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Moods</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table data-order="[[ 0, "desc" ]]" class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>Mood</th>
|
||||
<th>Activities</th>
|
||||
<th>Title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for status in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:status_view" status.id %}'">
|
||||
<td data-order="{{ status.timestamp | date:"U" }}">{{ status.timestamp }}</td>
|
||||
<td><i data-order="{{ status.mood.value }}" style="color:{{ status.mood.color }};" class="{{ status.mood.icon }}"></i> {{ status.mood }}</td>
|
||||
<td>{% for activity in status.statusactivity_set.all %}<i title="{{ activity.activity }}{% if activity.comment %} - {{ activity.comment }}{% endif %}" style="color:{{ activity.activity.color }};" class="{{ activity.activity.icon }}"></i> {% endfor %}</td>
|
||||
<td>{{ status.short_text }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Your Moods</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table data-order="[[ 0, "desc" ]]"
|
||||
class="table table-bordered"
|
||||
id="dataTable"
|
||||
width="100%"
|
||||
cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<th>Mood</th>
|
||||
<th>Activities</th>
|
||||
<th>Title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for status in object_list %}
|
||||
<tr onclick="window.location.href='{% url "mood:status_view" status.id %}'">
|
||||
<td data-order="{{ status.timestamp | date:"U" }}">{{ status.timestamp }}</td>
|
||||
<td>
|
||||
<i data-order="{{ status.mood.value }}"
|
||||
style="color:{{ status.mood.color }}"
|
||||
class="{{ status.mood.icon }}"></i> {{ status.mood }}
|
||||
</td>
|
||||
<td>
|
||||
{% for activity in status.statusactivity_set.all %}
|
||||
<i title="{{ activity.activity }}{% if activity.comment %} - {{ activity.comment }}{% endif %}"
|
||||
style="color:{{ activity.activity.color }}"
|
||||
class="{{ activity.activity.icon }}"></i>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{ status.short_text }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% block "content" %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<!-- Entry details -->
|
||||
<div class="col-xl-8 col-lg-7">
|
||||
|
@ -74,4 +74,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock "content" %}
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Reference in a new issue