Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Video AG Infrastruktur
website
Commits
f04b45fc
Commit
f04b45fc
authored
8 years ago
by
Julian Rother
Browse files
Options
Downloads
Patches
Plain Diff
Replace new_announcement with create
parent
c0647a0d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
db_schema.sql
+2
-2
2 additions, 2 deletions
db_schema.sql
server.py
+0
-9
0 additions, 9 deletions
server.py
templates/index.html
+1
-1
1 addition, 1 deletion
templates/index.html
with
3 additions
and
12 deletions
db_schema.sql
+
2
−
2
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
,
...
...
This diff is collapsed.
Click to expand it.
server.py
+
0
−
9
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
():
...
...
This diff is collapsed.
Click to expand it.
templates/index.html
+
1
−
1
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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment