Commit c7fedeb97a73f750513581e345a3edf99e847fe5

Authored by Rodrigo Souto
1 parent 0db12ddd

Replacing url by view_url where should be view

  * Images were linked to it's public path instead of an internal page
    on Noosfero (the view page).
  * The method view_url already falls to url if the article isn't an
    image so there is no problem using it instead.
app/views/cms/view.rhtml
... ... @@ -50,7 +50,7 @@
50 50 </td>
51 51 <td class="article-controls">
52 52 <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => article.id %>
53   - <%= button_without_text :eyes, _('Public view'), article.url %>
  53 + <%= button_without_text :eyes, _('Public view'), article.view_url %>
54 54 <%= display_spread_button(profile, article) unless article.folder? %>
55 55 <% if !environment.enabled?('cant_change_homepage') %>
56 56 <%= button_without_text :home, _('Use as homepage'), { :action => 'set_home_page', :id => article.id }, :method => :post %>
... ...
app/views/search/_article.rhtml
1 1 <li class="<%= icon_for_article(article) %>">
2   - <strong><%= link_to(article.title, article.url) %></strong>
  2 + <strong><%= link_to(article.title, article.view_url) %></strong>
3 3 <div class="item_meta">
4 4 <% if article.last_changed_by %>
5 5 <span class="cat_item_by">
... ...