]> git.openstreetmap.org Git - rails.git/commitdiff
Add link to my diary in the diary index.
authorFrançois de Metz <francois@2metz.fr>
Tue, 12 May 2020 09:37:43 +0000 (11:37 +0200)
committerFrançois de Metz <francois@2metz.fr>
Tue, 12 May 2020 09:37:43 +0000 (11:37 +0200)
app/views/diary_entries/index.html.erb
config/locales/en.yml

index 1940e798b8d55155d8c337fef84b80b87cc37146..96c052da69fd940ff16c7e7f374017fbde99ed6c 100644 (file)
       <% if @user && @user == current_user || !@user && current_user %>
         <li><%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
       <% end %>
+
+      <% if !@user && current_user %>
+        <li><%= link_to t(".my_diary"), :controller => "diary_entries", :action => "index", :display_name => current_user.display_name %></li>
+      <% end %>
     </ul>
   </div>
 <% end %>
index f9ea78ef3704abf956ec42d09d7e31a736d6866f..1ee3f2378fa76c4fd97e02d0f820954327ffcd37 100644 (file)
@@ -373,6 +373,7 @@ en:
       in_language_title: "Diary Entries in %{language}"
       new: New Diary Entry
       new_title: Compose a new entry in my user diary
+      my_diary: My Diary
       no_entries: No diary entries
       recent_entries: "Recent diary entries"
       older_entries: Older Entries