mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
idk i think this might work but i'm too sleepy to check
This commit is contained in:
parent
2cdb4d3a42
commit
5e507fbb5e
2 changed files with 4 additions and 1 deletions
|
@ -43,7 +43,7 @@
|
||||||
Ultima modifica di <span class="last-author"><a href="/profile/{{ wiki_log.editor.username }}">{{ wiki_log.editor.username }}</a></span> alle <span class="last-timestamp">{{ wiki_log.timestamp.strftime('%Y-%m-%d %H:%M:%S %Z') }}</span>{% if wiki_log.reason %}, motivo: <span class="last-reason">{{ wiki_log.reason }}</span>{% endif %}
|
Ultima modifica di <span class="last-author"><a href="/profile/{{ wiki_log.editor.username }}">{{ wiki_log.editor.username }}</a></span> alle <span class="last-timestamp">{{ wiki_log.timestamp.strftime('%Y-%m-%d %H:%M:%S %Z') }}</span>{% if wiki_log.reason %}, motivo: <span class="last-reason">{{ wiki_log.reason }}</span>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if g.user %}
|
{% if g.user and not wiki_page.locked %}
|
||||||
<div class="wiki-edit">
|
<div class="wiki-edit">
|
||||||
<h4>Modifica</h4>
|
<h4>Modifica</h4>
|
||||||
<form action="{{ url_for('page_wiki', key=key) }}" method="POST">
|
<form action="{{ url_for('page_wiki', key=key) }}" method="POST">
|
||||||
|
|
|
@ -260,6 +260,9 @@ def page_wiki(key: str):
|
||||||
elif request.method == "POST":
|
elif request.method == "POST":
|
||||||
if not fl_g.user:
|
if not fl_g.user:
|
||||||
return redirect(url_for("page_login"))
|
return redirect(url_for("page_login"))
|
||||||
|
if wiki_page.locked:
|
||||||
|
abort(403)
|
||||||
|
return
|
||||||
user = fl_g.session.query(db.Royal).filter_by(id=fl_g.user.id).one()
|
user = fl_g.session.query(db.Royal).filter_by(id=fl_g.user.id).one()
|
||||||
new_content = request.form.get("content")
|
new_content = request.form.get("content")
|
||||||
# Create new page
|
# Create new page
|
||||||
|
|
Loading…
Reference in a new issue