Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_princessgabi
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
Ysabella Panghulan
midterm_princessgabi
Commits
4417587c
Commit
4417587c
authored
May 15, 2023
by
Ysabella Panghulan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'forumv2'
parents
2ae4db13
65736c8b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
50 deletions
+58
-50
forum.css
widget_princessgabi/forum/static/forum/forum.css
+1
-1
forum.html
widget_princessgabi/forum/templates/forum/forum.html
+1
-2
forumpost-add.html
widget_princessgabi/forum/templates/forum/forumpost-add.html
+24
-20
forumpost-details.html
...princessgabi/forum/templates/forum/forumpost-details.html
+7
-6
forumpost-edit.html
...et_princessgabi/forum/templates/forum/forumpost-edit.html
+24
-20
urls.py
widget_princessgabi/forum/urls.py
+1
-1
No files found.
widget_princessgabi/forum/static/forum/forum.css
View file @
4417587c
...
...
@@ -11,4 +11,4 @@ body {
padding
:
2rem
;
border-radius
:
0.5rem
;
background-color
:
white
}
}
\ No newline at end of file
widget_princessgabi/forum/templates/forum/forum.html
View file @
4417587c
...
...
@@ -2,7 +2,6 @@
{% load static %}
{% block stylesheets %}
<link
rel=
"stylesheet"
href=
"{% static 'forum.css' %}"
>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
>
{% endblock %}
...
...
@@ -31,7 +30,7 @@
{% endblock %}
<div
class=
"links"
>
<a
href=
"../dashboard/"
class=
"btn-primary"
>
Dashboard
</a>
<a
href=
"../announcements/"
class=
"btn-primary"
>
Announcement
Board
</a>
<a
href=
"../announcements/"
class=
"btn-primary"
>
Announcement
s
</a>
<a
href=
"../assignments/"
class=
"btn-primary"
>
Assignments
</a>
<a
href=
"../calendar/"
class=
"btn-primary"
>
Calendar
</a>
</div>
...
...
widget_princessgabi/forum/templates/forum/forumpost-add.html
View file @
4417587c
...
...
@@ -8,26 +8,30 @@
{% block title %}Add Post{% endblock %}
{% block content %}
{{ form.non_field_errors }}
{% for field in form %}
{% if field.errors %}
<p>
{{ field.label }}has the following errors:
</p>
<ul>
{% for error in field.errors %}
<li>
{{ error }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% block header %}
<h1>
Add a new post:
</h1>
{% endblock %}
{% block body %}
{% block content %}
{{ form.non_field_errors }}
{% for field in form %}
{% if field.errors %}
<p>
{{ field.label }}has the following errors:
</p>
<ul>
{% for error in field.errors %}
<li>
{{ error }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
<div
class =
"form"
>
<form
method =
'POST'
>
{% csrf_token %}
{{ form.as_p }}
<input
type =
"submit"
value =
"Save New Post"
>
</form>
</div>
<div
class =
"form"
>
<form
method =
'POST'
>
{% csrf_token %}
{{ form.as_p }}
<input
type =
"submit"
value =
"Save New Post"
>
</form>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_princessgabi/forum/templates/forum/forumpost-details.html
View file @
4417587c
...
...
@@ -4,12 +4,13 @@
{% block stylesheets %}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'forum/forum.css' %}"
>
<link
rel=
"stylesheet"
href=
"
'https://cdnjs.cloudf
are.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"
https://cdnjs.cloudfl
are.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
>
{% endblock %}
{% block title %} {{ object.title }} {% endblock %}
<div
class =
"forum-content"
>
{% block body %}
<div
class =
"forum-content"
>
{% block content %}
<h1>
{{ object.title }}
</h1>
<h2>
by {{ object.author.first_name }} {{ object.author.last_name }}
</h2>
...
...
@@ -26,8 +27,8 @@
</li>
{% endfor %}
</ul>
<a
href =
"{% url 'forum:forumpost-edit' forumpost.id %}"
class =
"edit-btn"
><i
class =
"fa fa-edit"
></i>
Edit Post
</a>
</div
>
{% endblock %}
<a
href =
"{% url 'forum:forumpost-edit' forumpost.id %}"
class =
"edit-btn"
><i
class =
"fa fa-edit"
></i>
Edit Post
</a
>
</div>
{% endblock %}
\ No newline at end of file
widget_princessgabi/forum/templates/forum/forumpost-edit.html
View file @
4417587c
...
...
@@ -8,26 +8,30 @@
{% block title %}Edit Post{% endblock %}
{% block content %}
{{ form.non_field_errors }}
{% for field in form %}
{% if field.errors %}
<p>
{{ field.label }}has the following errors:
</p>
<ul>
{% for error in field.errors %}
<li>
{{ error }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% block header %}
<h1>
Edit Post:
</h1>
{% endblock %}
{% block body %}
{% block content %}
{{ form.non_field_errors }}
{% for field in form %}
{% if field.errors %}
<p>
{{ field.label }}has the following errors:
</p>
<ul>
{% for error in field.errors %}
<li>
{{ error }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
<div
class =
"forum"
>
<form
method =
'POST'
>
{% csrf_token %}
{{ form.as_p }}
<input
type =
"submit"
value =
"Save Changes to Post"
>
</form>
</div>
<div
class =
"form"
>
<form
method =
'POST'
>
{% csrf_token %}
{{ form.as_p }}
<input
type =
"submit"
value =
"Save Changes to Post"
>
</form>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_princessgabi/forum/urls.py
View file @
4417587c
...
...
@@ -3,7 +3,7 @@ from .views import forum, ForumPostDetailView, ForumPostCreateView, ForumPostUpd
urlpatterns
=
[
path
(
''
,
forum
,
name
=
"forum"
),
path
(
'forum
/forum
posts/<int:pk>/details/'
,
ForumPostDetailView
.
as_view
(),
name
=
"forumpost-details"
),
path
(
'forumposts/<int:pk>/details/'
,
ForumPostDetailView
.
as_view
(),
name
=
"forumpost-details"
),
path
(
'forumposts/add'
,
ForumPostCreateView
.
as_view
(),
name
=
"forumpost-add"
),
path
(
'forumposts/<int:pk>/edit'
,
ForumPostUpdateView
.
as_view
(),
name
=
"forumpost-edit"
)
]
...
...
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