Skip to content

Commit

Permalink
Add additional 520 fields to record description tab
Browse files Browse the repository at this point in the history
  • Loading branch information
meganschanz committed Oct 10, 2024
1 parent adebae4 commit e7c6dbe
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
2 changes: 2 additions & 0 deletions languages/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ confirm_storage_retrieval_request_cancel_selected_text = "Do you wish to cancel
Connecting of library cards is not supported = "Connecting of library cards is not supported"
consortial_vufind_recommend_heading = "Borrow from a Partner Library"
consortial_vufind_recommend_intro_html = '<a href="%%url%%" target="_blank">%%result_count%% result(s)</a> found at partner libraries.'
Content Advice = "Content Advice"
Contents = "Contents"
Contributing Source = "Contributing Source"
Contributors = "Contributors"
Expand Down Expand Up @@ -1249,6 +1250,7 @@ results_citing_title_search_link = "Items that cite this one"
Resumption Token = "Resumption Token"
Return Date = "Return Date"
Review by = "Review by"
Review Notes = "Review Notes"
Reviews = "Reviews"
Save = "Save"
Save Comment = "Save Comment"
Expand Down
2 changes: 2 additions & 0 deletions languages/fr.ini
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ confirm_renew_selected_text = "Voulez-vous prolonger les emprunts sélectionnés
confirm_storage_retrieval_request_cancel_all_text = "Voulez-vous annuler toutes vos demandes de communication en magasin ?"
confirm_storage_retrieval_request_cancel_selected_text = "Voulez-vous annuler les demandes de communication en magasin sélectionnées ?"
Connecting of library cards is not supported = "Il n'est pas possible de connecter une carte de bibliothèque."
Content Advice = "Note de Contenu"
Contents = "Contenu"
Contributing Source = "Sources"
Contributors = "autres auteurs"
Expand Down Expand Up @@ -1166,6 +1167,7 @@ Results per page = "Résultats par page"
Resumption Token = "Jeton (Resumption Token)"
Return Date = "Date de retour"
Review by = "Recension de"
Review Notes = "Notes de Révision"
Reviews = "Recensions"
Save = "Sauvegarder"
Save Comment = "Sauvegarder le commentaire"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1286,4 +1286,24 @@ public function getAbstractNotes()
{
return $this->getMarcFieldWithInd('520', range('a', 'z'), [[1 => ['3']]]);
}

/**
* Get the review notes
*
* @return array Note fields from the MARC record
*/
public function getReviewNotes()
{
return $this->getMarcFieldWithInd('520', range('a', 'z'), [[1 => ['1']]]);
}

/**
* Get the content advice notes
*
* @return array Note fields from the MARC record
*/
public function getContentAdviceNotes()
{
return $this->getMarcFieldWithInd('520', range('a', 'z'), [[1 => ['4']]]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ public function getDefaultDescriptionSpecs()
$spec = new RecordDataFormatter\SpecBuilder();
$spec->setTemplateLine('Summary', true, 'data-summary.phtml');
$spec->setLine('Abstract', 'getAbstractNotes');
$spec->setLine('Review Notes', 'getReviewNotes');
$spec->setLine('Content Advice', 'getContentAdviceNotes');
$spec->setLine('Published', 'getDateSpan');
$spec->setLine('Item Description', 'getGeneralNotes');
$spec->setLine('Physical Description', 'getPhysicalDescriptions');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,36 @@ public function testGetAbstractNotes(): void
);
}

/**
* Test calling getReviewtNotes to get expected marc data
*
* @return void
*/
public function testGetReviewNotes(): void
{
$obj = $this->getMockDriverFromFixture('marc/marctraits.xml');

$this->assertEquals(
['Review Note. Expanded.'],
$obj->getReviewNotes()
);
}

/**
* Test calling getContentAdviceNotes to get expected marc data
*
* @return void
*/
public function testGetContentAdviceNotes(): void
{
$obj = $this->getMockDriverFromFixture('marc/marctraits.xml');

$this->assertEquals(
['Content Advice. Expanded.'],
$obj->getContentAdviceNotes()
);
}

/**
* Test calling getLocationOfArchivalMaterialsNotes to get expected marc data
*
Expand Down

0 comments on commit e7c6dbe

Please sign in to comment.