Skip to content

Commit

Permalink
Merge branch 'main' into APPS-2680-search-results
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefilter authored Aug 29, 2024
2 parents 784745c + 1ccf5b3 commit 5335d6a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ jobs:
docker-compose run web yarn install --frozen-lockfile
docker-compose up --detach
docker-compose run web bundle exec rails db:setup
- uses: cypress-io/github-action@v3
- uses: cypress-io/github-action@v6
with:
command-prefix: 'percy exec -- npx'
working-directory: e2e
browser: chrome
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: Stop docker services
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/on-merge.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
name: Post-merge chores
name: On merge

on:
push:
branches:
- main

jobs:
autoupdate:
name: Update outstanding PRs
deploy-ursus:
name: Deploy Ursus main branch to test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: update all prs
uses: maxkomarychev/pr-updater-action@92cb6e15dc3c4b9b148b65eef32836bb428587b9 # v1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Jenkins webhook
uses: enflo/curl-action@fabe347922c7a9e88bafa15c4b7d6326ea802695
with:
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class CatalogController < ApplicationController
config.add_show_field 'interviewer_tesim', label: 'Interviewer', link_to_facet: 'interviewee_sim' # Primary / Item Overview
config.add_show_field 'keyword_tesim', label: 'Keyword' # Not Using
config.add_show_field 'latitude_tesim', label: 'Latitude' # Primary / Physical description
config.add_show_field 'license_tesim', label: 'License' # Secondary / Access Conditions
config.add_show_field 'license_tesim', label: 'License', helper_method: :render_license # Secondary / Access Conditions
config.add_show_field 'local_identifier_ssim', label: 'Local identifier' # Secondary / Find This Item
config.add_show_field 'local_rights_statement_ssm', label: 'Local rights statement' # Secondary / Access Conditions
config.add_show_field 'location_tesim', label: 'Location', link_to_facet: 'location_sim' # Primary / Physical description
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/blacklight_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module BlacklightHelper

# TODO: This method should correctly render methods other than CC-BY 4.0 and
# be able to distinguish between them.
def render_license
def render_license(_args = {})
return '' unless @document
return '' unless @document[:license_tesim]
license = @document[:license_tesim].first
Expand Down
24 changes: 11 additions & 13 deletions app/views/catalog/work_record--ursus/_keyword_metadata.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@
<% end %>
<% end %>
<% if (@document[:subject_tesim].present? && !@document[:subject_tesim].empty?) || (document[:subject_topic_tesim].present? && !@document[:subject_topic_tesim].empty?) %>
<dt class="blacklight-subjects metadata-block__label-key">
<!-- KEY -->
Subjects
<!-- VALUE -->
<% keyword.each do |field_name, field| %>
<% if field_name == "subject_tesim" || field_name == "subject_topic_tesim" %>
<dd class="blacklight-<%= field_name.parameterize %> metadata-block__label-value metadata-block__label-value--ursus">
<%= doc_presenter.field_value field %>
</dd>
<% end %>
<% end %>
</dt>

<% keyword.select { |field_name, _field| field_name == "subject_tesim" || field_name == "subject_topic_tesim" }
.each_with_index do |(field_name, field), i| %>
<!-- KEY -->
<dt class="blacklight-subjects metadata-block__label-key">
<%= 'Subjects' if i.zero? %>
</dt>
<!-- VALUE -->
<dd class="blacklight-<%= field_name.parameterize %> metadata-block__label-value metadata-block__label-value--ursus">
<%= doc_presenter.field_value field %>
</dd>
<% end %>
<% end %>
</dl>
<hr class='divider divider--ursus'>
Expand Down

0 comments on commit 5335d6a

Please sign in to comment.