mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
Use rails helpers for the promote to project menu item
This commit is contained in:
parent
8bb92833b5
commit
04e3aebabe
2 changed files with 6 additions and 1 deletions
|
|
@ -201,7 +201,7 @@ module TodosHelper
|
|||
:_source_view => (@source_view.underscore.gsub(/\s+/,'_') rescue "")}
|
||||
url[:_tag_name] = @tag_name if @source_view == 'tag'
|
||||
|
||||
return link_to(t('todos.convert_to_project'), url, {:class => "icon_item_to_project", :id => "to_project_#{dom_id(todo)}"})
|
||||
link_to(t('todos.convert_to_project'), url, {:class => "icon_item_to_project", :id => dom_id(todo, "to_project")})
|
||||
end
|
||||
|
||||
def collapsed_notes_image(todo)
|
||||
|
|
|
|||
|
|
@ -19,4 +19,9 @@ class TodosHelpersTest < ActionView::TestCase
|
|||
html = remote_delete_dependency(todo, predecessor)
|
||||
assert_equal "<a class=\"delete_dependency_button\" href=\"/todos/18/remove_predecessor\" x_predecessors_id=\"1\"><img align=\"absmiddle\" alt=\"Blank\" class=\"delete_item\" src=\"/images/blank.png\" title=\"Remove dependency (does not delete the action)\" /></a>", html
|
||||
end
|
||||
|
||||
test "remote_promote_to_project_menu_item" do
|
||||
html = remote_promote_to_project_menu_item(todos(:call_bill))
|
||||
assert_equal "<a class=\"icon_item_to_project\" href=\"/todos/1/convert_to_project?_source_view=\" id=\"to_project_todo_1\">Make project</a>", html
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue