Last active
August 29, 2015 14:16
-
-
Save tbrooke/9865def645faeaa5490a to your computer and use it in GitHub Desktop.
Service Request Abstractor Selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$("#modal-1").on("change", function() { | |
if ($(this).is(":checked")) { | |
$("body").addClass("modal-open"); | |
} else { | |
$("body").removeClass("modal-open"); | |
} | |
}); | |
$(".modal-window").on("click", function() { | |
$(".modal-state:checked").prop("checked", false).change(); | |
}); | |
$(".modal-inner").on("click", function(e) { | |
e.stopPropagation(); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<table> | |
<thead> | |
<tr> | |
<td>Lease</td> | |
<td>Delivery</td> | |
</tr> | |
</thead> | |
<tbody> | |
<% @submitted = @services.in_state('submitted','approve_fee', 'fee_accepted') %> | |
<%= will_paginate @submitted %> | |
<% @submitted.each do |submit| %> | |
<tr> | |
<td><%= link_to submit.lease_number, submit %></td> | |
<td><%= submit.current_state %></td> | |
</tr> | |
<% end %> | |
</tbody> | |
</table> | |
<div class="modal"> | |
<label for="modal-1"> | |
<div class="modal-trigger">Assign</div> | |
</label> | |
<input class="modal-state" id="modal-1" type="checkbox" /> | |
<div class="modal-window"> | |
<div class="modal-inner"> | |
<label class="modal-close" for="modal-1"></label> | |
<h1>Abstractors</h1> | |
<table> | |
<% @abstractors.each do |abstractor| %> | |
<tr> | |
<td><%= check_box 'ok', abstractor_dispatcher_path(abstractor), method: :put %></td> | |
<td><%= link_to(abstractor.last_name, abstractor_path(abstractor)) %></td> | |
<td><%= abstractor.phone %></td> | |
<td><%= abstractor.email %></td> | |
</tr> | |
<% end %> | |
</table> | |
</div> | |
</div> | |
</div> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment