jshoe/coursequestionbank

View on GitHub
app/views/collections/_edit_collection.html.haml

Summary

Maintainability
Test Coverage

%h3.section_title 
  Edit Collection
  = link_to collection.name, collection_path(:id => collection.id)

%div.section_options
  = form_tag collection_path(:id => collection.id), :method => :delete do
    = button_tag :type => 'submit', :class => 'btn btn-default' do
      %span.glyphicon.glyphicon-trash
      Delete Collection
      

%div.section_body
  = render :partial => 'collections/form', :locals => {:collection => collection}
  
  = render :partial => 'problems/problem_table', 
            :locals => {:problems => collection.problems, :columns => [:checkbox, :problem, :tags],
                        :group_id => collection.id, :empty_msg => 'This collection is empty'}