Bug 10941 - MARC21 documentation links while adding an authority
Summary: MARC21 documentation links while adding an authority
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-24 15:38 UTC by Pablo AB
Modified: 2018-02-14 19:01 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo AB 2013-09-24 15:38:22 UTC
While adding authorities (authorities.pl), we don't have the "?" now available on cataloging frameworks. A similar strategy might be used.

Related bugs: #10940, #5546.
Comment 1 Stefano Bargioni 2013-12-06 10:15:47 UTC
A temporary solution through JQuery can be:

var tags = $('div[id^=div_indicator_tag_]');
for (var i=0; i < tags.length; i++) {
	var t = $(tags[i]);
	var tag_name = t.attr('id').replace(/div_indicator_tag_/,'').substr(0,3);
	t.find('span:first').after('<a href="#" class="marcdocs" title="LC MARC auth specifications" onclick="MARC21FieldAuth(\''+tag_name+'\'); return false"> ?</a>');
}
$('.marcdocs').css({'color':'blue','font-weight':'bold'});
Comment 2 Stefano Bargioni 2013-12-06 10:17:51 UTC
(In reply to Stefano Bargioni from comment #1)
> A temporary solution through JQuery can be:
> 
> var tags = $('div[id^=div_indicator_tag_]');
> for (var i=0; i < tags.length; i++) {
> 	var t = $(tags[i]);
> 	var tag_name = t.attr('id').replace(/div_indicator_tag_/,'').substr(0,3);
> 	t.find('span:first').after('<a href="#" class="marcdocs" title="LC MARC
> auth specifications" onclick="MARC21FieldAuth(\''+tag_name+'\'); return
> false"> ?</a>');
> }
> $('.marcdocs').css({'color':'blue','font-weight':'bold'});

function MARC21FieldAuth(tag_name) {
	if (tag_name == '000') {
		window.open("http://www.loc.gov/marc/authority/adleader.html");
	}
	else if (tag_name.search('09') == 0) {
		window.open("http://www.loc.gov/marc/authority/ad09x.html");
	}
	else {
		window.open("http://www.loc.gov/marc/authority/ad"+("000"+tag_name).slice(-3) + ".html");
	}
}
Comment 3 Pablo AB 2015-04-22 17:04:36 UTC
Added to JQuery Library on wiki: http://wiki.koha-community.org/wiki/JQuery_Library#MARC21_documentation_links_while_adding_an_authority but in status=incomplete because it shows also on bibliographic frameworks.
A lot of this JQuery enhancement should be added to Koha...
Comment 4 Stefano Bargioni 2015-05-11 14:24:01 UTC
(In reply to Pablo AB from comment #3)
> Added to JQuery Library on wiki:
> http://wiki.koha-community.org/wiki/
> JQuery_Library#MARC21_documentation_links_while_adding_an_authority but in
> status=incomplete because it shows also on bibliographic frameworks.
> A lot of this JQuery enhancement should be added to Koha...

Thx Pablo to adding it to the jQuery Library.
I wrapped the code into an IF statement to apply it only in case of auth frameworks.