app/views/projects/_estimation_models.html.erb
<table>
<tr>
<td>
<%= I18n.t(:label_filter_on_projects_version) %>
<%= select_tag 'filter_organization_projects_version', options_for_select([[I18n.t(:label_filter_on_project_version_1),1], [I18n.t(:label_filter_on_project_version_2),2], [I18n.t(:label_filter_on_project_version_3),3], [I18n.t(:label_filter_on_project_version_4),4]], :selected => 1), 'data-organization_id' => @organization.id, :include_blank => false %>
</td>
<td colspan=2 style="text-align:right;">
<% if can? :manage_estimation_models, Project %>
<%= link_to I18n.t('new_estimation_model'), new_project_path(organization_id: @organization.id, is_model: true), :class => 'btn' %>
<% end %>
</td>
</tr>
</table>
<table id="table_list_1" class="table tablesorterPager table-striped table-bordered table-condensed">
<thead>
<tr>
<th class="text_left"><%= I18n.t(:label_model_name) %></th>
<th class="center">Vers.</th>
<th class="text_left"><%= I18n.t(:label_product_name) %></th>
<th style="width: 50px" class="filter-select"> <%= I18n.t(:state) %></th>
<th>Secteur</th>
<th>Catégorie</th>
<th>Plateforme</th>
<th>Acquisition</th>
<th class="action"><%= I18n.t(:actions) %></th>
</tr>
</thead>
<tbody>
<% @estimation_models.each do |project| %>
<% if can_see_estimation?(project) %>
<tr>
<td>
<% if can_show_estimation?(project) %>
<%= link_to(project.title, change_new_estimation_data_path(template_id: project.id, organization_id: project.organization_id, action_name: "create_project_from_template"), :title => I18n.t('button_duplicate_model'), remote: true) %>
<% else %>
<%= project.title %>
<% end %>
</td>
<td class="center"><%= project.version %></td>
<td class="text_field_text_overflow"><%= project.root_component %></td>
<td><span class="badge" style="background-color: <%= project.status_background_color %>"><%= project.status_name %></span></td>
<td class="text_field_text_overflow"><%= project.project_area %></td>
<td class="text_field_text_overflow"><%= project.project_category %></td>
<td class="text_field_text_overflow"><%= project.acquisition_category %></td>
<td class="text_field_text_overflow"><%= project.platform_category %></td>
<td style="min-width:130px;">
<% if can? :create_project_from_template, Project %>
<%= link_to('', main_app.duplicate_path(project, organization_id: @organization, action_name: "duplication_model"), :class => 'icon-copy pull-left', :title => I18n.t('button_duplicate_project')) %>
<%= link_to('', change_new_estimation_data_path(template_id: project.id, organization_id: project.organization_id, action_name: "create_project_from_template"), :class => 'icon-repeat pull-left', :title => I18n.t('button_duplicate_model'), remote: true) %>
<% end %>
<% if can_show_estimation?(project) %>
<%= link_to('', {:controller => 'projects', :action => 'find_use_estimation_model', :project_id => project.id}, :remote => true, 'data-project_id' => project.id, :class => 'icon icon-map-marker pull-left', :id => 'find_use_estimation_model', :title => I18n.t('button_find_use')) %>
<%= link_to('', edit_project_path(project, is_model: true, :anchor => 'tabs-1'), :class => 'icon-pencil pull-left', :title => I18n.t('edit')) %>
<% end %>
<% if can? :manage_estimation_models, Project %>
<%= link_to('', confirm_deletion_path(project.id), :class => 'icon-trash pull-left', :title => I18n.t('delete')) %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
<tfoot>
<%#= render :partial => 'layouts/footer_table' %>
</tfoot>
</table>
<script>
<%= render :partial => 'layouts/sort_date', :handlers => [:erb], :formats => [:js]%>
</script>