mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-22 00:11:14 +00:00
Show locked badge for protected pages (#9634).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18085 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
40dd389fdc
commit
5e64b4aa67
@ -82,12 +82,15 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<% if User.current.allowed_to?(:view_wiki_edits, @project) %>
|
||||
<p class="wiki-update-info">
|
||||
<% if User.current.allowed_to?(:view_wiki_edits, @project) %>
|
||||
<%= wiki_content_update_info(@content) %>
|
||||
· <%= link_to l(:label_x_revisions, :count => @content.version), {:action => 'history', :id => @page.title} %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% if @page.protected? %>
|
||||
<span class="badge badge-status-locked"><%= l('status_locked') %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
|
||||
@ -176,6 +176,16 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
assert_select 'textarea[name=?]', 'content[text]'
|
||||
end
|
||||
|
||||
def test_show_protected_page_shoud_show_locked_badge
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
get :show, :params => {:project_id => 1, :id => 'CookBook_documentation'}
|
||||
|
||||
assert_select 'p.wiki-update-info' do
|
||||
assert_select 'span.badge.badge-status-locked'
|
||||
end
|
||||
end
|
||||
|
||||
def test_get_new
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user