mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Remove trailing whitespace and tabs
This commit is contained in:
parent
863d780ad0
commit
aa41e20e46
84 changed files with 407 additions and 407 deletions
|
|
@ -8,9 +8,9 @@ module ApplicationHelper
|
|||
menu_name = @group_view_by == 'context' ? 'project' : 'context'
|
||||
|
||||
content_tag(:li) do
|
||||
link_to(
|
||||
t("layouts.navigation.group_view_by_#{menu_name}"),
|
||||
'#',
|
||||
link_to(
|
||||
t("layouts.navigation.group_view_by_#{menu_name}"),
|
||||
'#',
|
||||
{:id => "group_view_by_link", :accesskey => "g", :title => t('layouts.navigation.group_view_by_title'), :x_current_group_by => @group_view_by} )
|
||||
end
|
||||
end
|
||||
|
|
@ -18,14 +18,14 @@ module ApplicationHelper
|
|||
def container_toggle(id)
|
||||
link_to(
|
||||
image_tag("blank.png", :alt => t('common.collapse_expand')),
|
||||
"#",
|
||||
"#",
|
||||
{:class => "container_toggle", :id => id} )
|
||||
end
|
||||
|
||||
|
||||
def navigation_link(name, options = {}, html_options = nil, *parameters_for_method_reference)
|
||||
link_to name, options, html_options
|
||||
end
|
||||
|
||||
|
||||
# Check due date in comparison to today's date Flag up date appropriately with
|
||||
# a 'traffic light' colour code
|
||||
#
|
||||
|
|
@ -39,7 +39,7 @@ module ApplicationHelper
|
|||
def due_date_mobile(due)
|
||||
return DateLabelHelper::DueDateView.new(due, prefs).due_date_mobile_html
|
||||
end
|
||||
|
||||
|
||||
# Returns a count of next actions in the given context or project. The result
|
||||
# is count and a string descriptor, correctly pluralised if there are no
|
||||
# actions or multiple actions
|
||||
|
|
@ -57,11 +57,11 @@ module ApplicationHelper
|
|||
s += ", #{t('common.note', :count => project.note_count)}" unless project.note_count == 0
|
||||
s.html_safe
|
||||
end
|
||||
|
||||
|
||||
def link_to_context(context, descriptor = sanitize(context.name))
|
||||
link_to( descriptor, context, :title => "View context: #{context.name}" )
|
||||
end
|
||||
|
||||
|
||||
def link_to_project(project, descriptor = sanitize(project.name))
|
||||
link_to( descriptor, project, :title => "View project: #{project.name}" )
|
||||
end
|
||||
|
|
@ -70,19 +70,19 @@ module ApplicationHelper
|
|||
link_to(descriptor, edit_note_path(note),
|
||||
{:id => "link_edit_#{dom_id(note)}", :class => "note_edit_settings"})
|
||||
end
|
||||
|
||||
|
||||
def link_to_project_mobile(project, accesskey, descriptor = sanitize(project.name))
|
||||
link_to( descriptor, project_path(project, :format => 'm'), {:title => "View project: #{project.name}", :accesskey => accesskey} )
|
||||
end
|
||||
|
||||
|
||||
def item_link_to_context(item)
|
||||
link_to_context( item.context, prefs.verbose_action_descriptors ? "[#{item.context.name}]" : "[C]" )
|
||||
end
|
||||
|
||||
|
||||
def item_link_to_project(item)
|
||||
link_to_project( item.project, prefs.verbose_action_descriptors ? "[#{item.project.name}]" : "[P]" )
|
||||
end
|
||||
|
||||
|
||||
def render_flash
|
||||
render :partial => 'shared/flash', :object => flash
|
||||
end
|
||||
|
|
@ -90,7 +90,7 @@ module ApplicationHelper
|
|||
def time_span_text(date, i18n_text)
|
||||
return (date ? "#{i18n_text} #{format_date(date)}" : "").html_safe
|
||||
end
|
||||
|
||||
|
||||
def recurrence_time_span(rt)
|
||||
case rt.ends_on
|
||||
when "no_end_date"
|
||||
|
|
@ -136,11 +136,11 @@ module ApplicationHelper
|
|||
def link_to_sidebar_item(item)
|
||||
item.is_a?(Project) ? link_to_project( item ) : link_to_context( item )
|
||||
end
|
||||
|
||||
|
||||
def sidebar_html_for_item(item)
|
||||
content_tag(:li, link_to_sidebar_item(item) + " (" + count_undone_todos_phrase(item)+")")
|
||||
end
|
||||
|
||||
|
||||
def sidebar_html_for_list(list)
|
||||
return content_tag(:li, t('sidebar.list_empty')).html_safe if list.empty?
|
||||
return list.inject("") { |html, item| html << sidebar_html_for_item(item) }.html_safe
|
||||
|
|
@ -190,16 +190,16 @@ module ApplicationHelper
|
|||
else
|
||||
send("#{type}_todos_path")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def determine_done_path
|
||||
done_path(controller.controller_name, :done)
|
||||
end
|
||||
|
||||
|
||||
def determine_all_done_path
|
||||
done_path(controller.controller_name, :all_done)
|
||||
end
|
||||
|
||||
|
||||
def get_list_of_error_messages_for(model)
|
||||
if model.errors.any?
|
||||
content_tag(:div, {:id=>"errorExplanation"}) do
|
||||
|
|
@ -209,7 +209,7 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def link_to_delete(type, object, descriptor = sanitize(object.name))
|
||||
link_to(
|
||||
descriptor,
|
||||
|
|
@ -239,19 +239,19 @@ module ApplicationHelper
|
|||
# create a unique object name which can be used in ajax calls returning js
|
||||
# to prevent concurrent calls with same functions to overwrite each other functions
|
||||
def unique_object_name_for(name)
|
||||
"#{name}_#{SecureRandom.hex(5)}"
|
||||
"#{name}_#{SecureRandom.hex(5)}"
|
||||
end
|
||||
|
||||
def js_render(partial, locals = {}, object=nil)
|
||||
if object
|
||||
escape_javascript(render(partial: partial, locals: locals, object: object))
|
||||
escape_javascript(render(partial: partial, locals: locals, object: object))
|
||||
else
|
||||
escape_javascript(render(partial: partial, locals: locals))
|
||||
escape_javascript(render(partial: partial, locals: locals))
|
||||
end
|
||||
end
|
||||
|
||||
def js_error_messages_for(object)
|
||||
escape_javascript(get_list_of_error_messages_for(object))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue