fix #1052 based on the work of Tim Madden. Thanks Tim!

This commit is contained in:
Reinier Balt 2011-02-26 11:38:39 +01:00
parent e9d92438d6
commit b53fbc64dc
8 changed files with 78 additions and 28 deletions

View file

@ -12,7 +12,7 @@
<title><%= @page_title %></title>
</head><body>
<% if !(@new_mobile || @edit_mobile)
if !current_user.prefs.nil? -%>
if current_user && !current_user.prefs.nil? -%>
<h1><span class="count"><%= @down_count %></span> <%=
l(Date.today, :format => current_user.prefs.title_date_format) -%></h1>
<div class="nav">
@ -25,7 +25,7 @@
end -%><%= render_flash -%>
</div>
<%= yield -%>
<hr/><% if !current_user.prefs.nil? -%>
<hr/><% if current_user && !current_user.prefs.nil? -%>
<div class="nav">
<%= (link_to(t('layouts.mobile_navigation.logout'), logout_path(:format => 'm')) +" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.new_action'), new_todo_path(new_todo_params), {:accesskey => "0"})+" | ") unless @new_mobile -%>