Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Projects
Groups
Snippets
Sign up now
Login
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
f04b45fc
Commit
f04b45fc
authored
Sep 10, 2016
by
Julian Rother
Browse files
Replace new_announcement with create
parent
c0647a0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
db_schema.sql
View file @
f04b45fc
...
...
@@ -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
,
...
...
server.py
View file @
f04b45fc
...
...
@@ -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
():
...
...
templates/index.html
View file @
f04b45fc
...
...
@@ -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='
announcement
s
', ref=request.url) }}"
>
Neue Ankündigung
</a>
</li>
{% endif %}
</ul>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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