<%
if has_role?(:user, @project)
open_action_plans = ActionPlan.find(:all, :conditions => ['status= ? AND project_id=?', ActionPlan::STATUS_OPEN, @project.id],
- :include => 'reviews', :order => 'dead_line ASC')
+ :include => 'reviews', :order => 'deadline ASC')
div_id = "action-plan-widget-#{widget.id.to_s}"
%>
%>
<tr>
<td class="nowrap"><%= h(plan.name) -%></td>
- <td class="nowrap small <%= 'over-due' if plan.over_due? -%>" style="text-align: right; padding-left:10px"><%= plan.dead_line ? plan.dead_line.strftime("%d %b %Y") : ' ' -%></td>
+ <td class="nowrap small <%= 'over-due' if plan.over_due? -%>" style="text-align: right; padding-left:10px"><%= plan.deadline ? plan.deadline.strftime("%d %b %Y") : ' ' -%></td>
<% if plan.progress[:total]==0 %>
<td class="noprogress nowrap"><%= message('action_plans.no_reviews_linked_to_action_plan') -%></td>
<% else %>
title = message('widget.planned_reviews.name')
open_action_plans = ActionPlan.find(:all, :conditions => ['status= ? AND project_id=?', ActionPlan::STATUS_OPEN, @project.id],
- :include => 'reviews', :order => 'dead_line ASC')
+ :include => 'reviews', :order => 'deadline ASC')
if open_action_plans.empty?
%>
@action_plan.name = params[:name]
@action_plan.description = params[:description]
- unless params[:dead_line].blank?
+ unless params[:deadline].blank?
begin
- dead_line = DateTime.strptime(params[:dead_line], '%d/%m/%Y')
+ deadline = DateTime.strptime(params[:deadline], '%d/%m/%Y')
# we check if the date is today or in the future
- if dead_line > 1.day.ago
- @action_plan.dead_line = dead_line
+ if deadline > 1.day.ago
+ @action_plan.deadline = deadline
else
date_not_valid = message('action_plans.date_cant_be_in_past')
end
end
def load_action_plans
- @open_action_plans = ActionPlan.find(:all, :conditions => ['status=? AND project_id=?', ActionPlan::STATUS_OPEN, @resource.id], :include => 'reviews', :order => 'dead_line ASC')
- @closed_action_plans = ActionPlan.find(:all, :conditions => ['status=? AND project_id=?', ActionPlan::STATUS_CLOSED, @resource.id], :include => 'reviews', :order => 'dead_line DESC')
+ @open_action_plans = ActionPlan.find(:all, :conditions => ['status=? AND project_id=?', ActionPlan::STATUS_OPEN, @resource.id], :include => 'reviews', :order => 'deadline ASC')
+ @closed_action_plans = ActionPlan.find(:all, :conditions => ['status=? AND project_id=?', ActionPlan::STATUS_CLOSED, @resource.id], :include => 'reviews', :order => 'deadline DESC')
end
end
end
def over_due?
- dead_line ? status==STATUS_OPEN && dead_line.past? : false
+ deadline ? status==STATUS_OPEN && deadline.past? : false
end
private
<td class="left" valign="top">
<%= message('action_plans.col.due_for') -%>:
<br/>
- <input type="text" name="dead_line" id="dead_line" value="<%= @action_plan && @action_plan.dead_line ? @action_plan.dead_line.strftime('%d/%m/%Y') : params[:dead_line] -%>"/>
+ <input type="text" name="deadline" id="deadline" value="<%= @action_plan && @action_plan.deadline ? @action_plan.deadline.strftime('%d/%m/%Y') : params[:deadline] -%>"/>
<br/>
<span class="note"><%= message('action_plans.date_format_help') -%></span>
</td>
<tr>
<td class="thin nowrap center"><img src="<%= ApplicationController.root_context -%>/images/status/<%= plan.status -%>.png" title="<%= message(plan.status.downcase).capitalize -%>"/></td>
<td class="thin nowrap"><%= h(plan.name) -%></td>
- <td class="thin nowrap <%= 'over-due' if plan.over_due? -%>" align="right" x="<%= plan.dead_line ? plan.dead_line.tv_sec : '' -%>"><%= plan.dead_line ? plan.dead_line.strftime("%d %b %Y") : ' ' -%></td>
+ <td class="thin nowrap <%= 'over-due' if plan.over_due? -%>" align="right" x="<%= plan.deadline ? plan.deadline.tv_sec : '' -%>"><%= plan.deadline ? plan.deadline.strftime("%d %b %Y") : ' ' -%></td>
<% if plan.progress[:total]==0 %>
<td class="noprogress thin nowrap">
<%= message('action_plans.no_reviews_linked_to_action_plan') -%>
<tr>
<td class="thin nowrap center"><img src="<%= ApplicationController.root_context -%>/images/status/<%= plan.status -%>.png" title="<%= message(plan.status.downcase).capitalize -%>"/></td>
<td class="thin nowrap"><%= h(plan.name) -%></td>
- <td class="thin nowrap <%= 'over-due' if plan.over_due? -%>" align="right" x="<%= plan.dead_line ? plan.dead_line.tv_sec : '' -%>"><%= plan.dead_line ? plan.dead_line.strftime("%d %b %Y") : ' ' -%></td>
+ <td class="thin nowrap <%= 'over-due' if plan.over_due? -%>" align="right" x="<%= plan.deadline ? plan.deadline.tv_sec : '' -%>"><%= plan.deadline ? plan.deadline.strftime("%d %b %Y") : ' ' -%></td>
<td class="thin nowrap" align="right" x="<%= plan.updated_at.tv_sec -%>"><%= plan.updated_at.strftime("%d %b %Y") -%></td>
<% if plan.progress[:total]==0 %>
<td class="noprogress thin nowrap">