From 7936277455ddafa6844b2b08c237868c0276880b Mon Sep 17 00:00:00 2001 From: lrbalt Date: Wed, 28 May 2008 10:13:07 +0000 Subject: [PATCH] removed some more whitespace to reduce the download of the mobile view. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@859 a4c988fc-2ded-0310-b66e-134b36920a42 --- .../contexts/_mobile_context_listing.rhtml | 4 +- tracks/app/views/contexts/index_mobile.rhtml | 8 +- tracks/app/views/feedlist/mobile_index.rhtml | 80 +++++++------------ .../projects/_mobile_project_listing.rhtml | 6 +- tracks/app/views/projects/index_mobile.rhtml | 14 ++-- tracks/app/views/todos/_mobile_todo.rhtml | 2 +- .../views/todos/mobile_list_deferred.rhtml | 3 +- tracks/app/views/todos/mobile_tag.rhtml | 45 +++++------ 8 files changed, 68 insertions(+), 94 deletions(-) diff --git a/tracks/app/views/contexts/_mobile_context_listing.rhtml b/tracks/app/views/contexts/_mobile_context_listing.rhtml index 6d792961..4f770186 100644 --- a/tracks/app/views/contexts/_mobile_context_listing.rhtml +++ b/tracks/app/views/contexts/_mobile_context_listing.rhtml @@ -1,2 +1,2 @@ -<% context = mobile_context_listing %> -
<%= link_to context.name, formatted_context_path(context, :m) %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %>
+<% context = mobile_context_listing -%> +
<%= link_to context.name, formatted_context_path(context, :m) %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %>
\ No newline at end of file diff --git a/tracks/app/views/contexts/index_mobile.rhtml b/tracks/app/views/contexts/index_mobile.rhtml index 35a1de9a..1edd16ed 100644 --- a/tracks/app/views/contexts/index_mobile.rhtml +++ b/tracks/app/views/contexts/index_mobile.rhtml @@ -1,6 +1,2 @@ -

Visible Contexts

-<%= render :partial => 'mobile_context_listing', :collection => @active_contexts%> - -

Hidden Contexts

-<%= render :partial => 'mobile_context_listing', :collection => @hidden_contexts %> - +

Visible Contexts

<%= render :partial => 'mobile_context_listing', :collection => @active_contexts %> +

Hidden Contexts

