blacklight-spotlight 3.6.0.beta6 → 3.6.0.beta7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -7
- data/app/assets/javascripts/spotlight/spotlight.esm.js +18 -13
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +18 -13
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/controllers/spotlight/tags_controller.rb +1 -1
- data/app/javascript/spotlight/admin/blocks/solr_documents_base_block.js +18 -13
- data/app/models/concerns/spotlight/browse_category_search_builder.rb +10 -1
- data/app/models/spotlight/blacklight_configuration.rb +9 -9
- data/app/models/spotlight/contact.rb +1 -1
- data/app/models/spotlight/contact_form.rb +1 -1
- data/app/models/spotlight/custom_field.rb +1 -1
- data/app/models/spotlight/custom_search_field.rb +1 -1
- data/app/models/spotlight/event.rb +1 -1
- data/app/models/spotlight/exhibit.rb +1 -1
- data/app/models/spotlight/job_tracker.rb +1 -1
- data/app/models/spotlight/resource.rb +1 -1
- data/app/models/spotlight/solr_document_sidecar.rb +5 -3
- data/app/services/spotlight/etl/executor.rb +1 -1
- data/app/services/spotlight/etl/solr_loader.rb +1 -1
- data/app/services/spotlight/invite_users_service.rb +1 -1
- data/lib/migration/iiif.rb +3 -3
- data/lib/spotlight/engine.rb +17 -4
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +1 -1
- data/spec/factories/searches.rb +12 -0
- data/spec/support/features/test_features_helpers.rb +1 -1
- metadata +7 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f59fc33de8461403daa1326b041fab3112dfe1a6f258cc94ac176ba2632752a
|
|
4
|
+
data.tar.gz: 5cc76ddd3bad73d112209ca51702ac4895c3817301f7d4796f413fb28d8d25eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ea0e4c383fc413a42b5ba09fc2041a49c1b0958a8dba3a87052494bf4dd09337290241d49f7bd15154eb6a3f018041cb84e62936aa4e17a4aca60e6fca55206
|
|
7
|
+
data.tar.gz: 17f5372a8ab30a68753f8d5d31b3daf1f8d483998d6092d939942fa114a07e758a3c6ae154631a028baa1028c1052308b634d137cd259395d25757b870b8cbd0
|
data/README.md
CHANGED
|
@@ -19,13 +19,13 @@ Read more about what Spotlight is, our motivations for creating it, and how to i
|
|
|
19
19
|
To bootstrap a new Rails application:
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
$ rails new app-name -m https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb
|
|
22
|
+
$ SKIP_TRANSLATION=1 rails new app-name -m https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
or from an existing Rails application:
|
|
26
26
|
|
|
27
27
|
```
|
|
28
|
-
$ rails app:template LOCATION=https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb
|
|
28
|
+
$ SKIP_TRANSLATION=1 rails app:template LOCATION=https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
*During this process you will be prompted to enter an initial administrator email and password (this is a super-admin that can administer any exhibit in the installation).* If you choose not to create one, the first user will be given administrative privileges.
|
|
@@ -39,7 +39,7 @@ $ cd app-name
|
|
|
39
39
|
Run the database migrations:
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
-
$ rake db:migrate
|
|
42
|
+
$ SKIP_TRANSLATION=1 rake db:migrate
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Start Solr (possibly using `solr_wrapper` in development or testing):
|
|
@@ -118,9 +118,11 @@ See [developer-facing instructions for enabling translation](https://github.com/
|
|
|
118
118
|
The javascript is built by npm from sources in `app/javascript` into a bundle
|
|
119
119
|
in `app/assets/javascripts/spotlight/spotlight.js`. This file should not be edited
|
|
120
120
|
by hand as any changes would be overwritten. When any of the javascript
|
|
121
|
-
components in the gem are changed, this bundle should be
|
|
121
|
+
components in the gem are changed, this bundle should be rebuilt with the
|
|
122
122
|
following steps:
|
|
123
123
|
1. [Install npm](https://www.npmjs.com/get-npm)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
2. run `npm install` to download dependencies
|
|
125
|
+
3. make sure that the version in `package.json` matches your intended release version
|
|
126
|
+
4. commit the new `package-lock.json` that reflects the desired version number
|
|
127
|
+
6. run `npm run prepare` to build the bundle
|
|
128
|
+
6. run `npm publish` to push the javascript package to https://npmjs.org/package/spotlight-frontend
|
|
@@ -6428,19 +6428,24 @@ SirTrevor.Blocks.SolrDocumentsBase = (function(){
|
|
|
6428
6428
|
</div>
|
|
6429
6429
|
`},
|
|
6430
6430
|
|
|
6431
|
-
|
|
6431
|
+
// Sets the first version of the IIIF information from autocomplete data.
|
|
6432
|
+
_itemPanelIiifFields: function(index, autocomplete_data) {
|
|
6432
6433
|
return [
|
|
6433
6434
|
// '<input type="hidden" name="item[' + index + '][iiif_region]" value="' + (data.iiif_region) + '"/>',
|
|
6434
6435
|
// for legacy compatiblity:
|
|
6435
|
-
'<input type="hidden" name="item[' + index + '][thumbnail_image_url]" value="' + (
|
|
6436
|
-
'<input type="hidden" name="item[' + index + '][full_image_url]" value="' + (
|
|
6437
|
-
'<input type="hidden" name="item[' + index + '][iiif_tilesource]" value="' + (
|
|
6438
|
-
'<input type="hidden" name="item[' + index + '][iiif_manifest_url]" value="' + (
|
|
6439
|
-
'<input type="hidden" name="item[' + index + '][iiif_canvas_id]" value="' + (
|
|
6440
|
-
'<input type="hidden" name="item[' + index + '][iiif_image_id]" value="' + (
|
|
6436
|
+
'<input type="hidden" name="item[' + index + '][thumbnail_image_url]" value="' + (autocomplete_data.thumbnail_image_url || autocomplete_data.thumbnail || "") + '"/>',
|
|
6437
|
+
'<input type="hidden" name="item[' + index + '][full_image_url]" value="' + (autocomplete_data.full_image_url || autocomplete_data.thumbnail_image_url || autocomplete_data.thumbnail || "") + '"/>',
|
|
6438
|
+
'<input type="hidden" name="item[' + index + '][iiif_tilesource]" value="' + (autocomplete_data.iiif_tilesource) + '"/>',
|
|
6439
|
+
'<input type="hidden" name="item[' + index + '][iiif_manifest_url]" value="' + (autocomplete_data.iiif_manifest_url) + '"/>',
|
|
6440
|
+
'<input type="hidden" name="item[' + index + '][iiif_canvas_id]" value="' + (autocomplete_data.iiif_canvas_id) + '"/>',
|
|
6441
|
+
'<input type="hidden" name="item[' + index + '][iiif_image_id]" value="' + (autocomplete_data.iiif_image_id) + '"/>',
|
|
6441
6442
|
].join("\n");
|
|
6442
6443
|
},
|
|
6443
|
-
|
|
6444
|
+
// Overwrites the hidden inputs from _itemPanelIiifFields with data from the
|
|
6445
|
+
// manifest. Called by afterPanelRender - the manifest_data here is built
|
|
6446
|
+
// from canvases in the manifest, transformed by spotlight/admin/iiif.js in
|
|
6447
|
+
// the #images method.
|
|
6448
|
+
setIiifFields: function(panel, manifest_data, initialize) {
|
|
6444
6449
|
var legacyThumbnailField = $(panel).find('[name$="[thumbnail_image_url]"]');
|
|
6445
6450
|
var legacyFullField = $(panel).find('[name$="[full_image_url]"]');
|
|
6446
6451
|
|
|
@@ -6450,11 +6455,11 @@ SirTrevor.Blocks.SolrDocumentsBase = (function(){
|
|
|
6450
6455
|
|
|
6451
6456
|
legacyThumbnailField.val("");
|
|
6452
6457
|
legacyFullField.val("");
|
|
6453
|
-
$(panel).find('[name$="[iiif_image_id]"]').val(
|
|
6454
|
-
$(panel).find('[name$="[iiif_tilesource]"]').val(
|
|
6455
|
-
$(panel).find('[name$="[iiif_manifest_url]"]').val(
|
|
6456
|
-
$(panel).find('[name$="[iiif_canvas_id]"]').val(
|
|
6457
|
-
$(panel).find('img.img-thumbnail').attr('src',
|
|
6458
|
+
$(panel).find('[name$="[iiif_image_id]"]').val(manifest_data.imageId);
|
|
6459
|
+
$(panel).find('[name$="[iiif_tilesource]"]').val(manifest_data.tilesource);
|
|
6460
|
+
$(panel).find('[name$="[iiif_manifest_url]"]').val(manifest_data.manifest);
|
|
6461
|
+
$(panel).find('[name$="[iiif_canvas_id]"]').val(manifest_data.canvasId);
|
|
6462
|
+
$(panel).find('img.img-thumbnail').attr('src', manifest_data.thumbnail_image_url || manifest_data.tilesource.replace("/info.json", "/full/100,100/0/default.jpg"));
|
|
6458
6463
|
},
|
|
6459
6464
|
afterPanelRender: function(data, panel) {
|
|
6460
6465
|
var context = this;
|