added change in doc's tags
This commit is contained in:
@@ -43,7 +43,7 @@ def doc_edit(request):
|
||||
return HTTPFound(location=request.route_url('home'))
|
||||
|
||||
message = ""
|
||||
tags = get_d_tags(request)
|
||||
|
||||
statuts = ['private', 'public']
|
||||
|
||||
if doc_id == '0':
|
||||
@@ -56,10 +56,14 @@ def doc_edit(request):
|
||||
doc['tag1'] = ''
|
||||
doc['tag2'] = ''
|
||||
doc['statut'] = 'private'
|
||||
tags = {}
|
||||
else:
|
||||
titre = "Modifier : %s" % str(doc_id)
|
||||
doc = get_docs(request, doc_id)
|
||||
|
||||
tags = get_docs_tags(request, doc.doc_id)
|
||||
|
||||
d_tags = get_d_tags(request, topic)
|
||||
|
||||
if 'form.submitted' in request.params:
|
||||
new_values = {}
|
||||
for param, db_value in doc.items():
|
||||
@@ -88,6 +92,7 @@ def doc_edit(request):
|
||||
'doc': doc,
|
||||
'topic': topic,
|
||||
'tags': tags,
|
||||
'd_tags': d_tags,
|
||||
'statuts': statuts,
|
||||
}
|
||||
|
||||
@@ -147,3 +152,16 @@ def doc_view(request):
|
||||
'tags': tags,
|
||||
'url_retour':url_retour,
|
||||
}
|
||||
|
||||
@view_config(route_name='tag_change')
|
||||
def tag_change(request):
|
||||
|
||||
logged_in = request.authenticated_userid
|
||||
action = request.matchdict['action']
|
||||
topic = request.matchdict['topic']
|
||||
doc_id = request.matchdict['doc_id']
|
||||
tag = request.matchdict['tag']
|
||||
|
||||
change_doc_tag(request, action, doc_id, tag)
|
||||
|
||||
return HTTPFound(location=request.route_url('doc_edit', topic=topic, doc_id=doc_id))
|
||||
|
||||
Reference in New Issue
Block a user