Initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<%= content_tag :div, class: "modal modal-right", id: "edl_event_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalLabel">EDL Event(s) for <%= @timecode %></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<p class="alert alert-info"><%= @info_message %></p>
|
||||
|
||||
<ul id="edl_events" class="list-group my-2 small">
|
||||
<% @edl_events.each do |edl_event| %>
|
||||
<li class="list-group-item">
|
||||
<dl class="row mb-0">
|
||||
<% edl_event.attributes.each do |name, value| %>
|
||||
<dt class="col-sm-5"><%= name.to_s.titleize %></dt>
|
||||
<dd class="col-sm-7 text-break"><%= value %></dd>
|
||||
<% end %>
|
||||
</dl>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= button_tag "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
7
app/views/video_analyses/edl_events/create.js.erb
Normal file
7
app/views/video_analyses/edl_events/create.js.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
$("[data-toggle=tooltip]").tooltip("dispose");
|
||||
<% # Remove the modal if it already exists %>
|
||||
$("#edl_event_modal").remove();
|
||||
|
||||
<% # Create and show the modal %>
|
||||
$("body").append("<%= j render('edl_event_modal', edl_events: @edl_events) %>");
|
||||
$("#edl_event_modal").modal("toggle");
|
||||
Reference in New Issue
Block a user