removed some whitespace to reduce the download of the mobile view.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@858 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lrbalt 2008-05-28 09:29:46 +00:00
parent 5286dbbd51
commit e72d88585d
7 changed files with 64 additions and 75 deletions

View file

@ -4,11 +4,11 @@
if not @not_done.empty?
# only show a context when there are actions in it
%>
<h2><%=mobile_context.name%></h2>
<table cellpadding="0" cellspacing="0" border="0">
<%= render :partial => "todos/mobile_todo",
:collection => @not_done,
:locals => { :parent_container_type => "context" }%>
</table>
-%>
<h2><%=mobile_context.name%></h2>
<table cellpadding="0" cellspacing="0" border="0">
<%= render :partial => "todos/mobile_todo",
:collection => @not_done,
:locals => { :parent_container_type => "context" }-%>
</table>
<% end -%>

View file

@ -1,37 +1,32 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="initial-scale = 1.0" />
<%= stylesheet_link_tag "mobile" %>
<title><%= @page_title %></title>
</head>
<body>
<% if !(@new_mobile || @edit_mobile)
if !@prefs.nil? %>
<h1><span class="count"><%= @down_count %></span> <%=
user_time.strftime(@prefs.title_date_format) %></h1>
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") %>
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") %>
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
<% end
end %>
<%= render_flash -%>
<hr/>
<%= yield %>
<hr/>
<% if !@prefs.nil? %>
<%= link_to "Logout", formatted_logout_path(:format => 'm') %> |
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") %>
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") %>
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})+" | ") -%>
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) %>
<% end %>
<%= render :partial => "shared/mobile_footer" %>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="initial-scale = 1.0" />
<%= stylesheet_link_tag "mobile"%>
<title><%= @page_title %></title>
</head><body>
<% if !(@new_mobile || @edit_mobile)
if !@prefs.nil? -%>
<h1><span class="count"><%= @down_count %></span> <%=
user_time.strftime(@prefs.title_date_format) -%></h1>
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") -%>
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") -%>
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
<% end
end -%><%= render_flash -%>
<hr/><%= yield -%>
<hr/><% if !@prefs.nil? -%>
<%= (link_to("Logout", formatted_logout_path(:format => 'm')) +" | ") -%>
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") -%>
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") -%>
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})+" | ") -%>
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) -%>
<% end -%>
<%= render :partial => "shared/mobile_footer" -%>
</body></html>

View file

@ -1,11 +1,9 @@
<div id="message_holder">
<% if flash.empty? %>
<% if flash.empty? -%>
<h4 id="flash" class="alert" style="display:none"></h4>
<% else %>
<% else -%>
<% flash.each do |key,value| -%>
<h4 id="flash" class='alert <%= key %>'>
<%= value %>
</h4>
<h4 id="flash" class='alert <%= key %>'><%= value %></h4>
<% end -%>
<% end %>
<% end -%>
</div>

View file

@ -1,3 +1 @@
<div class="footer">
<p>Mobile Tracks <%= TRACKS_VERSION %>: <a href="mailto:butshesagirl@rousette.org.uk?subject=Tracks feedback">Email</a> | <a href="http://www.rousette.org.uk/projects/">Website</a> | <a href="http://www.rousette.org.uk/projects/tracks/contribute">Contribute</a></p>
</div>
<div class="footer"><p>Mobile Tracks <%= TRACKS_VERSION %>: <a href="mailto:butshesagirl@rousette.org.uk?subject=Tracks feedback">Email</a> | <a href="http://www.rousette.org.uk/projects/">Website</a> | <a href="http://www.rousette.org.uk/projects/tracks/contribute">Contribute</a></p></div>

View file

@ -1,5 +1,5 @@
<% if @not_done_todos.empty? -%>
<p>There are no incomplete actions</p>
<p>There are no incomplete actions</p>
<% else -%>
<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show %>
<% end -%>
<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show -%>
<% end -%>

View file

@ -5,24 +5,22 @@ else
bullet = "<span class=r>&raquo;&nbsp;</span>"
end -%>
<div class="t" id="<%= dom_id(mobile_todo) %>">
<tr valign="top"><td><%= bullet %></td><td>
<% if mobile_todo.completed? -%>
<span class="m_t_d">
<% else -%>
<span class="m_t">
<% end -%>
<%= date_span -%>
<%= link_to mobile_todo.description, formatted_todo_path(mobile_todo, :m) %>
<% if parent_container_type == 'context' or parent_container_type == 'tag' -%>
<%= "<span class=prj>(" +
link_to(mobile_todo.project.name, formatted_project_path(mobile_todo.project, :m)) +
")</span>" unless mobile_todo.project.nil? %>
<% end
<tr valign="top"><td><%= bullet %></td><td><%
if mobile_todo.completed?
-%><span class="m_t_d">
<% else
-%><span class="m_t">
<% end -%>
<%= date_span -%><%= link_to mobile_todo.description, formatted_todo_path(mobile_todo, :m) -%>
<% if parent_container_type == 'context' or parent_container_type == 'tag' -%>
<%= "<span class=prj> (" +
link_to(mobile_todo.project.name, formatted_project_path(mobile_todo.project, :m)) +
")</span>" unless mobile_todo.project.nil? -%>
<% end
if parent_container_type == 'project' or parent_container_type == 'tag' -%>
<%= "<span class=ctx>(" +
link_to(mobile_todo.context.name, formatted_context_path(mobile_todo.context, :m)) +
")</span>" %>
<% end -%>
<%= tag_list_mobile %>
</span>
</td></tr></div>
<%= "<span class=ctx> (" +
link_to(mobile_todo.context.name, formatted_context_path(mobile_todo.context, :m)) +
")</span>" -%>
<% end -%>
<%= tag_list_mobile -%>
</span></td></tr></div>

View file

@ -1 +1 @@
<%= render :partial => 'mobile_actions' %>
<%= render :partial => 'mobile_actions' -%>