tracks/app/views/recurring_todos/_recurring_todo.html.erb
Reinier Balt 5659b8adbb fix #764 where unnecessary space is removed in the recurrence pattern
also fixes the case that a rec todo that has a start date but no end date is not showing the from xx-xx-xxxx on the page
2008-11-29 20:15:49 +01:00

21 lines
891 B
Text

<% @recurring_todo = recurring_todo -%>
<div id="<%= dom_id(@recurring_todo)%>" class="recurring_todo item-container">
<%= recurring_todo_remote_delete_icon %> <%= recurring_todo_remote_edit_icon -%>
<%= recurring_todo_remote_star_icon %> <%= recurring_todo_remote_toggle_checkbox -%>
<div class="description">
<span class="todo.descr"><%= sanitize(recurring_todo.description) %></span> <%= recurring_todo_tag_list %>
<span class='recurrence_pattern'>
<%
rt = recurrence_target(recurring_todo)
rp = recurring_todo.recurrence_pattern
# only add space if recurrence_pattern has content
rp = " " + rp if !rp.nil?
rts = recurrence_time_span(recurring_todo)
# only add space if recurrence_time_span has content
rts = " " + rts if !(rts == "")
%>
[<%=rt%><%=rp%><%=rts%>]
</span>
</div>
</div>