Skip to content
Snippets Groups Projects
Commit f04b45fc authored by Julian Rother's avatar Julian Rother
Browse files

Replace new_announcement with create

parent c0647a0d
Branches
No related tags found
No related merge requests found
......@@ -185,8 +185,8 @@ CREATE TABLE IF NOT EXISTS `videos_data` (
);
CREATE TABLE IF NOT EXISTS `announcements` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`text` text NOT NULL,
`internal` text NOT NULL,
`text` text NOT NULL DEFAULT "Neue Ankündigung",
`internal` text NOT NULL DEFAULT "",
`level` INTEGER NOT NULL DEFAULT 0,
`visible` INTEGER NOT NULL DEFAULT 0,
`deleted` INTEGER NOT NULL DEFAULT 0,
......
......@@ -398,15 +398,6 @@ def suggest_chapter(lectureid):
return redirect(request.values['ref'])
return 'OK', 200
@app.route('/newpsa', methods=['POST', 'GET'])
@mod_required
def new_announcement():
id = modify('INSERT INTO announcements (text, internal, time_created, time_updated, created_by) VALUES ("Neue Ankündigung", "", ?, ?, ?)',
datetime.now(), datetime.now(), session.get('user', {'dbid':None})['dbid'])
if 'ref' in request.values:
return redirect(request.values['ref'])
return id, 200
@app.route('/newfeatured', methods=['POST', 'GET'])
@mod_required
def new_featured():
......
......@@ -8,7 +8,7 @@
<ul class="list-inline pull-right">
{% if ismod() %}
<li style="padding-right: 0px;">
<a class="btn btn-default" href="{{ url_for('new_announcement', ref=request.url) }}">Neue Ankündigung</a>
<a class="btn btn-default" href="{{ url_for('create', table='announcements', ref=request.url) }}">Neue Ankündigung</a>
</li>
{% endif %}
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment