Skip to content

Commit

Permalink
all pages styled minus homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
imanirak committed Apr 25, 2022
1 parent 163e9e4 commit 93cf714
Show file tree
Hide file tree
Showing 17 changed files with 828 additions and 143 deletions.
102 changes: 98 additions & 4 deletions main_app/static/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ body{

}

.employee-title {
font-size:10px;
}


.default {
display:flex;
Expand All @@ -54,7 +58,7 @@ body{

}

.nav-left a:active, .nav-left a:hover {
a:active, a:hover {
color:var(--dark-gray)
}

Expand Down Expand Up @@ -239,11 +243,35 @@ td{
.employee-info ul li{
font-family:Libre Baskerville;
display:inline-block;

}

.employee-info li {
padding:5px;
padding-left:10px;
padding-right:10px;
}

.employee-info ul {
padding-right:7em;
}

.device-info ul {
padding-right:3em;
}

.inventory-info ul li{
font-family:Libre Baskerville;
display:inline-block;

}

.inventory-info ul {
padding-right:12em;
}

.inventory-info span {
font-size:30px;
padding:5px;
}

.employee-info h2 {
font-size:20px;
Expand Down Expand Up @@ -285,6 +313,52 @@ td{
width:175px;
}



.inventory-add {
margin-top:25px;
margin-bottom:25px;
margin-left:5em;
text-transform:uppercase;
font-family:open sans;
color: var(--dark-purple);
font-weight: 700;
font-size: 14px;
letter-spacing: 1px;
background: rgba(136, 126, 126, 0.04);
padding: 10px 20px;
border: none;
border-radius: 20px;
outline: none;
box-sizing: border-box;
border: 2px solid rgba(0, 0, 0, 0.02);
width:100px;
}



.employee-add {

text-transform:uppercase;
font-family:open sans;
color: var(--dark-purple);
font-weight: 700;
font-size: 14px;
letter-spacing: 1px;
background: rgba(136, 126, 126, 0.04);
padding: 10px 20px;
border: none;
border-radius: 20px;
outline: none;
box-sizing: border-box;
border: 2px solid rgba(0, 0, 0, 0.02);
width:100px;
}

.employee-edit-button a{
padding:0;
}

.employee-top {
display:flex;
justify-content: center;
Expand Down Expand Up @@ -336,10 +410,30 @@ td{
font-weight: 700;
font-size: 14px;
letter-spacing: 1px;
outline: none;
}


outline: none;

.inventory-spacing {
padding-left:2em;
}

.inventory-spacing-value {

padding-left:8em;
}

.employee-title-list {
/* padding-right:15em; */
}


a {
color:var(--dark-purple);
}

.create-title {
font-family:Libre Baskerville;
color:var(--dark-purple);
}
13 changes: 13 additions & 0 deletions main_app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@

</form>
</li>

{% elif request.get_full_path == "/devices/" %}

<ul> <li><form>
<div class="search-bar">
<input type="text" name="name" placeholder="name" class="employee-search-bar"/>
<input type="submit" value="Search" class="employee-search-btn"/>
<a class ="clear" href="{% url 'devices_index' %}">Clear Search</a>
</div>

</form>
</li>

{% endif %}
<li><a href="/">Welcome, {{user.username}}!</a></li>
<li><a href="/accounts/logout">Logout</a></li>
Expand Down
70 changes: 55 additions & 15 deletions main_app/templates/device_create.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,60 @@
{% extends 'base.html' %}
{% block content %}

<div class="contain">
<h1>Add a Device</h1>
<form method="post">
<!-- Security Feature -->
{% csrf_token %}
<!-- Generate inputs -->
{{form.as_p}}
<!-- Submit form -->
<input type="submit" value="Submit" />
<div class="employee-top">
<div class="box1"> <h1 class="employee-heading"></h1></div>

</div>


<div class="container">
<div class="create-title">
<ul>
<div class="column">
<div >
<ul >
<li><h1> Add a Device </h1></li>

</ul>
</div>
<div>
<div>



<div class="card-content">
<table>
<tr class="">
<th>Name</th>
<th>Serial Number</th>
</tr>
<tr>
<div class="borderlines">
<td class="inventory-spacing">
<form action="" method="post">
{% csrf_token %}
{{form.as_p}}
<input type="submit" value="Submit" />
</form>
</td>

</div>

</tr>
</table>




</a>


</div>

</div>



{% endblock %}
</form>


</div>


</div>

70 changes: 57 additions & 13 deletions main_app/templates/devices_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,65 @@

{% block content %}

<div class="container">
<div>
<h1>{{device.name}} Device</h1>
<ul>
{% for employee in devices.employee.all %}
<h4>{{employee.name}}</h4>
{% empty %}
<div>No Devices currently assigned to user.</div>
{% endfor %}
</ul>
</div>

<div class="employee-top">
<div class="box1"> <h1 class="employee-heading"></h1></div>
<div class="box2"> <a href="{% url 'devices_index' %}"><button class="create-employee">back</button></a></div>


</div>


<div class="container">
<div class="create-title">
<ul>
<div class="column">
<div >
<ul >
<li><h1> Edit {{employee.name}} </h1></li>

</ul>
</div>
<div>
<div>


<div class="card-content">
<table>
<tr class="">
<th>Name</th>
<th>Serial Number</th>
</tr>
<tr>
<div class="borderlines">
{% for employee in devices.employee.all %}
<td class="inventory-spacing"> Name: {{device.name}} </td>
{% empty %}
<td class="inventory-spacing"> No Device currently assigned to Employee. </td>


{% endfor %}


</div>

</tr>
</table>




</a>


</div>

</div>

<div class="update">
<a href="{% url 'devices_update' device.pk %}">Edit {{device.device_type}}</a>
<a href="{% url 'devices_delete' device.pk %}">Delete {{device.device_type}}</a>
<a href="{% url 'employee_list'%}"><button class="create-employee">ASSIGN DEVICE</button></a>
<a href="{% url 'devices_update' device.pk %}"><button class="create-employee">Edit {{device.device_type}}</button></a>
<a href="{% url 'devices_delete' device.pk %}"><button class="create-employee">Delete {{device.device_type}}</button></a>

</div>
</div>
Expand Down
56 changes: 50 additions & 6 deletions main_app/templates/devices_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,67 @@
{% extends 'base.html' %}
{% block body %}

<h1>Devices:</h1>


<div class="employee-top">
<div class="box1"> <h1 class="employee-heading">Device Information</h1></div>
<div class="box2"> <a href="{% url 'device_create'%}"><button class="create-employee">+ DEVICE</button></a></div>
</div>

<div class="container">


<div class="column">
<div class="employee-info">
<ul>
<li><h2>Device Name</h2></li>
<span> | </span>
<li><h2>Serial Number</h2></li>
<span> | </span>
<li><h2>Model Number</h2></li>
<span> | </span>
<li><h2>Status</h2></li>



</ul>
</div>

{% for device in devices %}

<div>
<a href="{% url 'devices_show' device.id %}">
<div class="card-content">

{%for employee in device.employee_set.all%}
<h1>{{employee.name}} Device</h1>
<span>{{ device.serial_number }}</span>

<table>
<tr>
<th>Name</th>
<th>Serial Number</th>
<th>Model Number</th>
<th>Status</th>
<th>Ship Status</th>
</tr>
<tr>
<div class="borderlines">
<td class="employee-name">{{device.name}} </td>
<td class="employee-device">{{device.serial_number}}</td>
<td class="employee-device-model-number">{{device.model_number}}</td>
<td class="employee-device-status">{{device.status}}</td>
<td class="employee-edit-btn"><a href="{% url 'devices_detail' device.id%}"><button class="employee-add">EDIT</button></a></td>
</div>

</tr>
</table>

</div>
</a>
</div>

{% endfor %}
{% endfor %}


{% endblock %}
{% endblock %}



Loading

0 comments on commit 93cf714

Please sign in to comment.