mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 17:28:50 +01:00
add accesskey so you can use your numpad on your mobile to navigate. Fixes [702]
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@832 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
5867412c9f
commit
1dd80ad222
4 changed files with 14 additions and 15 deletions
|
|
@ -115,8 +115,8 @@ module ApplicationHelper
|
|||
link_to( descriptor, project_path(project), :title => "View project: #{project.name}" )
|
||||
end
|
||||
|
||||
def link_to_project_mobile(project, descriptor = sanitize(project.name))
|
||||
link_to( descriptor, formatted_project_path(project, :m), :title => "View project: #{project.name}" )
|
||||
def link_to_project_mobile(project, accesskey, descriptor = sanitize(project.name))
|
||||
link_to( descriptor, formatted_project_path(project, :m), {:title => "View project: #{project.name}", :accesskey => accesskey} )
|
||||
end
|
||||
|
||||
def item_link_to_context(item)
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ module ProjectsHelper
|
|||
html = ''
|
||||
unless @previous_project.nil?
|
||||
project_name = truncate(@previous_project.name, 40, "...")
|
||||
html << link_to_project_mobile(@previous_project, "« #{project_name}")
|
||||
html << link_to_project_mobile(@previous_project, "5", "« 5-#{project_name}")
|
||||
end
|
||||
html << ' | ' if @previous_project && @next_project
|
||||
unless @next_project.nil?
|
||||
project_name = truncate(@next_project.name, 40, "...")
|
||||
html << link_to_project_mobile(@next_project, "#{project_name} »")
|
||||
html << link_to_project_mobile(@next_project, "6", "6-#{project_name} »")
|
||||
end
|
||||
html
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
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"})) -%>
|
||||
<%= (link_to("0-Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("1-Home", formatted_todos_path(:m))+" | ") unless @home -%>
|
||||
<%= (link_to("2-Contexts", formatted_contexts_path(:m))+" | ") %>
|
||||
<%= (link_to("3-Projects", formatted_projects_path(:m))+" | ") %>
|
||||
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
|
||||
<% end
|
||||
end %>
|
||||
<%= render_flash -%>
|
||||
|
|
@ -24,11 +24,11 @@
|
|||
<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("0-Add new action", formatted_new_todo_path(:m), {:accesskey => "0"})+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("1-Home", formatted_todos_path(:m), {:accesskey => "1"})+" | ") unless @home -%>
|
||||
<%= (link_to("2-Contexts", formatted_contexts_path(:m), {:accesskey => "2"})+" | ") %>
|
||||
<%= (link_to("3-Projects", formatted_projects_path(:m), {:accesskey => "3"})+" | ") %>
|
||||
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"}, {:accesskey => "4"})+" | ") -%>
|
||||
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+"| ") -%>
|
||||
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<% project = @project %>
|
||||
<%= project_next_prev_mobile %>
|
||||
<hr/>
|
||||
<h2><%=project.name%></h2>
|
||||
<% unless @project.description.blank? -%>
|
||||
<div class="project_description"><%= sanitize(@project.description) %></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue