blacklight-spotlight 4.3.3 → 4.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/components/spotlight/document_admin_table_component.html.erb +1 -1
- data/app/components/spotlight/solr_document_legacy_embed_component.rb +14 -1
- data/app/views/spotlight/job_trackers/show.html.erb +59 -62
- data/lib/spotlight/version.rb +1 -1
- metadata +3 -3
@@ -21,7 +21,7 @@
|
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div class="page-links">
|
24
|
-
<%= helpers.view_link presenter.document, helpers.
|
24
|
+
<%= helpers.view_link presenter.document, helpers.search_state.url_for_document(presenter.document) %> ·
|
25
25
|
<%= helpers.exhibit_edit_link presenter.document, [:edit, helpers.current_exhibit, presenter.document] %>
|
26
26
|
</div>
|
27
27
|
</td>
|
@@ -1,7 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Render an document suitable for embedding on a feature page.
|
4
3
|
module Spotlight
|
4
|
+
# Render an document suitable for embedding on a feature page.
|
5
5
|
class SolrDocumentLegacyEmbedComponent < Blacklight::DocumentComponent
|
6
|
+
attr_reader :block_context
|
7
|
+
|
8
|
+
def initialize(*args, block: nil, **kwargs)
|
9
|
+
super
|
10
|
+
|
11
|
+
@block_context = block
|
12
|
+
end
|
13
|
+
|
14
|
+
def before_render
|
15
|
+
set_slot(:embed, nil, block_context: block_context) unless embed
|
16
|
+
|
17
|
+
super
|
18
|
+
end
|
6
19
|
end
|
7
20
|
end
|
@@ -3,77 +3,74 @@
|
|
3
3
|
<%= render 'spotlight/shared/exhibit_sidebar' %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
<div class="modal-header border-0">
|
6
|
+
<%= render Blacklight::System::ModalComponent.new do |c| %>
|
7
|
+
<% c.with_header do %>
|
9
8
|
<h2 class="modal-title"><%= job_status_icon(@job_tracker) %> <%= t @job_tracker.job_class, default: @job_tracker.job_class %> <small class="text-monospace font-monospace font-weight-lighter fw-lighter"><%= @job_tracker.job_id&.truncate(8, omission: '') %></small></h2>
|
9
|
+
<% end %>
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<div class="modal-body row">
|
17
|
-
<p class="mx-2 text-small">
|
18
|
-
<%= t(:".summary.#{@job_tracker.status}", default: '', last_updated: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), created_at: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), duration: distance_of_time_in_words(@job_tracker.created_at, @job_tracker.updated_at)) %>
|
19
|
-
</p>
|
20
|
-
|
21
|
-
<table class="table table-striped">
|
22
|
-
<thead>
|
23
|
-
<th></th>
|
24
|
-
<th><%= t('.headers.message') %></th>
|
25
|
-
<th><%= t('.headers.details') %></th>
|
26
|
-
</thead>
|
11
|
+
<% c.with_body do %>
|
12
|
+
<div class="modal-body row">
|
13
|
+
<p class="mx-2 text-small">
|
14
|
+
<%= t(:".summary.#{@job_tracker.status}", default: '', last_updated: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), created_at: time_ago_in_words(@job_tracker.updated_at, include_seconds: true), duration: distance_of_time_in_words(@job_tracker.created_at, @job_tracker.updated_at)) %>
|
15
|
+
</p>
|
27
16
|
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
<th
|
32
|
-
<
|
33
|
-
|
34
|
-
</tr>
|
17
|
+
<table class="table table-striped">
|
18
|
+
<thead>
|
19
|
+
<th></th>
|
20
|
+
<th><%= t('.headers.message') %></th>
|
21
|
+
<th><%= t('.headers.details') %></th>
|
22
|
+
</thead>
|
35
23
|
|
36
|
-
|
37
|
-
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
<% end %>
|
43
|
-
|
44
|
-
<% @job_tracker.events.order(:created_at, :collation_key).find_each do |e| %>
|
45
|
-
<tr class="<%= job_tracker_event_table_row_class(e) %>">
|
46
|
-
<th scope="row" title="<%= l e.created_at, format: :long %>"><%= row_number += 1 %></th>
|
47
|
-
<td><%= e.data[:message] %></td>
|
48
|
-
<td><pre><%= JSON.pretty_generate(e.data.except(:message)) %></pre></td>
|
24
|
+
<tbody>
|
25
|
+
<% row_number = 0 %>
|
26
|
+
<tr>
|
27
|
+
<th scope="row" title="<%= l @job_tracker.created_at, format: :long %>"><%= row_number += 1 %></th>
|
28
|
+
<td><%= t('.messages.started') %></td>
|
29
|
+
<td><%= l @job_tracker.updated_at, format: :long %></td>
|
49
30
|
</tr>
|
50
|
-
<% end %>
|
51
31
|
|
52
|
-
|
53
|
-
<tr
|
54
|
-
<th scope="row" title="<%= l
|
55
|
-
<td><%=
|
56
|
-
<td
|
32
|
+
<% if @job_tracker.user %>
|
33
|
+
<tr>
|
34
|
+
<th scope="row" title="<%= l @job_tracker.created_at, format: :long %>"><%= row_number += 1 %></th>
|
35
|
+
<td><%= t('.messages.created_by', user: @job_tracker.user.email) %></td>
|
36
|
+
<td></td>
|
57
37
|
</tr>
|
58
|
-
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% @job_tracker.events.order(:created_at, :collation_key).find_each do |e| %>
|
41
|
+
<tr class="<%= job_tracker_event_table_row_class(e) %>">
|
42
|
+
<th scope="row" title="<%= l e.created_at, format: :long %>"><%= row_number += 1 %></th>
|
43
|
+
<td><%= e.data[:message] %></td>
|
44
|
+
<td><pre><%= JSON.pretty_generate(e.data.except(:message)) %></pre></td>
|
45
|
+
</tr>
|
46
|
+
<% end %>
|
59
47
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
</tr>
|
48
|
+
<% @job_tracker.subevents.where.not(type: :summary).order(:created_at, :collation_key).find_each do |e| %>
|
49
|
+
<tr class="<%= job_tracker_event_table_row_class(e) %>">
|
50
|
+
<th scope="row" title="<%= l e.created_at, format: :long %>"><%= row_number += 1 %></th>
|
51
|
+
<td><%= e.data[:message] %></td>
|
52
|
+
<td><pre><%= JSON.pretty_generate(e.data.except(:message)) %></pre></td>
|
53
|
+
</tr>
|
54
|
+
<% end %>
|
68
55
|
|
69
|
-
|
56
|
+
<% error_count = @job_tracker.subevents.where(type: :summary).find_each.sum { |e| e.data[:errors] } %>
|
70
57
|
<tr>
|
71
58
|
<th scope="row" title="<%= l @job_tracker.updated_at, format: :long %>"><%= row_number += 1 %></th>
|
72
|
-
<td
|
73
|
-
|
59
|
+
<td>
|
60
|
+
<%= t('.messages.progress', progress: @job_tracker.progress, total: @job_tracker.total, errors: (t('.messages.errors', count: error_count) if error_count.positive?)) %>
|
61
|
+
</td>
|
62
|
+
<td></td>
|
74
63
|
</tr>
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
64
|
+
|
65
|
+
<% unless @job_tracker.in_progress? %>
|
66
|
+
<tr>
|
67
|
+
<th scope="row" title="<%= l @job_tracker.updated_at, format: :long %>"><%= row_number += 1 %></th>
|
68
|
+
<td><%= t(@job_tracker.status, scope: 'spotlight.job_trackers.show.messages.status', default: :'spotlight.job_trackers.show.messages.status.missing') %></td>
|
69
|
+
<td><%= l @job_tracker.updated_at, format: :long %></td>
|
70
|
+
</tr>
|
71
|
+
<% end %>
|
72
|
+
</tbody>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<% end %>
|
76
|
+
<% end %>
|
data/lib/spotlight/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-spotlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|
@@ -1586,7 +1586,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1586
1586
|
- !ruby/object:Gem::Version
|
1587
1587
|
version: '0'
|
1588
1588
|
requirements: []
|
1589
|
-
rubygems_version: 3.
|
1589
|
+
rubygems_version: 3.4.19
|
1590
1590
|
signing_key:
|
1591
1591
|
specification_version: 4
|
1592
1592
|
summary: Enable librarians, curators, and others who are responsible for digital collections
|