Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_jenicaesports
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christianneil Emmanuel Ocampo
midterm_jenicaesports
Commits
46a5e9ce
Commit
46a5e9ce
authored
May 10, 2023
by
Jenica Vizmanos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied CSS styling to Dashboard pages via bootstrap
parent
17b10071
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
157 additions
and
43 deletions
+157
-43
models.py
widget_jenicaesports/dashboard/models.py
+3
-3
dashboard.html
...enicaesports/dashboard/templates/dashboard/dashboard.html
+45
-16
widgetuser-add.html
...esports/dashboard/templates/dashboard/widgetuser-add.html
+36
-8
widgetuser-details.html
...rts/dashboard/templates/dashboard/widgetuser-details.html
+36
-8
widgetuser-edit.html
...sports/dashboard/templates/dashboard/widgetuser-edit.html
+36
-8
announcements_icon.png
widget_jenicaesports/static/announcements_icon.png
+0
-0
assignments_icon.png
widget_jenicaesports/static/assignments_icon.png
+0
-0
calendar_icon.png
widget_jenicaesports/static/calendar_icon.png
+0
-0
dashboard_icon.png
widget_jenicaesports/static/dashboard_icon.png
+0
-0
forum_icon.png
widget_jenicaesports/static/forum_icon.png
+0
-0
settings.py
widget_jenicaesports/widget_jenicaesports/settings.py
+1
-0
No files found.
widget_jenicaesports/dashboard/models.py
View file @
46a5e9ce
...
...
@@ -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
):
...
...
widget_jenicaesports/dashboard/templates/dashboard/dashboard.html
View file @
46a5e9ce
...
...
@@ -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>
<button
type=
"button"
class=
"btn"
style=
"background-color:#052c65"
>
<a
href=
"/announcements/"
class=
"link-light"
>
Announcement Board
</a>
</button>
<button
type=
"button"
class=
"btn"
style=
"background-color:#334277"
>
<a
href=
"/forum/"
class=
"link-light"
>
Forum
</a>
</button>
<button
type=
"button"
class=
"btn"
style=
"background-color:#425086"
>
<a
href=
"/assignments/"
class=
"link-light"
>
Assignments
</a>
</button>
<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
widget_jenicaesports/dashboard/templates/dashboard/widgetuser-add.html
View file @
46a5e9ce
...
...
@@ -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
widget_jenicaesports/dashboard/templates/dashboard/widgetuser-details.html
View file @
46a5e9ce
...
...
@@ -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>
<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
widget_jenicaesports/dashboard/templates/dashboard/widgetuser-edit.html
View file @
46a5e9ce
...
...
@@ -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
widget_jenicaesports/static/announcements_icon.png
0 → 100644
View file @
46a5e9ce
22.4 KB
widget_jenicaesports/static/assignments_icon.png
0 → 100644
View file @
46a5e9ce
12.2 KB
widget_jenicaesports/static/calendar_icon.png
0 → 100644
View file @
46a5e9ce
4.22 KB
widget_jenicaesports/static/dashboard_icon.png
0 → 100644
View file @
46a5e9ce
16 KB
widget_jenicaesports/static/forum_icon.png
0 → 100644
View file @
46a5e9ce
18.5 KB
widget_jenicaesports/widget_jenicaesports/settings.py
View file @
46a5e9ce
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment