diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-02 07:34:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-02 07:34:36 +0000 |
commit | 8dd6874a6aedc8b85e8420e1979fe964f4fd04ce (patch) | |
tree | 4570bf255e04183f18e19368a86cb7b5424bbe72 /app/views/wiki | |
parent | 05289f600296b8c72ae74a5397a6c14d049d5979 (diff) | |
download | redmine-8dd6874a6aedc8b85e8420e1979fe964f4fd04ce.tar.gz redmine-8dd6874a6aedc8b85e8420e1979fe964f4fd04ce.zip |
Moves some action links on the wiki page to a dropdown menu (#26575).
git-svn-id: http://svn.redmine.org/redmine/trunk@17678 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki')
-rw-r--r-- | app/views/wiki/show.html.erb | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 5f25e50ee..5fffba259 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -1,20 +1,30 @@ <div class="contextual"> -<% if User.current.allowed_to?(:edit_wiki_pages, @project) %> -<%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project, :parent => @page.title), :remote => true, :class => 'icon icon-add' %> -<% end %> + <% if @editable %> <% if @content.current_version? %> <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %> <%= watcher_link(@page, User.current) %> - <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> - <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> - <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %> - <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %> -<% else %> - <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %> <% end %> <% end %> -<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> + + <%= actions_dropdown do %> + <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> + + <% if @editable %> + <% if @content.current_version? %> + <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> + <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> + <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %> + <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %> + <% else %> + <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %> + <% end %> + <% end %> + + <% if User.current.allowed_to?(:edit_wiki_pages, @project) %> + <%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project, :parent => @page.title), :remote => true, :class => 'icon icon-add' %> + <% end %> + <% end %> </div> <%= wiki_page_breadcrumb(@page) %> |