|
@@ -582,9 +582,11 @@ class UserWorkspaceFolderPageRestController(TIMWorkspaceContentRestController):
|
582
|
582
|
|
583
|
583
|
tg.flash(_('Page created'), CST.STATUS_OK)
|
584
|
584
|
redirect = '/workspaces/{}/folders/{}/pages/{}'
|
585
|
|
- tg.redirect(tg.url(redirect).format(tmpl_context.workspace_id,
|
586
|
|
- tmpl_context.folder_id,
|
587
|
|
- page.content_id))
|
|
585
|
+ tg.redirect(tg.url(redirect).format(
|
|
586
|
+ tmpl_context.workspace_id,
|
|
587
|
+ tmpl_context.folder_id,
|
|
588
|
+ page.content_id)
|
|
589
|
+ )
|
588
|
590
|
|
589
|
591
|
@tg.require(current_user_is_contributor())
|
590
|
592
|
@tg.expose()
|
|
@@ -615,16 +617,24 @@ class UserWorkspaceFolderPageRestController(TIMWorkspaceContentRestController):
|
615
|
617
|
not_updated = '{} not updated: the content did not change'
|
616
|
618
|
msg = _(not_updated).format(self._item_type_label)
|
617
|
619
|
tg.flash(msg, CST.STATUS_WARNING)
|
618
|
|
- tg.redirect(self._err_url.format(tmpl_context.workspace_id,
|
619
|
|
- tmpl_context.folder_id,
|
620
|
|
- item_id))
|
|
620
|
+ tg.redirect(
|
|
621
|
+ self._err_url.format(
|
|
622
|
+ tmpl_context.workspace_id,
|
|
623
|
+ tmpl_context.folder_id,
|
|
624
|
+ item_id
|
|
625
|
+ )
|
|
626
|
+ )
|
621
|
627
|
except ValueError as e:
|
622
|
628
|
not_updated = '{} not updated - error: {}'
|
623
|
629
|
msg = _(not_updated).format(self._item_type_label, str(e))
|
624
|
630
|
tg.flash(msg, CST.STATUS_ERROR)
|
625
|
|
- tg.redirect(self._err_url.format(tmpl_context.workspace_id,
|
626
|
|
- tmpl_context.folder_id,
|
627
|
|
- item_id))
|
|
631
|
+ tg.redirect(
|
|
632
|
+ self._err_url.format(
|
|
633
|
+ tmpl_context.workspace_id,
|
|
634
|
+ tmpl_context.folder_id,
|
|
635
|
+ item_id
|
|
636
|
+ )
|
|
637
|
+ )
|
628
|
638
|
|
629
|
639
|
class UserWorkspaceFolderThreadRestController(TIMWorkspaceContentRestController):
|
630
|
640
|
"""
|