diff --git a/nginx/public/node/frontend/public/js/app/manuscript-detail/folio/chant-record.template.html b/nginx/public/node/frontend/public/js/app/manuscript-detail/folio/chant-record.template.html index 64d5af43..f8d169a1 100644 --- a/nginx/public/node/frontend/public/js/app/manuscript-detail/folio/chant-record.template.html +++ b/nginx/public/node/frontend/public/js/app/manuscript-detail/folio/chant-record.template.html @@ -2,7 +2,7 @@

<% } %> <% if (cantus_id) { %> -Cantus ID: <%= cantus_id %> +Cantus ID: <%= cantus_id %> <% } %> <% if (cdb_link_url) { %> ( target = "_blank" rel = "noopener noreferrer">Visit record in Cantus Database) diff --git a/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js b/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js index 60905e15..bd61b16a 100644 --- a/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js +++ b/nginx/public/node/frontend/public/js/app/search/chant-search/ChantSearchProvider.js @@ -23,7 +23,8 @@ var KNOWN_FIELDS = [ {type: "genre", "name": "Genre"}, {type: "office", "name": "Office"}, {type: "differentia", "name": "Differentia"}, - {type: "differentiae_database", "name": "Differentiae Database"} + {type: "differentiae_database", "name": "Differentiae Database"}, + {type: "cantus_id", "name": "Cantus ID"}, ]; var INITIAL_LOAD_CUTOFF = 100; @@ -56,7 +57,8 @@ export default Marionette.Object.extend({ "differentia", "finalis", "folio", - "differentiae_database" + "differentiae_database", + "cantus_id" ], /** diff --git a/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultCollectionView.js b/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultCollectionView.js index 72ab77a0..a18409fe 100644 --- a/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultCollectionView.js +++ b/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultCollectionView.js @@ -57,6 +57,11 @@ export default Marionette.CompositeView.extend({ this.listenTo(this.searchParameters, 'change:sortBy change:reverseSort', this._triggerSortingChanged); this.listenTo(this.searchParameters, 'change:query change:field', this._resetScrolling); + + // Show manuscript column if additional fields requested in search + // includes the manuscript (in other words, if we are doing a + // cross-manuscript search) + this.showManuscript = _.some(this.getOption("infoFields"), field => field.type === 'manuscript'); }, childViewOptions: function () @@ -64,7 +69,8 @@ export default Marionette.CompositeView.extend({ return { searchType: this.searchParameters.get('field'), query: this.searchParameters.get('query'), - infoFields: this.getOption('infoFields') + infoFields: this.getOption('infoFields'), + showManuscript: this.showManuscript }; }, @@ -215,7 +221,8 @@ export default Marionette.CompositeView.extend({ templateHelpers: function() { return { - infoFields: _.toArray(this.getOption('infoFields')) + infoFields: _.toArray(this.getOption('infoFields')), + showManuscript: this.showManuscript }; } }); diff --git a/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultItemView.js b/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultItemView.js index d38dc397..b71da910 100644 --- a/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultItemView.js +++ b/nginx/public/node/frontend/public/js/app/search/chant-search/SearchResultItemView.js @@ -117,6 +117,7 @@ export default Marionette.ItemView.extend({ return { infoFields: infoFields, + showManuscript: this.getOption('showManuscript'), searchType: searchType, result: this.model.getFormattedData(searchType, query), isVolpianoSearch: searchType === 'volpiano' || searchType === 'volpiano_literal', diff --git a/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-collection.template.html b/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-collection.template.html index aecd5950..cd27cda4 100644 --- a/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-collection.template.html +++ b/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-collection.template.html @@ -2,6 +2,12 @@ + <% if (showManuscript) { %> + + <% } %> <% _.forEach(infoFields, function (field) { %> + <% if (field.type != 'manuscript') { %> + <% } %> <% }); %> diff --git a/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-item.template.html b/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-item.template.html index 7bde1525..b07fd125 100644 --- a/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-item.template.html +++ b/nginx/public/node/frontend/public/js/app/search/chant-search/search-result-item.template.html @@ -1,4 +1,8 @@ + <% if (showManuscript) { %> + + <% } %> + <% _.forEach(infoFields, function (field) { %> + <% if (field.type != 'manuscript') { %> + <% } %> <% }); %> diff --git a/solr/solr/cantus_ultimus_1/conf/schema.xml b/solr/solr/cantus_ultimus_1/conf/schema.xml index eac0d498..5d696f15 100644 --- a/solr/solr/cantus_ultimus_1/conf/schema.xml +++ b/solr/solr/cantus_ultimus_1/conf/schema.xml @@ -40,7 +40,7 @@ - + @@ -130,6 +130,7 @@ +
+ Manuscript + + Folio @@ -13,10 +19,12 @@ <%= field.name %>
<%= result.manuscript %><%= result.folio %> @@ -9,7 +13,9 @@ <%= result[field.type] %>