-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from aalexmrt/development
Update application styles, refactor and add customer forms
- Loading branch information
Showing
25 changed files
with
513 additions
and
1,428 deletions.
There are no files selected for viewing
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
23 changes: 23 additions & 0 deletions
23
invoices/migrations/0021_alter_company_customer_information_file_number_and_more.py
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 @@ | ||
# Generated by Django 4.1.5 on 2023-06-29 19:41 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('invoices', '0020_alter_mailinfo_sent_timestamp'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='company', | ||
name='customer_information_file_number', | ||
field=models.CharField(max_length=100), | ||
), | ||
migrations.AlterField( | ||
model_name='company', | ||
name='name', | ||
field=models.CharField(max_length=100), | ||
), | ||
] |
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
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,19 @@ | ||
.header { | ||
background-color: #004ec1; | ||
color: #fff; | ||
padding: 0.5em; | ||
} | ||
|
||
.logo { | ||
font-size: 24px; | ||
font-weight: bold; | ||
} | ||
|
||
.empty-div{ | ||
width: 100%; | ||
|
||
} | ||
.dropdown:hover .dropdown-menu { | ||
display: block; | ||
margin-top: 0; /* remove the gap so it doesn't close */ | ||
} |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,57 +1,63 @@ | ||
<!DOCTYPE html> | ||
{# Load the tag library #} | ||
{% load bootstrap5 %} | ||
|
||
{# Load CSS and JavaScript #} | ||
{% bootstrap_css %} | ||
{% bootstrap_javascript %} | ||
|
||
{# Display django.contrib.messages as Bootstrap alerts #} | ||
{% bootstrap_messages %} | ||
|
||
{% load static %} | ||
|
||
<html lang="en"> | ||
<head> | ||
<title>Invoices App</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="icon" type="image/x-icon" href="{% static 'invoices/images/favicon.ico' %}"> | ||
<link rel="stylesheet" href="{% static 'invoices/css/styles.css' %}"> | ||
<style> | ||
/* Global styles */ | ||
/* Header styles */ | ||
.header { | ||
background-color: #222; | ||
color: #fff; | ||
padding: 20px; | ||
} | ||
|
||
.logo { | ||
font-size: 24px; | ||
font-weight: bold; | ||
} | ||
</style> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link rel="stylesheet" href="{% static 'invoices/css/base.css' %}"> | ||
{% block css %} | ||
<!-- Additional CSS files specific to each template --> | ||
{% endblock %} | ||
{% bootstrap_css %} | ||
{% bootstrap_javascript %} | ||
</head> | ||
|
||
<body> | ||
<header class="header"> | ||
<div class="d-flex align-items-baseline"> | ||
<div class="logo flex-grow-1 p-2">Invoices App</div> | ||
<div class="p-2"> | ||
<nav class="navigation"> | ||
{% if request.path != '/' %} | ||
<a class="p-4 link-primary" href="{% url 'index' %}">Home</a> | ||
{% endif %} | ||
<a class="btn btn-light" role="button" href="{% url 'add_invoice' %}">➕</a> | ||
</nav> | ||
</div> | ||
|
||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary"> | ||
<div class="container-fluid p-2"> | ||
<a class="navbar-brand" href="{% url 'view_invoices' %}">Invoices App</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarText"> | ||
<div class="collapse navbar-collapse" id="navbarNavDarkDropdown"> | ||
<ul class="navbar-nav"> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
Invoices | ||
</a> | ||
<ul class="dropdown-menu dropdown-menu-light" aria-labelledby="navbarDarkDropdownMenuLink"> | ||
<li><a class="dropdown-item" href="{% url 'add_invoice' %}">New item</a></li> | ||
<li><a class="dropdown-item" href="{% url 'view_invoices' %}">View</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
Customers | ||
</a> | ||
<ul class="dropdown-menu dropdown-menu-light" aria-labelledby="navbarDarkDropdownMenuLink"> | ||
<li><a class="dropdown-item" href="{% url 'add_customer' %}">New item</a></li> | ||
<li><a class="dropdown-item" href="{% url 'view_customers' %}">View</a></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
<div class="container-fluid"> | ||
{% block main %} | ||
<!--Here the content of the page--> | ||
{% endblock %} | ||
</div> | ||
</nav> | ||
|
||
{% block main %} | ||
<!-- Here goes the content of the page --> | ||
{% endblock %} | ||
|
||
{% block javascript %} | ||
<!-- Additional JavaScript files specific to each template --> | ||
{% endblock %} | ||
|
||
</body> | ||
</html> | ||
</html> |
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,21 @@ | ||
{% extends 'invoices/base.html' %} | ||
{% load static %} | ||
{% load crispy_forms_tags %} | ||
|
||
{% block main %} | ||
<div class="container pb-4"> | ||
<form class="my-class" method="post"> | ||
{% csrf_token %} | ||
|
||
<h3 class="mt-4">Company details</h3> | ||
{% crispy company_form %} | ||
<h3 class="mt-4">Address details</h3> | ||
{% crispy address_form %} | ||
<h3 class="mt-4">Contact details</h3> | ||
{% crispy contact_form %} | ||
<div class="text-end"> | ||
<button type="submit" class="mt-4 btn btn-primary">Submit</button> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} |
File renamed without changes.
Oops, something went wrong.