Skip to content

Commit

Permalink
Show the workflow state for all authenticated users (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim authored and disko committed Dec 14, 2016
1 parent b01953c commit c922c57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Change History
1.3.1.dev0 - unreleased
-----------------------

- Optimize the File edit form: don't load initial file data to session data
- When authenticated, show workflow state in the edit bar. Before it was
shown only if the 'edit' permission was available.

- Optimize the File edit form: don't load initial file data to session data
and don't rewrite the file data after saving the form if that data has not
been changed through the edit form.

Expand Down
4 changes: 1 addition & 3 deletions kotti/templates/editor-bar.pt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
</div>
<div class="collapse navbar-collapse" id="navbar-edit">
<ul class="nav navbar-nav navbar-left">
<tal:condition tal:condition="api.has_permission('edit')">
<li tal:replace="api.render_view('workflow-dropdown')" />
</tal:condition>
<li tal:replace="api.render_view('workflow-dropdown')" />

<li class="${api.url() == (request.url.endswith('/') and request.url or request.url + '/') and 'active' or None}">
<a href="${api.url()}" i18n:translate="">View</a>
Expand Down
1 change: 1 addition & 0 deletions kotti/views/edit/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def paste_nodes(self):
else:
self.flash(_(u'Could not paste node. It no longer exists.'),
'error')
DBSession.flush()
if not self.request.is_xhr:
return self.back()

Expand Down

0 comments on commit c922c57

Please sign in to comment.