mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-18 15:15:27 +01:00
get login, mobile and notes features passing
This commit is contained in:
parent
7c935652fb
commit
005723cb4f
52 changed files with 167 additions and 196 deletions
|
|
@ -207,8 +207,8 @@ class ContextsController < ApplicationController
|
|||
@active_contexts = current_user.contexts.active
|
||||
@hidden_contexts = current_user.contexts.hidden
|
||||
@down_count = @active_contexts.size + @hidden_contexts.size
|
||||
cookies[:mobile_url]= {:value => request.request_uri, :secure => SITE_CONFIG['secure_cookies']}
|
||||
render :action => 'index_mobile'
|
||||
cookies[:mobile_url]= {:value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
|
||||
render
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -217,9 +217,9 @@ class ContextsController < ApplicationController
|
|||
@page_title = "TRACKS::List actions in "+@context.name
|
||||
@not_done = @not_done_todos.select {|t| t.context_id == @context.id }
|
||||
@down_count = @not_done.size
|
||||
cookies[:mobile_url]= {:value => request.request_uri, :secure => SITE_CONFIG['secure_cookies']}
|
||||
cookies[:mobile_url]= {:value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
|
||||
@mobile_from_context = @context.id
|
||||
render :action => 'mobile_show_context'
|
||||
render
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class FeedlistController < ApplicationController
|
|||
@page_title = 'TRACKS::Feeds'
|
||||
|
||||
unless mobile?
|
||||
init_data_for_sidebar
|
||||
init_data_for_sidebar
|
||||
else
|
||||
@projects = current_user.projects
|
||||
@contexts = current_user.contexts
|
||||
|
|
@ -21,7 +21,7 @@ class FeedlistController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.html { render :layout => 'standard' }
|
||||
format.m { render :action => 'mobile_index' }
|
||||
format.m
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class LoginController < ApplicationController
|
|||
end
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.m { render :action => 'login_mobile.html.erb', :layout => 'mobile' }
|
||||
format.m { render :action => 'login', :layout => 'mobile' }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class NotesController < ApplicationController
|
|||
@page_title = "TRACKS::Note " + @note.id.to_s
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.m { render :action => 'note_mobile' }
|
||||
format.m
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ class NotesController < ApplicationController
|
|||
@saved = @note.save
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.js
|
||||
format.xml do
|
||||
if @saved
|
||||
head :created, :location => note_url(@note), :text => "new note with id #{@note.id}"
|
||||
|
|
|
|||
|
|
@ -324,8 +324,8 @@ class ProjectsController < ApplicationController
|
|||
@hidden_projects = current_user.projects.hidden
|
||||
@completed_projects = current_user.projects.completed
|
||||
@down_count = @active_projects.size + @hidden_projects.size + @completed_projects.size
|
||||
cookies[:mobile_url]= {:value => request.request_uri, :secure => SITE_CONFIG['secure_cookies']}
|
||||
render :action => 'index_mobile'
|
||||
cookies[:mobile_url]= {:value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
|
||||
render
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -336,9 +336,9 @@ class ProjectsController < ApplicationController
|
|||
else
|
||||
@project_default_context = t('projects.default_context', :context => @project.default_context.name)
|
||||
end
|
||||
cookies[:mobile_url]= {:value => request.request_uri, :secure => SITE_CONFIG['secure_cookies']}
|
||||
cookies[:mobile_url]= {:value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
|
||||
@mobile_from_project = @project.id
|
||||
render :action => 'project_mobile'
|
||||
render
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class TodosController < ApplicationController
|
|||
@page_title = t('todos.mobile_todos_page_title')
|
||||
@home = true
|
||||
|
||||
cookies[:mobile_url]= { :value => request.request_uri, :secure => SITE_CONFIG['secure_cookies']}
|
||||
cookies[:mobile_url]= { :value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
|
||||
determine_down_count
|
||||
|
||||
render :action => 'index'
|
||||
|
|
@ -158,7 +158,6 @@ class TodosController < ApplicationController
|
|||
# we have a project but not a context -> use the default context
|
||||
@mobile_from_context = @mobile_from_project.default_context
|
||||
end
|
||||
render :action => "new"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
@ -369,7 +368,6 @@ class TodosController < ApplicationController
|
|||
@contexts = current_user.contexts
|
||||
@edit_mobile = true
|
||||
@return_path=cookies[:mobile_url] ? cookies[:mobile_url] : mobile_path
|
||||
render :template => "/todos/edit_mobile.html.erb"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
@ -693,7 +691,7 @@ class TodosController < ApplicationController
|
|||
@hidden_contexts = current_user.contexts.hidden
|
||||
@completed_projects = current_user.projects.completed
|
||||
end
|
||||
format.m { render :action => 'mobile_list_deferred' }
|
||||
format.m
|
||||
format.xml { render :xml => @not_done_todos.to_xml( *to_xml_params ) }
|
||||
end
|
||||
end
|
||||
|
|
@ -774,8 +772,7 @@ class TodosController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html
|
||||
format.m {
|
||||
cookies[:mobile_url]= {:value => request.request_uri, :secure => SITE_CONFIG['secure_cookies']}
|
||||
render :action => "mobile_tag"
|
||||
cookies[:mobile_url]= {:value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
|
||||
}
|
||||
format.text {
|
||||
render :action => 'index', :layout => false, :content_type => Mime::TEXT
|
||||
|
|
@ -980,7 +977,7 @@ class TodosController < ApplicationController
|
|||
redirect_to home_path, "Viewing note of todo is not implemented"
|
||||
}
|
||||
format.m {
|
||||
render:action => "mobile_show_notes"
|
||||
render :action => "show_notes"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue