mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-25 16:44:09 +01:00
merge new mobile interface in trunk
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@823 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
c3009f89c2
commit
39a6498934
32 changed files with 1459 additions and 1071 deletions
|
|
@ -14,6 +14,7 @@ class ContextsController < ApplicationController
|
|||
init_not_done_counts(['context'])
|
||||
respond_to do |format|
|
||||
format.html &render_contexts_html
|
||||
format.m &render_contexts_mobile
|
||||
format.xml { render :xml => @contexts.to_xml( :except => :user_id ) }
|
||||
format.rss &render_contexts_rss_feed
|
||||
format.atom &render_contexts_atom_feed
|
||||
|
|
@ -31,6 +32,7 @@ class ContextsController < ApplicationController
|
|||
@page_title = "TRACKS::Context: #{@context.name}"
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.m &render_context_mobile
|
||||
format.xml { render :xml => @context.to_xml( :except => :user_id ) }
|
||||
end
|
||||
end
|
||||
|
|
@ -122,6 +124,20 @@ class ContextsController < ApplicationController
|
|||
render
|
||||
end
|
||||
end
|
||||
|
||||
def render_contexts_mobile
|
||||
lambda do
|
||||
@active_contexts = @contexts.find(:all, { :conditions => ["hide = ?", false]})
|
||||
@hidden_contexts = @contexts.find(:all, { :conditions => ["hide = ?", true]})
|
||||
render :action => 'index_mobile'
|
||||
end
|
||||
end
|
||||
|
||||
def render_context_mobile
|
||||
lambda do
|
||||
render :action => 'mobile_show_context'
|
||||
end
|
||||
end
|
||||
|
||||
def render_contexts_rss_feed
|
||||
lambda do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue