Merge branch 'dev'
This commit is contained in:
commit
e91a01f0bf
2
Makefile
2
Makefile
@ -34,7 +34,7 @@ test: ## Run tests
|
||||
|
||||
.PHONY: pull
|
||||
pull:
|
||||
git pull origin master
|
||||
git pull
|
||||
|
||||
.PHONY: start
|
||||
start: ## Restart gunicorn
|
||||
|
@ -1,31 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
{% load mathfilters %}
|
||||
{% block title %}Equipment Information{% endblock %}
|
||||
|
||||
{% block jumbotron %}Equipment{% endblock %}
|
||||
{% block jumbotronsub %}{{ equipment.id }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main role="main">
|
||||
<div class="container">
|
||||
|
||||
<!-- Main jumbotron for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<h1 class="display-3">Equipment: {{ equipment.id }}</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h3>Attributes</h3>
|
||||
<ul>
|
||||
<h3>Attributes</h3>
|
||||
<ul>
|
||||
<li>Type: {{ equipment.keg_type.name }}</li>
|
||||
<li>Size: {{ equipment.keg_type.size_gal }} Gallons</li>
|
||||
<li>Status: {{ equipment.kegstate.name }}</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,17 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
{% load mathfilters %}
|
||||
{% block title %}Kegging Dashboard{% endblock %}
|
||||
|
||||
{% block jumbotron %}Equipment Dashboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main role="main">
|
||||
|
||||
<!-- Main jumbotron for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<h1 class="display-3">Equipment Dashboard</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
@ -14,8 +14,8 @@ def home(request):
|
||||
class EquipmentListView(ListView):
|
||||
model = Equipment
|
||||
|
||||
def equipment(request, keg_id):
|
||||
equipment = get_object_or_404(Equipment, pk=keg_id)
|
||||
def equipment(request, equipment_id):
|
||||
equipment = get_object_or_404(Equipment, pk=equipment_id)
|
||||
return render(request, 'equipment/equipment.html', {'equipment': equipment})
|
||||
|
||||
def equipment_labels(request):
|
||||
|
@ -5,24 +5,20 @@
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
|
||||
<!-- CSS only -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
|
||||
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
|
||||
<!-- JS, Popper.js, and jQuery -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"
|
||||
integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
|
||||
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
|
||||
integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
|
||||
crossorigin="anonymous"></script>
|
||||
{% block script %}{% endblock %}
|
||||
<style>
|
||||
{% block style %}{% endblock %}
|
||||
body {
|
||||
margin-top: 50px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
label {
|
||||
margin-right: 10px;
|
||||
@ -31,83 +27,71 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="/">Damn Yankee Brewing</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
|
||||
aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'yeast:batches' %}">Batches</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false">Operations</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown01">
|
||||
<a class="dropdown-item" href="/yeast/">Yeast</a>
|
||||
<a class="dropdown-item" href="/kegs/">Kegging</a>
|
||||
<a class="dropdown-item" href="/beer/">Beer</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/wiki/">Wiki</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/about/">About</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ user.username }}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">Damn Yankee Brewing</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
|
||||
<a class="dropdown-item" href="#" onclick="document.getElementById('LougoutForm').submit();">Log Out</a>
|
||||
<a class="dropdown-item" href="{% url 'password_change' %}">Change Password</a>
|
||||
{% if user.is_superuser %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{% url 'admin:index' %}">Admin</a>
|
||||
{% endif %}
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'yeast:batches' %}">Batches</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-bs-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false">Brewery Operations</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown01">
|
||||
<a class="dropdown-item" href="/yeast/">Yeast</a>
|
||||
<a class="dropdown-item" href="/equipment/">Equipment</a>
|
||||
<a class="dropdown-item" href="/beer/">Beer</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<div class="dropdown ms-auto">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ user.username }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#" onclick="document.getElementById('LougoutForm').submit();">Log Out</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'password_change' %}">Change Password</a></li>
|
||||
{% if user.is_superuser %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<li><a class="dropdown-item" href="{% url 'admin:index' %}">Admin</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{% url 'login' %}">Log In</a>
|
||||
{% endif %}
|
||||
<form id="LougoutForm" action="{% url 'logout' %}" method="POST" class="form-inline my-2 my-lg-0">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{% url 'login' %}">Log In</a>
|
||||
{% endif %}
|
||||
<form id="LougoutForm" action="{% url 'logout' %}" method="POST" class="form-inline my-2 my-lg-0">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<main role="main">
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<div class="content row">
|
||||
<h2>{% block jumbotron %}{% endblock %}</h2>
|
||||
</div>
|
||||
<div class="content row">
|
||||
<h4>{% block jumbotronsub %}{% endblock %}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container my-5">
|
||||
<div class="p-5 text-left bg-body-tertiary rounded-3">
|
||||
<h1 class="text-body-emphasis">{% block jumbotron %}{% endblock %}</h1>
|
||||
<p class="lead">
|
||||
{% block jumbotronsub %}{% endblock %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
||||
|
||||
</body>
|
||||
{% block endscript %}{% endblock %}
|
||||
</html>
|
||||
|
@ -115,7 +115,7 @@ input, label {
|
||||
});
|
||||
|
||||
document.getElementById('batch-select').addEventListener(
|
||||
'click',
|
||||
'change',
|
||||
function(e){
|
||||
var batch_id = e.target.value;
|
||||
for(var i = 0; i < elements.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user