Sha256: 7c67401af4ca50267863c5b6e0f72b8dfe76868d6500f81f059b743b8fb4cb9d

Contents?: true

Size: 910 Bytes

Versions: 2

Compression:

Stored size: 910 Bytes

Contents

<%% if @<%= instance_name %> %>
  <%% if @<%= instance_name %>.new_record? %>

  	// Fill the right box with first <%= instance_name %> details
  	$('#div_<%= instance_name %>_details').html("<%%= escape_javascript(render(:partial=>'summary')) %>");

  <%% else %>

  	// Render the show partial to show flash message
  	$('#div_<%= instance_name %>_details').html("<%%= escape_javascript(render(:partial=>'show')) %>");

  <%% end %>

  // Render <%= instances_name %> List
  $('#div_<%= instance_name %>_collections').html("<%%= escape_javascript(render(:partial=>'index')) %>");

<%% else %>

  var noResultsText = "<div id=\"div_admin_empty\" class=\"box text-color-grey p-80 text-align-center\" style=\"height:200px;\"><%%= translate("forms.no_results_found") %></div>";
  $('#div_<%= instance_name %>_index').html(noResultsText);
  $('#div_<%= instance_name %>_details').html(noResultsText);

<%% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
humdrum-rails-0.1.3 lib/rails/generators/humdrum/resource/templates/views/bootstrap3/resource/destroy.js.erb
humdrum-rails-0.1.2 lib/rails/generators/humdrum/resource/templates/views/bootstrap3/resource/destroy.js.erb