Add: UpdateTicket view and PageTitleMixin

This commit is contained in:
2023-08-06 11:53:09 +09:00
parent 138b8f26ad
commit 02a5492cd5
8 changed files with 67 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
{% extends 'collector/base.html' %}
{% load static %}
{% block title %}<title>Collector - {{ ticket.number }}</title>{% endblock title %}
{% block title %}<title>{{ title }}</title>{% endblock title %}
{% block main %}
<div class="container mt-3">
<div class="row">
@@ -31,7 +31,7 @@
<!-- Card buttons -->
<div class="d-flex w-100 justify-content-between">
<a
href="/"
href="{% url 'collector:update' ticket.platform.name ticket.number %}"
class="btn btn-outline-warning mb-1 mt-1"
><i class="bi bi-pencil-square"></i> Edit</a>
<button

View File

@@ -1,12 +1,12 @@
{% extends 'collector/base.html' %}
{% load static %}
{% load crispy_forms_tags %}
{% block title %}<title>Collector - create</title>{% endblock title %}
{% block title %}<title>{{ title }}</title>{% endblock title %}
{% block main %}
<div class="container mt-3">
<div class="card">
<div class="card-header">
<h4>New ticket:</h4>
<h3>Ticket:</h3>
</div>
<div class="card-body">
{% crispy form %}

View File

@@ -1,8 +1,8 @@
{% extends 'collector/base.html' %}
{% load static %}
{% block title %} {{ title }} {% endblock title %}
{% block content %}
{% include 'collector/includes/navbar.html' %}
<div class="container mt-5">
<div class="container mt-3">
<div class="row">
<form method="post" action="{% url 'collector:delete' ticket.number %}">
{% csrf_token %}

View File

@@ -1,6 +1,6 @@
{% extends 'collector/base.html' %}
{% load static %}
{% block title %}<title>Collector</title>{% endblock title %}
{% block title %}<title>{{ title }}</title>{% endblock title %}
{% block main %}
<div class="container mt-3">
{% csrf_token %}