emory-libraries / aspace

0 stars 0 forks source link

Customize repository pages #70

Closed erussey closed 1 year ago

erussey commented 1 year ago

Customize repository landing pages (the view of an individual repository). These pages are located by clicking on an individual repository from this page: https://emory-dev.lyrasistechnology.org/repositories

-Apply the search bar styling from the homepage with a header "Search this repository".

CB987 commented 1 year ago

Based on the following in the /common/config/config-defaults.rb, it looks like all of the ones showing are all of the ones that possible/available:

# can be overridden at repository level below (e.g.:  AppConfig[:pui_repos][{repo_code}][:hide][:counts] = true
AppConfig[:pui_hide][:resource_badge] = false
AppConfig[:pui_hide][:record_badge] = true # hide by default
AppConfig[:pui_hide][:digital_object_badge] = false
AppConfig[:pui_hide][:accession_badge] = false
AppConfig[:pui_hide][:subject_badge] = false
AppConfig[:pui_hide][:agent_badge] = false
AppConfig[:pui_hide][:classification_badge] = false
AppConfig[:pui_hide][:counts] = false

@erussey does that give you the info you need for the first bullet?

CB987 commented 1 year ago

# Repository-specific examples.  Replace {repo_code} with your repository code, i.e. 'foo' - note the lower-case
AppConfig[:pui_repos] = {}
# Example:
# AppConfig[:pui_repos]['foo'] = {}
# AppConfig[:pui_repos]['foo'][:requests_permitted_for_types] = [:resource, :archival_object, :accession, :digital_object, :digital_object_component] # for a particular repository, only enable requests for certain record types (Note this configuration will override AppConfig[:pui_requests_permitted_for_types] for the repository)
# AppConfig[:pui_repos]['foo'][:requests_permitted_for_containers_only] = true # for a particular repository ,disable request
# AppConfig[:pui_repos]['foo'][:request_email] = {email address} # the email address to send any repository requests
# AppConfig[:pui_repos]['foo'][:hide] = {}
# AppConfig[:pui_repos]['foo'][:hide][:counts] = true
erussey commented 1 year ago

We want to globally (for all repositories) suppress: classification, accession, record badges.

CB987 commented 1 year ago

It;s really weird and I don't know how it happened but locally the badge titles have already been changed. In the dev site they are not, but you can see it in Ayoub's screenshot in the spike ticket. I don't see it anywhere in our aspace-static-plugins repo so... somebody at ASpace changed it?

CB987 commented 1 year ago

Screen Shot 2023-02-09 at 5.19.45 PM.png badges suppressed

CB987 commented 1 year ago

Suppressing the badges is done by including these two lines:

AppConfig[:pui_hide][:classification_badge] = true
AppConfig[:pui_hide][:accession_badge] = true

in the config/config.rb, which is in the archivesspace repo, not our repo. This change can be made on our next deploy, I think.

CB987 commented 1 year ago

Screen Shot 2023-02-10 at 11.17.22 AM.png search this repository. thank you ayoub for sharing rails wisdom! made our own copies of the show.html.erb and the search.html.erb to override, which actually increased accuracy as they had different functions but were not previously differentiated by as.

CB987 commented 1 year ago

PR#13

erussey commented 1 year ago

@CB987 : Did we resolve the confusion about the text changes above? Is that configuration now within our own repo so we don't override it?

CB987 commented 1 year ago

@erussey I posted in Basecamp and they just responded that they would make the changes. I didn't dig any deeper at the time, but I can follow up and see if they will offer further info?

erussey commented 1 year ago

@CB987 : realizing that there's one more badge to suppress. I realize it won't show in this deploy, but we need to catch it. It's noted above, but was missed. We also need to suppress the record_badge on the repository pages.

CB987 commented 1 year ago

Something else is going on. According to the common/config/config.rb, the record badge should be suppressed by default. Since it didn't work, on our second deploy I explicitly repressed it, but it's still showing up.

CB987 commented 1 year ago

I asked on basecamp about the badge titles and suppression. Waiting to hear back. The removal of theme.css by lyrasis fixed the search title not showing up.

CB987 commented 1 year ago

@erussey I think this is ready to check off now. I got info about the badge titles and they have hidden the records badge as well.