mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-16 20:28:09 +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
|
|
@ -32,21 +32,16 @@ module ProjectsHelper
|
|||
end
|
||||
|
||||
def project_next_prev_mobile
|
||||
html = '<ul class="next-prev-project">'
|
||||
prev_project,next_project= "", ""
|
||||
unless @previous_project.nil?
|
||||
project_name = truncate(@previous_project.name, :length => 40, :omission => "...")
|
||||
html << '<li class="prev">'
|
||||
html << link_to_project_mobile(@previous_project, "5", "#{project_name}")
|
||||
html << '</li>'
|
||||
prev_project = content_tag(:li, link_to_project_mobile(@previous_project, "5", project_name), :class=>"prev")
|
||||
end
|
||||
unless @next_project.nil?
|
||||
project_name = truncate(@next_project.name, :length => 40, :omission => "...")
|
||||
html << '<li class="next">'
|
||||
html << link_to_project_mobile(@next_project, "6", "#{project_name}")
|
||||
html << '</li>'
|
||||
next_project = content_tag(:li, link_to_project_mobile(@next_project, "6", project_name), :class=>"next")
|
||||
end
|
||||
html << '</ul>'
|
||||
html
|
||||
return content_tag(:ul, "#{prev_project}#{next_project}".html_safe, :class=>"next-prev-project").html_safe
|
||||
end
|
||||
|
||||
def link_to_delete_project(project, descriptor = sanitize(project.name))
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ module TodosHelper
|
|||
end
|
||||
|
||||
def tag_span (tag, mobile=false)
|
||||
content_tag(:span, :class => "tag #{tag.name.gsub(' ','-')}") { link_to(tag.name, (mobile ? mobile_tag_path(tag.name) : tag_path(tag.name))) }
|
||||
content_tag(:span, :class => "tag #{tag.name.gsub(' ','-')}") { link_to(tag.name, tag_path(tag.name, :format => mobile ? :m : :html)) }
|
||||
end
|
||||
|
||||
def tag_list(todo=@todo, mobile=false)
|
||||
|
|
@ -143,17 +143,11 @@ module TodosHelper
|
|||
end
|
||||
|
||||
def tag_list_mobile(todo=@todo)
|
||||
unless todo.tags.all_except_starred.empty?
|
||||
return tag_list(todo, true)
|
||||
else
|
||||
return ""
|
||||
end
|
||||
todo.tags.all_except_starred.empty? ? "" : tag_list(todo, true)
|
||||
end
|
||||
|
||||
def deferred_due_date(todo=@todo)
|
||||
if todo.deferred? && todo.due
|
||||
t('todos.action_due_on', :date => format_date(todo.due))
|
||||
end
|
||||
t('todos.action_due_on', :date => format_date(todo.due)) if todo.deferred? && todo.due
|
||||
end
|
||||
|
||||
def project_and_context_links(todo, parent_container_type, opts = {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue