X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/74b91c0e3e53b4b8da8d7f759ecca67ff5c39a7b..6078e642bac0729585f11db6d42d7333d8c2114b:/app/views/diary_entries/index.html.erb
diff --git a/app/views/diary_entries/index.html.erb b/app/views/diary_entries/index.html.erb
index 59fa96a83..96c052da6 100644
--- a/app/views/diary_entries/index.html.erb
+++ b/app/views/diary_entries/index.html.erb
@@ -1,62 +1,52 @@
<% content_for :heading do %>
-
id="userinformation"<% end %> >
+
id="userinformation"<% end %>>
<% if @user %>
<%= user_image @user %>
<% end %>
-
<%= h(@title) %>
+
<%= @title %>
<% unless params[:friends] or params[:nearby] -%>
- - <%= rss_link_to :action => 'rss', :language => params[:language] %>
+ - <%= rss_link_to :action => "rss", :language => params[:language] %>
<% end -%>
- <% if @user %>
- <% if @user == current_user %>
-
-
- <%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_path, :title => t('.new_title') %>
-
- <% end %>
- <% else %>
- <% if current_user %>
-
-
- <%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_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 %>
+
+ <% if !@user && current_user %>
+ - <%= link_to t(".my_diary"), :controller => "diary_entries", :action => "index", :display_name => current_user.display_name %>
<% end %>
<% end %>
<% if @entries.empty? %>
-
<%= t '.no_entries' %>
+
<%= t ".no_entries" %>
<% else %>
-
<%= t '.recent_entries' %>
+
<%= t ".recent_entries" %>
- <% if @user %>
- <%= render :partial => 'diary_entry', :collection => @entries %>
- <% else %>
- <%= render :partial => 'diary_index_entry', :collection => @entries %>
- <% end %>
+ <%= render @entries %>
<% end %>
<% unless params[:friends] or params[:nearby] -%>
<% content_for :auto_discovery_link_tag do -%>
- <%= auto_discovery_link_tag :rss, :action => 'rss', :language => params[:language] %>
+ <%= auto_discovery_link_tag :rss, :action => "rss", :language => params[:language] %>
<% end -%>
<% end -%>