diff --git a/template/edit_group_post.html b/template/edit_group_post.html new file mode 100644 index 0000000..84ad580 --- /dev/null +++ b/template/edit_group_post.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} + +{% block title %}Edit Post in {{ group.name }}{% endblock %} + +{% block content %} +

Edit Post in {{ group.name }}

+
+
+ + +
+
+ + Cancel +
+
+{% endblock %} + +{% block scripts %} +{{ super() }} + + +{% endblock %} + +{% block styles %} +{{ super() }} + + +{% endblock %} \ No newline at end of file diff --git a/template/edit_post.html b/template/edit_post.html new file mode 100644 index 0000000..375adba --- /dev/null +++ b/template/edit_post.html @@ -0,0 +1,123 @@ +{% extends "base.html" %} + +{% block title %}Edit Post{% endblock %} + +{% block content %} +

Edit Post

+
+
+ + +
+
+ + +
+
+{% endblock %} + +{% block styles %} +{{ super() }} + + +{% endblock %} + +{% block scripts %} +{{ super() }} + + +{% endblock %} \ No newline at end of file diff --git a/template/group_detail.html b/template/group_detail.html new file mode 100644 index 0000000..9998cca --- /dev/null +++ b/template/group_detail.html @@ -0,0 +1,511 @@ +{% extends "base.html" %} + +{% block title %}{{ group.name }}{% endblock %} + +{% block content %} +
+
+ +
+
+
+ {% if group.image_url %} + {{ group.name }} + {% else %} +
+ {{ group.name[0].upper() }} +
+ {% endif %} +

{{ group.name }}

+

{{ group.description }}

+ {% if current_user.is_authenticated and current_user not in group.members %} + {% if group.visibility == 'public' or group.visibility == 'registered_only' %} +
+ +
+ {% elif group.visibility == 'invite_only' and group.allow_requests %} +
+ +
+ {% endif %} + {% endif %} +
+
+ + +
+ + +
+
+
+ {% if current_user.is_authenticated and current_user in group.members %} + + {% endif %} + + +
+ + +
+ + +
+ {% for post in posts %} +
+
+
+ {% if post.author %} + {% if post.author.profile_picture %} + Profile Picture + {% else %} +
+ {{ post.author.username[0].upper() }} +
+ {% endif %} + + {{ post.author.username }} + + {% else %} + {{ post.anonymous_username }} + {% endif %} + {{ post.timestamp.strftime('%Y-%m-%d %H:%M:%S') }} +
+

{{ post.content|safe }}

+ {% if post.image_url %} + Post image + {% endif %} +
+
+ + +
+
+ + Open in new tab + + + {% if current_user.is_authenticated and current_user.id == post.author.id %} + + Edit + + {% endif %} +
+
+
+ +
+ {% endfor %} +
+
+ +
+

Group Members

+
    + {% for member in group.members %} +
  • + {{ member.username }} + {% if member == group.creator %} + Creator + {% elif current_user == group.creator %} +
    + +
    + {% endif %} +
  • + {% endfor %} +
+
+ + {% if current_user.is_authenticated and current_user in group.members %} +
+

User Settings

+
+
+ + +
+ +
+ + {% if current_user != group.creator %} +
+

Leave Group

+
+ +
+ {% endif %} +
+ {% endif %} + + {% if current_user == group.creator %} +
+

Group Settings

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + +
+
+ {% endif %} +
+
+
+
+ + + + +{% endblock %} + +{% block styles %} +{{ super() }} + + + +{% endblock %} + +{% block scripts %} +{{ super() }} + + + +{% endblock %} \ No newline at end of file diff --git a/template/group_post_detail.html b/template/group_post_detail.html new file mode 100644 index 0000000..4594a72 --- /dev/null +++ b/template/group_post_detail.html @@ -0,0 +1,44 @@ +{% extends "base.html" %} + +{% block title %}{{ group.name }} - Post by {{ post.author.username }}{% endblock %} + +{% block content %} +
+

{{ group.name }}

+
+
+
{{ post.author.username }}
+

{{ post.content|safe }}

+

{{ post.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}

+ + +
+ +
+ Back to Group +
+{% endblock %} + +{% block scripts %} +{{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/template/groups.html b/template/groups.html new file mode 100644 index 0000000..61c3a02 --- /dev/null +++ b/template/groups.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block title %}Groups{% endblock %} + +{% block content %} +
+

Groups

+ Create New Group + +
+ {% for group in groups %} +
+
+
+ {% if group.image_url %} + {{ group.name }} + {% else %} +
+ {{ group.name[0].upper() }} +
+ {% endif %} +
{{ group.name }}
+

{{ group.description }}

+ View Group +
+
+
+ {% endfor %} +
+
+{% endblock %} \ No newline at end of file