Removed MOTDs, Allowed mods and staff to edit communities.

This commit is contained in:
some weird guy
2023-07-27 20:56:43 -07:00
parent 40355adef6
commit 71d8b5fff4
20 changed files with 334 additions and 497 deletions
@@ -19,14 +19,15 @@
</div>
{% endif %}
{% if mesoftheday and request.user.is_authenticated %}
<div class="post-list-outline index-memo">
<h2 class="label">MOTD / News</h2>
{% for mesoftheday in mesoftheday %}
{% if mesoftheday.Title %}<h2>{{ mesoftheday.Title }}</h2>{% endif %}
<p>{{ mesoftheday.message|linebreaksbr|urlize }}</p>
{% if mesoftheday.image %}<image src={{ mesoftheday.image.url }}></image>{% endif %}
{% if mesoftheday.hide_date == False %}<p class="memo-date">Posted {{ mesoftheday.created }}</p>{% endif %}
{% if announcements and request.user.is_authenticated %}
<div class="Announcements">
{% for announcements in announcements %}
<div class='Announcement-content'>
{% user_icon_container announcements.creator post.feeling %}
<a class='user-name' href={% url "main:user-view" announcements.creator.username %} {% if announcements.creator.color %}style=color:{{ announcements.creator.color }}{% endif %}>{{ announcements.creator }}</a><a class='timestamp"'> - {{ announcements.created }}</a>
<p>{{ announcements.body|linebreaksbr|urlize }}</p>
{% if announcements.screenshot %}<image class='Announcement-image' src={{ announcements.screenshot }}></image>{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
@@ -1,11 +1,11 @@
{% extends "closedverse_main/layout.html" %}
{% block main-body %}{% load closedverse_user %}{% load closedverse_tags %}{% load closedverse_community %}
{% if community.is_feature %}<div class='notice'>
<p>Who the fuck gave you ownership of a fucking featured community!</p>
{% if not request.user == community.creator %}<div class='notice'>
<p>Mods and staff members can edit communities.</p>
</div>{% endif %}
{% community_sidebar community request %}
<div class="main-column"><div class="post-list-outline">
<h2 class="label">Change settings for {{ community.creator }}'s community</h2>
<h2 class="label">Change settings for {% if community.creator %}{{ community.creator }}'s{% else %}this{% endif %} community</h2>
<form class="setting-form" method="post" action={% url "main:community-tools-set" community.id %}>
<li class="setting-community-name">
<p class="settings-label">Set name:</p>
@@ -37,6 +37,7 @@
<p>&nbsp;</p>
<input type="checkbox" name="force_login" {% if community.require_auth %}checked{% endif %}>Require login:
<p class="note">If this is on, users will need to sign in to view your community.</p>
<p class="note">I plan on removing this feature as it's implemented in an extremely janky way. Or at least improving it, so you are no longer forced to sign in to view yeahs from anyone. The whole idea behind this feature is to prevent web crawling or unauthorized third parties from seeing content without an account.</p>
</li>
<li>
<p class="settings-label">Platform</p>
@@ -61,4 +62,4 @@
<input type="submit" class="black-button apply-button" value="Save">
</div>
</form></div></div>
{% endblock %}
{% endblock %}
@@ -38,9 +38,9 @@
<button type="button" class="symbol button favorite-button{% if community.has_favorite %} checked{% endif %}" data-action-favorite="{% url "main:community-favorite-add" community.id %}" data-action-unfavorite="{% url "main:community-favorite-rm" community.id %}"><span class="favorite-button-text">Favorite</span></button>
<!--<button class="button reload-btn">Refresh posts</button>
-->
{% if request.user == community.creator %}
{% if can_edit %}
<button class="button" data-href="{% url "main:community-tools" community.id %}">Community Settings</button>
{% endif %}
{% endif %}
</section>
</div>
</div>