1 <%= content_for :tab_line_buttons do %>
2 <%= form_tag({action: 'compare', controller: params[:controller], method: 'get'}, {method: 'get', id: 'compare', class: 'pull-right small-form-margin'}) do |f| %>
3 <%= submit_tag 'Compare 2 or 3 selected', {class: 'btn btn-primary', disabled: true, style: 'display: none'} %>
8 <%= render partial: "paging", locals: {results: @objects, object: @object} %>
10 <%= form_tag do |f| %>
12 <table class="table table-condensed table-fixedlayout">
23 <tr class="contain-align-left">
41 <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
43 <tr data-object-uuid="<%= ob.uuid %>">
45 <%= check_box_tag 'uuids[]', ob.uuid, false, :class => 'persistent-selection' %>
47 <%= render partial: 'pipeline_status_label', locals: {:p => ob} %>
49 <%= link_to_if_arvados_object ob, friendly_name: true %>
51 <%= link_to_if_arvados_object ob.pipeline_template_uuid, friendly_name: true %>
53 <%= link_to_if_arvados_object ob.owner_uuid, friendly_name: true %>
55 <%= distance_of_time_in_words(ob.created_at, Time.now) %>
57 <%= render partial: 'delete_object_button', locals: {object:ob} %>
61 <td style="border-top: 0;" colspan="2">
63 <td style="border-top: 0; opacity: 0.5;" colspan="6">
64 <% ob.components.each do |cname, c| %>
66 <%= render partial: "job_status_label", locals: {:j => c[:job], :title => cname.to_s } %>
68 <span class="label label-default"><%= cname.to_s %></span>
80 <%= render partial: "paging", locals: {results: @objects, object: @object} %>
82 <% content_for :footer_js do %>
83 var showhide_compare = function() {
84 var form = $('form#compare')[0];
85 $('input[type=hidden][name="uuids[]"]', form).remove();
86 $('input[type=submit]', form).prop('disabled',true).show();
87 var checked_inputs = $('input[name="uuids[]"]:checked');
88 if (checked_inputs.length >= 2 && checked_inputs.length <= 3) {
89 checked_inputs.each(function(){
91 $('input[type=submit]', form).prop('disabled',false).show();
92 $(form).append($('<input type="hidden" name="uuids[]"/>').val(this.value));
97 $('form input[name="uuids[]"]').on('click', showhide_compare);