From: François de Metz Date: Tue, 12 May 2020 09:27:08 +0000 (+0200) Subject: Refactor the link to create a new entry diary. X-Git-Tag: live~2840^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/43385325a8cc8f11411169664c054ede4a96cf32?ds=inline;hp=-c Refactor the link to create a new entry diary. --- 43385325a8cc8f11411169664c054ede4a96cf32 diff --git a/app/views/diary_entries/index.html.erb b/app/views/diary_entries/index.html.erb index 32a4e1e0f..1940e798b 100644 --- a/app/views/diary_entries/index.html.erb +++ b/app/views/diary_entries/index.html.erb @@ -10,14 +10,8 @@
  • <%= rss_link_to :action => "rss", :language => params[:language] %>
  • <% end -%> - <% if @user %> - <% if @user == current_user %> -
  • <%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %>
  • - <% end %> - <% else %> - <% if current_user %> -
  • <%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %>
  • - <% end %> + <% if @user && @user == current_user || !@user && current_user %> +
  • <%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %>
  • <% end %>