Commit 526c04a9974824577ce636c52f7f890848488331
1 parent
f9a7c1f7
Exists in
master
and in
28 other branches
Rename articles_list.rhtml to content_list.rhtml
`content_list` is a more coherent name for listing things that are no exactily an article. Completes ActionItem3158 changes
Showing
4 changed files
with
16 additions
and
16 deletions
Show diff stats
app/helpers/folder_helper.rb
app/views/shared/articles_list.rhtml
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -<table class="<%= list_type %>-content"> | |
| 2 | - <tr> | |
| 3 | - <th><%= _('Title') %></th> | |
| 4 | - <th><%= _('Last update') %></th> | |
| 5 | - </tr> | |
| 6 | - <% contents.each do |content| %> | |
| 7 | - <% if content.display_to?(user) %> | |
| 8 | - <%= display_content_in_listing :content=>content, :list_type=>list_type, :recursive=>recursive %> | |
| 9 | - <% end %> | |
| 10 | - <% end %> | |
| 11 | -</table> | |
| 12 | - | |
| 13 | -<p><%= pagination_links contents, :param_name => 'npage', :page_links => true %></p> |
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +<table class="<%= list_type %>-content"> | |
| 2 | + <tr> | |
| 3 | + <th><%= _('Title') %></th> | |
| 4 | + <th><%= _('Last update') %></th> | |
| 5 | + </tr> | |
| 6 | + <% contents.each do |content| %> | |
| 7 | + <% if content.display_to?(user) %> | |
| 8 | + <%= display_content_in_listing :content=>content, :list_type=>list_type, :recursive=>recursive %> | |
| 9 | + <% end %> | |
| 10 | + <% end %> | |
| 11 | +</table> | |
| 12 | + | |
| 13 | +<p><%= pagination_links contents, :param_name => 'npage', :page_links => true %></p> | ... | ... |
test/unit/folder_helper_test.rb
| ... | ... | @@ -102,8 +102,8 @@ class FolderHelperTest < ActiveSupport::TestCase |
| 102 | 102 | expects(:list_type).returns(:folder).at_least_once |
| 103 | 103 | expects(:recursive).returns(false).at_least_once |
| 104 | 104 | expects(:pagination_links).with(anything, anything).returns('') |
| 105 | - list = render 'shared/articles_list', binding | |
| 106 | - expects(:render).with(:file => 'shared/articles_list', | |
| 105 | + list = render 'shared/content_list', binding | |
| 106 | + expects(:render).with(:file => 'shared/content_list', | |
| 107 | 107 | :locals => { :contents => contents, :recursive => false, :list_type => :folder } |
| 108 | 108 | ).returns(list) |
| 109 | 109 | ... | ... |