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
d8829f75
Commit
d8829f75
authored
May 10, 2023
by
Eldon Dagdag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied CSS styling to Forum pages via bootstrap
parent
51a1414f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
171 additions
and
50 deletions
+171
-50
models.py
widget_jenicaesports/dashboard/models.py
+1
-1
forum.html
widget_jenicaesports/forum/templates/forum/forum.html
+45
-17
forumpost-add.html
...et_jenicaesports/forum/templates/forum/forumpost-add.html
+36
-8
forumpost-details.html
...enicaesports/forum/templates/forum/forumpost-details.html
+53
-16
forumpost-edit.html
...t_jenicaesports/forum/templates/forum/forumpost-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
No files found.
widget_jenicaesports/dashboard/models.py
View file @
d8829f75
...
@@ -14,4 +14,4 @@ class WidgetUser(models.Model):
...
@@ -14,4 +14,4 @@ class WidgetUser(models.Model):
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
CASCADE
)
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
def
__str__
(
self
):
return
'Name: {}, {} {}'
.
format
(
self
.
last_name
,
self
.
first_name
,
self
.
middle_name
)
return
'{}, {} {}'
.
format
(
self
.
last_name
,
self
.
first_name
,
self
.
middle_name
)
\ No newline at end of file
\ No newline at end of file
widget_jenicaesports/forum/templates/forum/forum.html
View file @
d8829f75
...
@@ -2,22 +2,50 @@
...
@@ -2,22 +2,50 @@
{% load static %}
{% load static %}
{% block title %}Widget's Forum{% endblock %}
{% block title %}Widget's Forum{% endblock %}
{% block content %}
{% block content %}
<html>
<div
class=
"row"
>
<h1>
Welcome to Widget's Forum!
</h1>
<div
class=
"col-3 text-center text-white"
style=
"background-color:#052c65"
>
<body>
<br>
<h3>
Forum posts:
</h3>
<br>
{% for post in posts %}
<img
src=
"{% static 'forum_icon.png'%}"
class=
"img-fluid"
width=
"100"
height=
"100"
>
<ul>
<br>
<a
href=
"{{ post.get_absolute_url }}"
>
{{ post.title }} by {{ post.author.first_name }} {{post.author.last_name }}
</a>
<br>
</ul>
<h2>
Forum
</h2>
{% endfor %}
<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's Forum
</h1>
</div>
<br>
<br>
<h6
class=
"display-3"
style=
"font-size:40px; color:#052c65"
>
Forum posts:
</h6>
{% for post in posts %}
<a
href=
"{{ post.get_absolute_url }}"
class=
"link-dark; display-3"
style=
"font-size:18px; color:#052c65"
>
{{ post.title }} by {{ post.author.first_name }} {{post.author.last_name }}
</a>
<br>
{% endfor %}
<br><br>
<button
type=
"button"
class=
"btn btn-dark"
style=
"background-color:#e3e4e6"
>
<a
href=
"/forum/forumposts/add/"
class=
"link-dark"
>
New Post
</a>
</button>
<br>
<br>
<br>
<button
type=
"button"
class=
"btn"
style=
"background-color:#052c65"
>
<a
href=
"/dashboard/"
class=
"link-light"
>
Dashboard
</a>
</button>
<button
type=
"button"
class=
"btn"
style=
"background-color:#334277"
>
<a
href=
"/announcements/"
class=
"link-light"
>
Announcement Board
</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>
<button
class=
"button"
><a
href=
"/forum/forumposts/add/"
>
New Post
</a></button>
<br><br>
<a
href=
"/dashboard/"
>
Dashboard
</a><br>
<a
href=
"/announcements/"
>
Announcements
</a><br>
<a
href=
"/assignments/"
>
Assignments
</a><br>
<a
href=
"/calendar/"
>
Calendar
</a>
</body>
</html>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_jenicaesports/forum/templates/forum/forumpost-add.html
View file @
d8829f75
...
@@ -2,12 +2,40 @@
...
@@ -2,12 +2,40 @@
{% load static %}
{% load static %}
{% block title %}Add Post{% endblock %}
{% block title %}Add Post{% endblock %}
{% block content %}
{% block content %}
<h3>
Add a new post.
</h3>
<div
class=
"row"
>
<form
method=
"post"
>
<div
class=
"col-3 text-center text-white"
style=
"background-color:#052c65"
>
{% csrf_token %}
<br>
{% for field in form %}
<br>
{{ field.label }}: {{ field }}
<br><br>
<img
src=
"{% static 'forum_icon.png'%}"
class=
"img-fluid"
width=
"100"
height=
"100"
>
{% endfor %}
<br>
<input
type=
"submit"
value=
"Save New Post"
>
<br>
</form>
<h2>
Calendar
</h2>
<h4
class=
"display-6"
style=
"font-size:20px"
>
Add New Forum Post
</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 post:
</h1>
</div>
<br>
<div
class=
"row"
></div>
<form
method=
"post"
>
{% csrf_token %}
{% for field in form %}
<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"
class=
"btn btn-dark"
value=
"Save New Post"
style=
"background-color:#052c65"
>
</form>
<br><br>
</div>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_jenicaesports/forum/templates/forum/forumpost-details.html
View file @
d8829f75
...
@@ -2,22 +2,59 @@
...
@@ -2,22 +2,59 @@
{% load static %}
{% load static %}
{% block title %}{{ object.title }}{% endblock %}
{% block title %}{{ object.title }}{% endblock %}
{% block content %}
{% block content %}
<h3>
{{ object.title }}
</h4>
<div
class=
"row"
>
<h4>
by {{ object.author.first_name }} {{ object.author.last_name }}
</h4>
<div
class=
"col-3 text-center text-white"
style=
"background-color:#052c65"
>
<h4>
{{ object.formatted_date }}, {{object.formatted_time }}
</h4>
<br>
<h4>
{{ object.body }}
</h4>
<br>
<br><br>
<img
src=
"{% static 'forum_icon.png'%}"
class=
"img-fluid"
width=
"100"
height=
"100"
>
<br>
<br>
<h2>
Forum
</h2>
<h4
class=
"display-6"
style=
"font-size:20px"
>
Forum Post 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.title }}
</h1>
</div>
<br>
<div
class=
"row"
>
<div
class=
"col-5"
style=
"text-align:right"
>
<h4
style=
"font-size:25px"
>
By:
</h4>
<h4
style=
"font-size:25px"
>
Posted On:
</h4>
</div>
<div
class=
"col-7"
style=
"text-align:left"
>
<h5
class=
"display-3"
style=
"font-size:25px"
>
{{ object.author.first_name }} {{ object.author.last_name }}
</h5>
<h5
class=
"display-3"
style=
"font-size:25px"
>
{{ object.formatted_date }}, {{ object.formatted_time }}
</h5>
</div>
</div>
<br>
<div
class=
"row p-2"
style=
"background-color:#e3e4e6"
>
<h5
class=
"display-3"
style=
"font-size:25px"
>
{{ object.body }}
</h5>
</div>
<br>
<h3>
POST REPLIES:
</h3>
<div
class=
"row"
><h3
class=
"display-3"
style=
"font-size:35px; color:#052c65"
>
Post Replies:
</h3></div>
{% for reply in reply_list %}
{% if reply.forum_post.title == object.title %}
{% for reply in reply_list %}
<ul>
{% if reply.forum_post.title == object.title %}
<h4>
by {{ reply.author.first_name }} {{ reply.author.last_name }}
</h4>
<div
class=
"row p-5 text-center"
style=
"background-color:#e3e4e6"
>
<h4>
{{ reply.formatted_date }}, {{ reply.formatted_time }}
</h4>
<h1
class=
"display-3"
style=
"font-size:25px; color:#052c65"
>
{{ reply.body }}
</h1>
<h4>
{{ reply.body }}
</h4><br>
<h1
class=
"display-3"
style=
"font-size:20px; color:#052c65"
>
by {{ reply.author.first_name }} {{ reply.author.last_name }}
</h1>
</ul>
<h1
class=
"display-3"
style=
"font-size:15px; color:#052c65"
>
{{ reply.formatted_date }}, {{ reply.formatted_time }}
</h1>
{% endif %}
</div>
{% endfor %}
{% endif %}
{% endfor %}
<br><br>
<button
type=
"button"
class=
"btn"
style=
"background-color:#e3e4e6"
>
<a
href=
"/forum/forumposts/{{ object.pk }}/edit/"
class=
"link-dark"
>
Edit Post
</a>
</button>
<button
type=
"button"
class=
"btn"
style=
"background-color:#052c65"
>
<a
href=
"/forum/"
class=
"link-light"
>
Back to Forum
</a>
</button>
</div>
</div>
<h3><button
class=
"button"
><a
href=
"/forum/forumposts/{{ object.pk }}/edit/"
>
Edit Post
</a></button></h3>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_jenicaesports/forum/templates/forum/forumpost-edit.html
View file @
d8829f75
...
@@ -2,12 +2,40 @@
...
@@ -2,12 +2,40 @@
{% load static %}
{% load static %}
{% block title %}Edit Post{% endblock %}
{% block title %}Edit Post{% endblock %}
{% block content %}
{% block content %}
<h3>
Edit Post:
</h3>
<div
class=
"row"
>
<form
method=
"post"
>
<div
class=
"col-3 text-center text-white"
style=
"background-color:#052c65"
>
{% csrf_token %}
<br>
{% for field in form %}
<br>
{{ field.label }}: {{ field }}
<br>
<img
src=
"{% static 'forum_icon.png'%}"
class=
"img-fluid"
width=
"100"
height=
"100"
>
{% endfor %}
<br>
<input
type=
"submit"
value=
"Save Changes to Post"
>
<br>
</form>
<h2>
Calendar
</h2>
<h4
class=
"display-6"
style=
"font-size:20px"
>
Edit Forum Post
</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 post:
</h1>
</div>
<br>
<div
class=
"row"
></div>
<form
method=
"post"
>
{% csrf_token %}
{% for field in form %}
<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"
class=
"btn btn-dark"
value=
"Save Changes to Post"
style=
"background-color:#052c65"
>
</form>
<br><br>
</div>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_jenicaesports/static/announcements_icon.png
0 → 100644
View file @
d8829f75
22.4 KB
widget_jenicaesports/static/assignments_icon.png
0 → 100644
View file @
d8829f75
12.2 KB
widget_jenicaesports/static/calendar_icon.png
0 → 100644
View file @
d8829f75
4.22 KB
widget_jenicaesports/static/dashboard_icon.png
0 → 100644
View file @
d8829f75
16 KB
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