estimancy/projestimate

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

Summary

Maintainability
Test Coverage
<%= form_tag url_for( {:action => 'destroy', :controller => 'projects', :id => @project.id}), {:method => 'delete', :class=>'simple_form'} do %>
        <h3><%= "#{@project.title}-#{@project.version} " %></h3>
    <div class="confirm_deletion">
      <%= hidden_field_tag 'from_tree_history_view', @from_tree_history_view %>
      <%= hidden_field_tag 'current_showed_project_id', @current_showed_project_id %>
      <% if @project.is_model %>
        <%= I18n.t('text_confirm_estimation_model_deletion') %>
      <% else %>
          <%= I18n.t('text_confirm_project_deletion') %>
      <% end %>

      <br /><br />
      <div class="actions">
        <span style="margin-right: 10px;"> <%= check_box_tag "yes_confirmation", 'selected' %>  <%= I18n.t('simple_form.yes') %></span>
        <%= submit_tag I18n.t('delete'), :class => 'btn', :id => 'yes_delete_project' %>
        <%= submit_tag I18n.t('cancel'), :class => 'btn', :id => 'cancel_project_deletion' %>
      </div>
    </div>
<% end %>