<%= render :partial => 'mobile_context_listing', :collection => @hidden_contexts %> \ No newline at end of file diff --git a/tracks/app/views/feedlist/mobile_index.rhtml b/tracks/app/views/feedlist/mobile_index.rhtml index a8511e75..b8c64398 100644 --- a/tracks/app/views/feedlist/mobile_index.rhtml +++ b/tracks/app/views/feedlist/mobile_index.rhtml @@ -1,50 +1,32 @@ +
  • <%= rss_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) -%> + <%= text_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) -%> + <%= ical_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) -%> + Last 15 actions
  • +
  • <%= rss_formatted_link( { :controller => 'todos', :action => 'index' } ) -%> + <%= text_formatted_link( { :controller => 'todos', :action => 'index' } ) -%> + <%= ical_formatted_link( { :controller => 'todos', :action => 'index' } ) -%> + All actions
  • +
  • <%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) -%> + <%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) -%> + <%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) -%> + Actions due today or earlier
  • +
  • <%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) -%> + <%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) -%> + <%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) -%> + Actions due in 7 days or earlier
  • +
  • <%= rss_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) -%> + <%= text_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) -%> + Actions completed in the last 7 days
  • +
  • <%= rss_formatted_link({:controller => 'contexts', :action => 'index'}) -%> + <%= text_formatted_link({:controller => 'contexts', :action => 'index'}) -%> + All Contexts
  • +
  • <%= rss_formatted_link({:controller => 'projects', :action => 'index'}) -%> + <%= text_formatted_link({:controller => 'projects', :action => 'index'}) -%> + All Projects
  • +
  • <%= rss_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %> + <%= text_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %> + Active projects with no next actions
  • +
  • <%= text_formatted_link({:controller => 'projects', :action => 'index', :projects_and_actions => true}) %> + Active projects with their actions +
  • \ No newline at end of file diff --git a/tracks/app/views/projects/_mobile_project_listing.rhtml b/tracks/app/views/projects/_mobile_project_listing.rhtml index 4ea67a2c..803d2d8c 100644 --- a/tracks/app/views/projects/_mobile_project_listing.rhtml +++ b/tracks/app/views/projects/_mobile_project_listing.rhtml @@ -1,2 +1,4 @@ -<% project = mobile_project_listing %> -
    <%= link_to project.name, formatted_project_path(project) %><%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %>
    +<% project = mobile_project_listing -%> +
    <%= + link_to project.name, formatted_project_path(project) + + " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %>
    \ No newline at end of file diff --git a/tracks/app/views/projects/index_mobile.rhtml b/tracks/app/views/projects/index_mobile.rhtml index 3d7578cd..a33dce05 100644 --- a/tracks/app/views/projects/index_mobile.rhtml +++ b/tracks/app/views/projects/index_mobile.rhtml @@ -1,8 +1,6 @@ -

    Active projects

    -<%= render :partial => 'mobile_project_listing', :collection => @active_projects%> - -

    Hidden projects

    -<%= render :partial => 'mobile_project_listing', :collection => @hidden_projects %> - -

    Completed projects

    -<%= render :partial => 'mobile_project_listing', :collection => @completed_projects %> +

    Active projects

    <%= + render :partial => 'mobile_project_listing', :collection => @active_projects%> +

    Hidden projects

    <%= + render :partial => 'mobile_project_listing', :collection => @hidden_projects %> +

    Completed projects

    <%= + render :partial => 'mobile_project_listing', :collection => @completed_projects %> \ No newline at end of file diff --git a/tracks/app/views/todos/_mobile_todo.rhtml b/tracks/app/views/todos/_mobile_todo.rhtml index 6b8ebcaa..fafdd164 100644 --- a/tracks/app/views/todos/_mobile_todo.rhtml +++ b/tracks/app/views/todos/_mobile_todo.rhtml @@ -11,7 +11,7 @@ end -%> <% else -%> <% end -%> -<%= date_span -%><%= link_to mobile_todo.description, formatted_todo_path(mobile_todo, :m) -%> +<%= date_span -%> <%= link_to mobile_todo.description, formatted_todo_path(mobile_todo, :m) -%> <% if parent_container_type == 'context' or parent_container_type == 'tag' -%> <%= " (" + link_to(mobile_todo.project.name, formatted_project_path(mobile_todo.project, :m)) + diff --git a/tracks/app/views/todos/mobile_list_deferred.rhtml b/tracks/app/views/todos/mobile_list_deferred.rhtml index ebfcb4a9..4c04a2e3 100644 --- a/tracks/app/views/todos/mobile_list_deferred.rhtml +++ b/tracks/app/views/todos/mobile_list_deferred.rhtml @@ -1,6 +1,5 @@ <% if @count == 0 -%>

    Currently there are no deferred actions.

    <% end -%> - <%= render :partial => "contexts/mobile_context", :collection => @contexts, - :locals => { :collapsible => true } %> + :locals => { :collapsible => true } -%> \ No newline at end of file diff --git a/tracks/app/views/todos/mobile_tag.rhtml b/tracks/app/views/todos/mobile_tag.rhtml index 20dfe67c..0fb66f82 100644 --- a/tracks/app/views/todos/mobile_tag.rhtml +++ b/tracks/app/views/todos/mobile_tag.rhtml @@ -1,28 +1,25 @@
    -
    > -

    - No actions found -

    -

    Currently there are no incomplete actions with the tag '<%= @tag_name %>'

    -
    - - <%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show %> - -

    Deferred actions with the tag <%= @tag_name %>

    - <% unless (@deferred.nil? or @deferred.size == 0) -%> - - <%= render :partial => "todos/mobile_todo", :collection => @deferred, :locals => { :parent_container_type => "tag" } %> -
    -<% else %> - No deferred actions with the tag <%= @tag_name %> +<% if @not_done_todos.empty? -%> +
    +

    No actions found

    +
    Currently there are no incomplete actions with the tag '<%= @tag_name %>'
    +
    <% end -%> - -

    Completed actions with the tag <%= @tag_name %>

    +<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show -%> +

    Deferred actions with the tag <%= @tag_name %>

    +<% unless (@deferred.nil? or @deferred.size == 0) -%> + +<%= render :partial => "todos/mobile_todo", :collection => @deferred, :locals => { :parent_container_type => "tag" } -%> +
    +<% else -%> +No deferred actions with the tag <%= @tag_name %> +<% end -%> +

    Completed actions with the tag <%= @tag_name %>

    <% unless (@done.nil? or @done.size == 0) -%> - - <%= render :partial => "todos/mobile_todo", :collection => @done, :locals => { :parent_container_type => "tag" } %> -
    -<% else %> - No completed actions with the tag <%= @tag_name %> + +<%= render :partial => "todos/mobile_todo", :collection => @done, :locals => { :parent_container_type => "tag" } %> +
    +<% else -%> +No completed actions with the tag <%= @tag_name %> <% end -%> -
    + \ No newline at end of file