forked from babybuddy/babybuddy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
56 changed files
with
3,282 additions
and
3,077 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends 'babybuddy/page.html' %} | ||
{% load i18n widget_tweaks %} | ||
{% block title %} | ||
{% trans "Delete a Tag" %} | ||
{% endblock %} | ||
{% block breadcrumbs %} | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'core:tag-list' %}">{% trans "Tags" %}</a> | ||
</li> | ||
<li class="breadcrumb-item active" aria-current="page">{% trans "Delete" %}</li> | ||
{% endblock %} | ||
{% block content %} | ||
<form role="form" method="post"> | ||
{% csrf_token %} | ||
{% blocktrans trimmed %} | ||
<h1> | ||
Are you sure you want to delete <span class="text-info">{{ object }}</span>? | ||
</h1> | ||
{% endblocktrans %} | ||
<input type="submit" value="{% trans "Delete" %}" class="btn btn-danger" /> | ||
<a href="{% url 'core:tag-list' %}" class="btn btn-default">{% trans "Cancel" %}</a> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{% extends 'babybuddy/page.html' %} | ||
{% load datetime i18n %} | ||
{% block title %} | ||
{% if request.resolver_match.url_name == 'tag-update' %} | ||
{% trans "Update a Tag" %} | ||
{% else %} | ||
{% trans "Add a Tag" %} | ||
{% endif %} | ||
{% endblock %} | ||
{% block breadcrumbs %} | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'core:sleep-list' %}">{% trans "Tag" %}</a> | ||
</li> | ||
{% if object %} | ||
<li class="breadcrumb-item active" aria-current="page">{% trans "Update" %}</li> | ||
{% else %} | ||
<li class="breadcrumb-item active" aria-current="page">{% trans "Add" %}</li> | ||
{% endif %} | ||
{% endblock %} | ||
{% block content %} | ||
{% if object %} | ||
{% blocktrans trimmed %} | ||
<h1> | ||
Update <span class="text-info">{{ object }}</span> | ||
</h1> | ||
{% endblocktrans %} | ||
{% else %} | ||
<h1>{% trans "Add a Tag" %}</h1> | ||
{% endif %} | ||
{% include 'babybuddy/form.html' %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{% extends 'babybuddy/page.html' %} | ||
{% load i18n widget_tweaks %} | ||
{% block title %} | ||
{% trans "Tags" %} | ||
{% endblock %} | ||
{% block breadcrumbs %} | ||
<li class="breadcrumb-item active" aria-current="page">{% trans "Tags" %}</li> | ||
{% endblock %} | ||
{% block content %} | ||
<h1> | ||
{% trans "Tags" %} | ||
{% if perms.core.add_bmi %} | ||
<a href="{% url 'core:tag-add' %}" class="btn btn-sm btn-success"> | ||
<i class="icon-tag" aria-hidden="true"></i> {% trans "Add Tag" %} | ||
</a> | ||
{% endif %} | ||
</h1> | ||
<div class="table-responsive"> | ||
<table class="table table-instances table-borderless table-striped table-hover align-middle"> | ||
<thead> | ||
<tr> | ||
<th>{% trans "Name" %}</th> | ||
<th>{% trans "Color" %}</th> | ||
<th>{% trans "Last Used" %}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for tag in object_list %} | ||
<tr> | ||
<td>{{ tag.name }}</td> | ||
<td> | ||
<span class="badge badge-pill" | ||
style="background-color:{{ tag.color }}; | ||
margin-right: .25rem"> </span> | ||
<span class="font-monospace">{{ tag.color }}</span> | ||
</td> | ||
<td>{{ tag.last_used }}</td> | ||
<td> | ||
<div class="btn-group btn-group-sm" | ||
role="group" | ||
aria-label="{% trans "Actions" %}"> | ||
{% if perms.core.change_tag %} | ||
<a href="{% url 'core:tag-update' tag.slug %}" class="btn btn-primary"> | ||
<i class="icon-update" aria-hidden="true"></i> | ||
</a> | ||
{% endif %} | ||
{% if perms.core.delete_tag %} | ||
<a href="{% url 'core:tag-delete' tag.slug %}" class="btn btn-danger"> | ||
<i class="icon-delete" aria-hidden="true"></i> | ||
</a> | ||
{% endif %} | ||
</div> | ||
</td> | ||
</tr> | ||
{% empty %} | ||
<tr> | ||
<th colspan="5">{% trans "No tags found." %}</th> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% include 'babybuddy/paginator.html' %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,125 +1,129 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.urls import path | ||
|
||
from . import views | ||
|
||
app_name = "core" | ||
|
||
urlpatterns = [ | ||
path("pumping/", views.PumpingList.as_view(), name="pumping-list"), | ||
path("pumping/add/", views.PumpingAdd.as_view(), name="pumping-add"), | ||
path( | ||
"pumping/<int:pk>/", | ||
views.PumpingUpdate.as_view(), | ||
name="pumping-update", | ||
), | ||
path( | ||
"pumping/<int:pk>/delete/", | ||
views.PumpingDelete.as_view(), | ||
name="pumping-delete", | ||
), | ||
path("children/", views.ChildList.as_view(), name="child-list"), | ||
path("children/add/", views.ChildAdd.as_view(), name="child-add"), | ||
path("children/<str:slug>/", views.ChildDetail.as_view(), name="child"), | ||
path("children/<str:slug>/edit/", views.ChildUpdate.as_view(), name="child-update"), | ||
path( | ||
"children/<str:slug>/delete/", views.ChildDelete.as_view(), name="child-delete" | ||
), | ||
path("timeline/", views.Timeline.as_view(), name="timeline"), | ||
path("changes/", views.DiaperChangeList.as_view(), name="diaperchange-list"), | ||
path("changes/add/", views.DiaperChangeAdd.as_view(), name="diaperchange-add"), | ||
path( | ||
"changes/<int:pk>/", | ||
views.DiaperChangeUpdate.as_view(), | ||
name="diaperchange-update", | ||
), | ||
path( | ||
"changes/<int:pk>/delete/", | ||
views.DiaperChangeDelete.as_view(), | ||
name="diaperchange-delete", | ||
), | ||
path( | ||
"feedings/bottle/add/", | ||
views.BottleFeedingAdd.as_view(), | ||
name="bottle-feeding-add", | ||
), | ||
path("feedings/", views.FeedingList.as_view(), name="feeding-list"), | ||
path("feedings/add/", views.FeedingAdd.as_view(), name="feeding-add"), | ||
path("feedings/<int:pk>/", views.FeedingUpdate.as_view(), name="feeding-update"), | ||
path( | ||
"feedings/<int:pk>/delete/", | ||
views.FeedingDelete.as_view(), | ||
name="feeding-delete", | ||
), | ||
path("notes/", views.NoteList.as_view(), name="note-list"), | ||
path("notes/add/", views.NoteAdd.as_view(), name="note-add"), | ||
path("notes/<int:pk>/", views.NoteUpdate.as_view(), name="note-update"), | ||
path("notes/<int:pk>/delete/", views.NoteDelete.as_view(), name="note-delete"), | ||
path("sleep/", views.SleepList.as_view(), name="sleep-list"), | ||
path("sleep/add/", views.SleepAdd.as_view(), name="sleep-add"), | ||
path("sleep/<int:pk>/", views.SleepUpdate.as_view(), name="sleep-update"), | ||
path("sleep/<int:pk>/delete/", views.SleepDelete.as_view(), name="sleep-delete"), | ||
path("temperature/", views.TemperatureList.as_view(), name="temperature-list"), | ||
path("temperature/add/", views.TemperatureAdd.as_view(), name="temperature-add"), | ||
path( | ||
"temperature/<int:pk>/", | ||
views.TemperatureUpdate.as_view(), | ||
name="temperature-update", | ||
), | ||
path( | ||
"temperature/<int:pk>/delete/", | ||
views.TemperatureDelete.as_view(), | ||
name="temperature-delete", | ||
), | ||
path("timers/", views.TimerList.as_view(), name="timer-list"), | ||
path("timers/add/", views.TimerAdd.as_view(), name="timer-add"), | ||
path("timers/add/quick/", views.TimerAddQuick.as_view(), name="timer-add-quick"), | ||
path("timers/<int:pk>/", views.TimerDetail.as_view(), name="timer-detail"), | ||
path("timers/<int:pk>/edit/", views.TimerUpdate.as_view(), name="timer-update"), | ||
path("timers/<int:pk>/delete/", views.TimerDelete.as_view(), name="timer-delete"), | ||
path( | ||
"timers/<int:pk>/restart/", views.TimerRestart.as_view(), name="timer-restart" | ||
), | ||
path("tummy-time/", views.TummyTimeList.as_view(), name="tummytime-list"), | ||
path("tummy-time/add/", views.TummyTimeAdd.as_view(), name="tummytime-add"), | ||
path( | ||
"tummy-time/<int:pk>/", views.TummyTimeUpdate.as_view(), name="tummytime-update" | ||
), | ||
path( | ||
"tummy-time/<int:pk>/delete/", | ||
views.TummyTimeDelete.as_view(), | ||
name="tummytime-delete", | ||
), | ||
path("weight/", views.WeightList.as_view(), name="weight-list"), | ||
path("weight/add/", views.WeightAdd.as_view(), name="weight-add"), | ||
path("weight/<int:pk>/", views.WeightUpdate.as_view(), name="weight-update"), | ||
path("weight/<int:pk>/delete/", views.WeightDelete.as_view(), name="weight-delete"), | ||
path("height/", views.HeightList.as_view(), name="height-list"), | ||
path("height/add/", views.HeightAdd.as_view(), name="height-add"), | ||
path("height/<int:pk>/", views.HeightUpdate.as_view(), name="height-update"), | ||
path("height/<int:pk>/delete/", views.HeightDelete.as_view(), name="height-delete"), | ||
path( | ||
"head-circumference/", | ||
views.HeadCircumferenceList.as_view(), | ||
name="head-circumference-list", | ||
), | ||
path( | ||
"head-circumference/add/", | ||
views.HeadCircumferenceAdd.as_view(), | ||
name="head-circumference-add", | ||
), | ||
path( | ||
"head-circumference/<int:pk>/", | ||
views.HeadCircumferenceUpdate.as_view(), | ||
name="head-circumference-update", | ||
), | ||
path( | ||
"head-circumference/<int:pk>/delete/", | ||
views.HeadCircumferenceDelete.as_view(), | ||
name="head-circumference-delete", | ||
), | ||
path("bmi/", views.BMIList.as_view(), name="bmi-list"), | ||
path("bmi/add/", views.BMIAdd.as_view(), name="bmi-add"), | ||
path("bmi/<int:pk>/", views.BMIUpdate.as_view(), name="bmi-update"), | ||
path("bmi/<int:pk>/delete/", views.BMIDelete.as_view(), name="bmi-delete"), | ||
] | ||
# -*- coding: utf-8 -*- | ||
from django.urls import path | ||
|
||
from . import views | ||
|
||
app_name = "core" | ||
|
||
urlpatterns = [ | ||
path("pumping/", views.PumpingList.as_view(), name="pumping-list"), | ||
path("pumping/add/", views.PumpingAdd.as_view(), name="pumping-add"), | ||
path( | ||
"pumping/<int:pk>/", | ||
views.PumpingUpdate.as_view(), | ||
name="pumping-update", | ||
), | ||
path( | ||
"pumping/<int:pk>/delete/", | ||
views.PumpingDelete.as_view(), | ||
name="pumping-delete", | ||
), | ||
path("children/", views.ChildList.as_view(), name="child-list"), | ||
path("children/add/", views.ChildAdd.as_view(), name="child-add"), | ||
path("children/<str:slug>/", views.ChildDetail.as_view(), name="child"), | ||
path("children/<str:slug>/edit/", views.ChildUpdate.as_view(), name="child-update"), | ||
path( | ||
"children/<str:slug>/delete/", views.ChildDelete.as_view(), name="child-delete" | ||
), | ||
path("timeline/", views.Timeline.as_view(), name="timeline"), | ||
path("changes/", views.DiaperChangeList.as_view(), name="diaperchange-list"), | ||
path("changes/add/", views.DiaperChangeAdd.as_view(), name="diaperchange-add"), | ||
path( | ||
"changes/<int:pk>/", | ||
views.DiaperChangeUpdate.as_view(), | ||
name="diaperchange-update", | ||
), | ||
path( | ||
"changes/<int:pk>/delete/", | ||
views.DiaperChangeDelete.as_view(), | ||
name="diaperchange-delete", | ||
), | ||
path( | ||
"feedings/bottle/add/", | ||
views.BottleFeedingAdd.as_view(), | ||
name="bottle-feeding-add", | ||
), | ||
path("feedings/", views.FeedingList.as_view(), name="feeding-list"), | ||
path("feedings/add/", views.FeedingAdd.as_view(), name="feeding-add"), | ||
path("feedings/<int:pk>/", views.FeedingUpdate.as_view(), name="feeding-update"), | ||
path( | ||
"feedings/<int:pk>/delete/", | ||
views.FeedingDelete.as_view(), | ||
name="feeding-delete", | ||
), | ||
path("notes/", views.NoteList.as_view(), name="note-list"), | ||
path("notes/add/", views.NoteAdd.as_view(), name="note-add"), | ||
path("notes/<int:pk>/", views.NoteUpdate.as_view(), name="note-update"), | ||
path("notes/<int:pk>/delete/", views.NoteDelete.as_view(), name="note-delete"), | ||
path("sleep/", views.SleepList.as_view(), name="sleep-list"), | ||
path("sleep/add/", views.SleepAdd.as_view(), name="sleep-add"), | ||
path("sleep/<int:pk>/", views.SleepUpdate.as_view(), name="sleep-update"), | ||
path("sleep/<int:pk>/delete/", views.SleepDelete.as_view(), name="sleep-delete"), | ||
path("temperature/", views.TemperatureList.as_view(), name="temperature-list"), | ||
path("temperature/add/", views.TemperatureAdd.as_view(), name="temperature-add"), | ||
path( | ||
"temperature/<int:pk>/", | ||
views.TemperatureUpdate.as_view(), | ||
name="temperature-update", | ||
), | ||
path( | ||
"temperature/<int:pk>/delete/", | ||
views.TemperatureDelete.as_view(), | ||
name="temperature-delete", | ||
), | ||
path("tags/", views.TagAdminList.as_view(), name="tag-list"), | ||
path("tags/add/", views.TagAdminAdd.as_view(), name="tag-add"), | ||
path("tags/<str:slug>/", views.TagAdminUpdate.as_view(), name="tag-update"), | ||
path("tags/<str:slug>/delete/", views.TagAdminDelete.as_view(), name="tag-delete"), | ||
path("timers/", views.TimerList.as_view(), name="timer-list"), | ||
path("timers/add/", views.TimerAdd.as_view(), name="timer-add"), | ||
path("timers/add/quick/", views.TimerAddQuick.as_view(), name="timer-add-quick"), | ||
path("timers/<int:pk>/", views.TimerDetail.as_view(), name="timer-detail"), | ||
path("timers/<int:pk>/edit/", views.TimerUpdate.as_view(), name="timer-update"), | ||
path("timers/<int:pk>/delete/", views.TimerDelete.as_view(), name="timer-delete"), | ||
path( | ||
"timers/<int:pk>/restart/", views.TimerRestart.as_view(), name="timer-restart" | ||
), | ||
path("tummy-time/", views.TummyTimeList.as_view(), name="tummytime-list"), | ||
path("tummy-time/add/", views.TummyTimeAdd.as_view(), name="tummytime-add"), | ||
path( | ||
"tummy-time/<int:pk>/", views.TummyTimeUpdate.as_view(), name="tummytime-update" | ||
), | ||
path( | ||
"tummy-time/<int:pk>/delete/", | ||
views.TummyTimeDelete.as_view(), | ||
name="tummytime-delete", | ||
), | ||
path("weight/", views.WeightList.as_view(), name="weight-list"), | ||
path("weight/add/", views.WeightAdd.as_view(), name="weight-add"), | ||
path("weight/<int:pk>/", views.WeightUpdate.as_view(), name="weight-update"), | ||
path("weight/<int:pk>/delete/", views.WeightDelete.as_view(), name="weight-delete"), | ||
path("height/", views.HeightList.as_view(), name="height-list"), | ||
path("height/add/", views.HeightAdd.as_view(), name="height-add"), | ||
path("height/<int:pk>/", views.HeightUpdate.as_view(), name="height-update"), | ||
path("height/<int:pk>/delete/", views.HeightDelete.as_view(), name="height-delete"), | ||
path( | ||
"head-circumference/", | ||
views.HeadCircumferenceList.as_view(), | ||
name="head-circumference-list", | ||
), | ||
path( | ||
"head-circumference/add/", | ||
views.HeadCircumferenceAdd.as_view(), | ||
name="head-circumference-add", | ||
), | ||
path( | ||
"head-circumference/<int:pk>/", | ||
views.HeadCircumferenceUpdate.as_view(), | ||
name="head-circumference-update", | ||
), | ||
path( | ||
"head-circumference/<int:pk>/delete/", | ||
views.HeadCircumferenceDelete.as_view(), | ||
name="head-circumference-delete", | ||
), | ||
path("bmi/", views.BMIList.as_view(), name="bmi-list"), | ||
path("bmi/add/", views.BMIAdd.as_view(), name="bmi-add"), | ||
path("bmi/<int:pk>/", views.BMIUpdate.as_view(), name="bmi-update"), | ||
path("bmi/<int:pk>/delete/", views.BMIDelete.as_view(), name="bmi-delete"), | ||
] |
Oops, something went wrong.