mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-18 13:18:09 +01:00
Bug #300: First shot at dependency entry in edit form
Limitations: * No javascript update of dependency changes. * No resolution for duplicate descriptions. Conflicts: app/views/todos/_edit_form.rhtml
This commit is contained in:
parent
45dd524519
commit
42cbe52224
4 changed files with 98 additions and 3 deletions
|
|
@ -116,6 +116,20 @@ module TodosHelper
|
|||
if tag_list.empty? then "" else "<span class=\"tags\">#{tag_list}</span>" end
|
||||
end
|
||||
|
||||
# TODO: Use DELIMITER
|
||||
def predecessor_list_text
|
||||
@todo.predecessors.collect{|t| t.description}.join(', ')
|
||||
end
|
||||
|
||||
def predecessor_list
|
||||
predecessor_list = @todo.predecessors.collect{|t|
|
||||
'<span class="predecessor #{t.description}">' +
|
||||
link_to(t.name, :controller => "todos", :action => "tag", :id => t.name) +
|
||||
"</span>"
|
||||
}.join('')
|
||||
'<span class="predecessors">#{predecessor_list}</span>'
|
||||
end
|
||||
|
||||
def deferred_due_date
|
||||
if @todo.deferred? && @todo.due
|
||||
"(action due on #{format_date(@todo.due)})"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue