Feature #9634 » 0001-Show-locked-badge-for-protected-pages.patch
| app/views/wiki/show.html.erb | ||
|---|---|---|
|
</div>
|
||
|
</fieldset>
|
||
|
<% if User.current.allowed_to?(:view_wiki_edits, @project) %>
|
||
|
<p class="wiki-update-info">
|
||
|
<%= wiki_content_update_info(@content) %>
|
||
|
· <%= link_to l(:label_x_revisions, :count => @content.version), {:action => 'history', :id => @page.title} %>
|
||
|
<% 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} %>
|
||
|
<% end %>
|
||
|
<% if @page.protected? %>
|
||
|
<span class="badge badge-status-locked"><%= l('status_locked') %></span>
|
||
|
<% end %>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
<% other_formats_links do |f| %>
|
||
|
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||
| test/functional/wiki_controller_test.rb | ||
|---|---|---|
|
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
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »