estimancy/projestimate

View on GitHub
app/views/projects/_find_use_related_estimation_model.html.erb

Summary

Maintainability
Test Coverage
<% if @related_projects.nil? || @related_projects.empty? %>
    <div class="alert alert-info" colspan="2"><%=raw "#{h I18n.t(:notice_no_estimation_created_from_model, :model_name => @project)}" %> </div><br>

<% else %>
    <table border="0" width="100%" class="table tablesorterPager table-striped table-bordered table-condensed">
      <tr>
        <th><%= I18n.t(:text_find_use_estimation_model, :model_name => @project.title) %></th>
      </tr>
      <% @related_projects.each do |project| %>
          <% if can_see_estimation?(project) %>
              <tr>
                <td>
                  <% if can_show_estimation?(project) %>
                    <span class='attribute_tooltip' title="<%= project.description %>"><%= raw link_to("#{project}", edit_pemodule_path(project)) %> </span>
                  <% else %>
                      <span class='attribute_tooltip' title="<%= project.description %>"><%= project.title %> </span>
                  <% end %>
                </td>
              </tr>
          <% end %>
      <% end %>
    </table>
<% end %>