All,

To follow up on this thread, and in case it helps anyone else, here's an 
example configuraiton that I just tested since I needed to implement a similar 
configuration and ran into a few issues the first time around:


AppConfig[:pui_hide][:accession_badge] = true

AppConfig[:pui_hide][:classification_badge] = true


AppConfig[:pui_repos]['repo1'] = {}

AppConfig[:pui_repos]['repo2'] = {}

AppConfig[:pui_repos]['repo1'][:hide] = {:accession_badge => false}

AppConfig[:pui_repos]['repo2'][:hide] = {:classification_badge => false}


In this example, I've replaced our actual repository codes with "repo1" and 
"repo2" (and, as Bobbi mentions earlier, if the codes are actually something 
like "Repo1", you'd still need to downcast that to "repo1" in the config file). 
 Let's imagine that we also have repo3, repo4, and repo5 in this system.


Assuming all that, then those first two lines will hide the accession and 
classification badges on all 5 repository homepages in the PUI.


The next 4 lines will set things up so that the repository pages for repo1 and 
repo2 will behave a bitt differently than repos 3-5.  In this case, repo1 will 
include the accession badge, but it will not have the classification badge.  
And repo2 will include the classification badge, but it not include the 
accession badge.


John, hopefully everything worked out for you, but please let us know if not.


Mark


________________________________
From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
<archivesspace_users_group-boun...@lyralists.lyrasis.org> on behalf of Fox, 
Bobbi <bobbi_...@harvard.edu>
Sent: Thursday, February 22, 2018 3:33 PM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] Configuration question for 2.3.0


Hi,

Replace {repo_code}  with the lowercased version of your repository code (for 
example, for us, the repository code for Harvard University Archives is ‘hua’)

You have to do it as a hash



AppConfig[:pui_repos] = {'psa' => { :requests_permitted_for_types => 
[:archival_object]} }



Among other things, this now creates an addressable (i.e.: no undefined method 
messages)



AppConfig[:pui_repos][‘psa’]  that you can use for subsequent  things like 
hiding badges, e.g.:

AppConfig[:pui_repos][‘psa’] [‘hide’] = {:subject_badge => false, :agent_badge 
=> false}



HTH,

Bobbi



From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
[mailto:archivesspace_users_group-boun...@lyralists.lyrasis.org] On Behalf Of 
Eiszner, John W
Sent: Thursday, February 22, 2018 3:19 PM
To: archivesspace_users_group@lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] Configuration question for 2.3.0



What is the proper syntax for modifying the [:pui_repos] config statements?  
The example at 
http://archivesspace.github.io/archivesspace/user/configuring-archivesspace/<https://urldefense.proofpoint.com/v2/url?u=http-3A__archivesspace.github.io_archivesspace_user_configuring-2Darchivesspace_&d=DwMFAg&c=WO-RGvefibhHBZq3fL85hQ&r=5xWUzLrZrVLeTqs3CDoeRpPtLv1fRM04CCu4TDULrSY&m=c4y3WPxOAGVnu6okKmo2EqY0v2Y5nwTIlANMleiZ27U&s=t4kjldein2OBUkJWraW5xWJVPN8NRoVXrqxGgQjnpUQ&e=>
 uses an “imaginary repository code of ‘foo’”, but no actual usage of “foo” is 
shown.



AppConfig[:pui_repos][{repo_code}][:requests_permitted_for_types] = 
[:archival_object] #      ...gives the syntax error “unexpected tRCURLY”



AppConfig[:pui_repos][‘PSA’][:requests_permitted_for_types] = 
[:archival_object] #      ...gives the syntax error “NoMethodError: undefined 
method `[]=' for nil:NilClass”    (Note: I am not a Ruby expert.)



It appears that the string “{repo_code}” must be replaced by a local repository 
code.  We have 4 repositories in our installation:  General, GA, PSA and UA.



# Repository-specific examples.  We are using the imaginary repository code of 
'foo'.  Note the lower-case

AppConfig[:pui_repos] = {}

# Example:

# AppConfig[:pui_repos][{repo_code}] = {}

# AppConfig[:pui_repos][{repo_code}][: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][{repo_code}][:requests_permitted_for_containers_only] = 
true # for a particular repository ,disable request

# AppConfig[:pui_repos][{repo_code}][:request_email] = {email address} # the 
email address to send any repository requests

# AppConfig[:pui_repos][{repo_code}][:hide] = {}

# AppConfig[:pui_repos][{repo_code}][:hide][:counts] = true



John Eiszner, Lead Analyst/Programmer

University Library

Indiana University-Purdue University Indianapolis (IUPUI)

jeisz...@iupui.edu<mailto:jeisz...@iupui.edu>  317.274.0751


_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

Reply via email to