2 if has_role?(:user, @project)
3 open_action_plans = ActionPlan.find(:all, :conditions => ['status= ? AND project_id=?', ActionPlan::STATUS_OPEN, @project.id],
4 :include => 'reviews', :order => 'deadline ASC')
6 div_id = "action-plan-widget-#{widget.id.to_s}"
9 <div class="line-block">
10 <% if has_role?(:admin, @project) %>
11 <div style="float:right">
12 <a href="<%= url_for :controller => 'action_plans', :action => 'index', :id => @project.id -%>">
13 <%= message('widgets.more') -%>
18 <h3><%= message('widget.action_plans.title') -%></h3>
22 <div id="<%= div_id -%>">
24 <% if open_action_plans.size ==0 %>
25 <span class="empty_widget"><%= message('widget.action_plans.no_action_plan') -%></span>
27 <table class="width100 actionPlans">
35 open_action_plans.each do |plan|
38 <td class="nowrap"><%= h(plan.name) -%></td>
39 <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>
40 <% if plan.progress[:total]==0 %>
41 <td class="noprogress nowrap"><%= message('action_plans.no_reviews_linked_to_action_plan') -%></td>
44 <%= render :partial => 'action_plans/progress', :locals => {:action_plan => plan} -%>