Commit 46a5e9ce authored by Jenica Vizmanos's avatar Jenica Vizmanos

Applied CSS styling to Dashboard pages via bootstrap

parent 17b10071
......@@ -9,9 +9,9 @@ class Department(models.Model):
return '{}, {}'.format(self.dept_name, self.home_unit)
class WidgetUser(models.Model):
first_name = models.CharField(max_length=255, default='')
middle_name = models.CharField(max_length=255, default='')
last_name = models.CharField(max_length=255, default='')
first_name = models.CharField(max_length=255, default='', verbose_name='First Name')
middle_name = models.CharField(max_length=255, default='', verbose_name='Middle Name')
last_name = models.CharField(max_length=255, default='', verbose_name='Last Name')
department = models.ForeignKey(Department, on_delete=models.CASCADE, verbose_name='Department, Home Unit')
def __str__(self):
......
......@@ -2,20 +2,49 @@
{% load static %}
{% block title %}Widget v2{% endblock %}
{% block content %}
<h1>Welcome to Widget!</h1>
<p>
Widget Users:<br>
<div class="row">
<div class="col-3 text-center text-white" style="background-color:#052c65">
<br>
<br>
<img src="{% static 'dashboard_icon.png'%}" class="img-fluid" width="100" height="100">
<br>
<br>
<h2>Dashboard</h2>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<p>© Jenica e-Sports</p>
</div>
<div class="col-9 text-center">
<div class="row p-5 text-center" style="background-color:#e3e4e6">
<h1 class="display-3"style="font-size:60px; color:#052c65">Welcome to Widget!</h1>
</div>
<br>
<br>
<h6 class="display-3"style="font-size:40px; color:#052c65">Widget Users:</h6><br>
{% for user in users %}
<a href='{{ user.get_absolute_url }}'>{{ user }}</a><br>
<a href="{{ user.get_absolute_url }}" class="link-dark; display-3" style="font-size:18px; color:#052c65">
{{ user }}</a>
<br>
{% endfor %}
</p>
<p>
<button class='button'><a href='/dashboard/widgetusers/add/'>Add Widget User</a></button>
</p>
<p>
<a href='/announcements/'>Announcement Board</a><br>
<a href='/forum/'>Forum</a><br>
<a href='/assignments/'>Assignments</a><br>
<a href='/calendar/'>Calendar</a><br>
</p>
<br><br>
<button type="button" class="btn" style="background-color:#e3e4e6">
<a href="/dashboard/widgetusers/add/" class="link-dark">Add Widget User</a>
</button>
<br>
<br>
<br>
</button> &nbsp;
<button type="button" class="btn" style="background-color:#052c65">
<a href="/announcements/" class="link-light">Announcement Board</a>
</button> &nbsp;
<button type="button" class="btn" style="background-color:#334277">
<a href="/forum/" class="link-light">Forum</a>
</button> &nbsp;
<button type="button" class="btn" style="background-color:#425086">
<a href="/assignments/" class="link-light">Assignments</a>
</button> &nbsp;
<button type="button" class="btn" style="background-color:#515e96">
<a href="/calendar/" class="link-light">Calendar</a>
</button>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,12 +2,40 @@
{% load static %}
{% block title %}Add Widget User{% endblock %}
{% block content %}
<h1>Add a new Widget User:</h1>
<form method="post">
<div class="row">
<div class="col-3 text-center text-white" style="background-color:#052c65">
<br>
<br>
<img src="{% static 'dashboard_icon.png'%}" class="img-fluid" width="100" height="100">
<br>
<br>
<h2>Dashboard</h2>
<h4 class="display-6" style="font-size:20px">Add Widget User</h4>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<p>© Jenica e-Sports</p>
</div>
<div class="col-9 text-center">
<div class="row p-5 text-center" style="background-color:#e3e4e6">
<h1 class="display-3" style="font-size:50px; color:#052c65">Add a new widget user:</h1>
</div>
<br>
<div class="row"></div>
<form method="post">
{% csrf_token %}
{% for field in form %}
{{ field.label }}: {{ field }}<br><br>
<div class="row">
<div class="col-5" style="text-align:right">
<h5 class="display-3" style="font-size:25px">{{field.label}}:</h4>
</div>
<div class="col-7" style="text-align:left">
{{field}}
</div>
</div>
<br>
{% endfor %}
<input type="submit" value="Add Widget User">
</form>
<input type="submit" class="btn btn-dark" value="Add Widget User" style="background-color:#052c65">
</form>
<br><br>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,12 +2,40 @@
{% load static %}
{% block title %}{{ object }}{% endblock %}
{% block content %}
<h1>{{ object.first_name }} {{ object.middle_name }} {{ object.last_name }}</h1>
<p>
{{ object.department.dept_name }}<br>
{{ object.department.home_unit }}
</p>
<p>
<button class='button'><a href='/dashboard/widgetusers/{{ object.pk }}/edit/'>Edit Widget User</a></button>
</p>
<div class="row">
<div class="col-3 text-center text-white" style="background-color:#052c65">
<br>
<br>
<img src="{% static 'dashboard_icon.png'%}" class="img-fluid" width="100" height="100">
<br>
<br>
<h2>Dashboard</h2>
<h4 class="display-6" style="font-size:20px">Widget User Details</h4>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<p>© Jenica e-Sports</p>
</div>
<div class="col-9 text-center">
<div class="row p-5 text-center" style="background-color:#e3e4e6">
<h1 class="display-3" style="font-size:50px; color:#052c65">{{ object.first_name }} {{ object.middle_name }} {{ object.last_name }}</h1>
</div>
<br>
<div class="row">
<div class="col-5" style="text-align:right">
<h4 style="font-size:25px">Department Name:</h4>
<h4 style="font-size:25px">Home Unit:</h4>
</div>
<div class="col-7" style="text-align:left">
<h5 class="display-3" style="font-size:25px">{{ object.department.dept_name }}</h5>
<h5 class="display-3" style="font-size:25px">{{ object.department.home_unit }}</h5>
</div>
</div>
<br><br>
<button type="button" class="btn" style="background-color:#e3e4e6">
<a href="/dashboard/widgetusers/{{ object.pk }}/edit/" class="link-dark">Edit Widget User</a>
</button> &nbsp; &nbsp;
<button type="button" class="btn" style="background-color:#052c65">
<a href="/dashboard/" class="link-light">Back to Dashboard</a>
</button>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,12 +2,40 @@
{% load static %}
{% block title %}Edit Widget User{% endblock %}
{% block content %}
<h1>Edit Widget User:</h1>
<form method="post">
<div class="row">
<div class="col-3 text-center text-white" style="background-color:#052c65">
<br>
<br>
<img src="{% static 'dashboard_icon.png'%}" class="img-fluid" width="100" height="100">
<br>
<br>
<h2>Dashboard</h2>
<h4 class="display-6" style="font-size:20px">Edit Widget User</h4>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<p>© Jenica e-Sports</p>
</div>
<div class="col-9 text-center">
<div class="row p-5 text-center" style="background-color:#e3e4e6">
<h1 class="display-3" style="font-size:50px; color:#052c65">Edit Widget User:</h1>
</div>
<br>
<div class="row"></div>
<form method="post">
{% csrf_token %}
{% for field in form %}
{{ field.label }}: {{ field }}<br><br>
<div class="row">
<div class="col-5" style="text-align:right">
<h5 class="display-3" style="font-size:25px">{{field.label}}:</h4>
</div>
<div class="col-7" style="text-align:left">
{{field}}
</div>
</div>
<br>
{% endfor %}
<input type="submit" value="Save Changes to Widget User">
</form>
<input type="submit" class="btn btn-dark" value="Save Changes to Widget User" style="background-color:#052c65">
</form>
<br><br>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -126,6 +126,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_URL = 'static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment