MediaWiki:MarcEditorDynamicLinks.js e Form:BibRecord: mudanças entre as páginas
(Diferenças entre páginas)
Ir para navegação
Ir para pesquisar
Sem resumo de edição |
Sem resumo de edição |
||
Linha 1: | Linha 1: | ||
<noinclude> |
|||
// Author: @vitorsilverio |
|||
// Author: @jaideraf |
|||
/*jshint esversion: 6 */ |
|||
function main() { |
|||
let tag = ''; |
|||
let tagFromDropdown = ''; |
|||
function createMarcFieldHelpLink() { |
|||
const tagInputs = document.body.querySelectorAll('.tagInput'); |
|||
tagInputs.forEach((elem) => { |
|||
const marcFieldHelpLink = document.createElement('a'); |
|||
marcFieldHelpLink.setAttribute('target', '_blank'); |
|||
marcFieldHelpLink.innerText = '(?)'; |
|||
const marcFieldHelpLinkClass = elem.closest('table') |
|||
.querySelector('.marcFieldHelpLink'); |
|||
marcFieldHelpLinkClass.innerHTML = ""; |
|||
marcFieldHelpLinkClass.appendChild(marcFieldHelpLink); |
|||
// find the tag value from the chosen dropdown |
|||
marcFieldHelpLinkClass.addEventListener('mouseover', (event) => { |
|||
tagFromDropdown = event.target.closest('.instanceMain') |
|||
.querySelector('.oo-ui-inputWidget-input') |
|||
.getAttribute('title') || '00x'; |
|||
tagFromDropdown = tagFromDropdown.substring(0, 3); |
|||
marcFieldHelpLink.setAttribute( |
|||
'title', |
|||
`Documentação do campo ${tagFromDropdown}` |
|||
); |
|||
// build the URL |
|||
if (window.location.href.match(/A\d{6}/) |
|||
|| window.location.href.match(/AutRecord/)) { |
|||
marcFieldHelpLink.setAttribute( |
|||
'href', |
|||
`http://marc.febab.org/a${tagFromDropdown}` |
|||
); |
|||
} else { |
|||
marcFieldHelpLink.setAttribute( |
|||
'href', |
|||
`https://www.loc.gov/marc/bibliographic/bd${tagFromDropdown}.html` |
|||
); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
function createAuthorityLinks() { |
|||
const inputs = document.body.querySelectorAll('.instanceMain div table .oo-ui-inputWidget-input'); |
|||
inputs.forEach((elem) => { |
|||
const authorityLink = document.createElement('a'); |
|||
authorityLink.setAttribute('title', 'Abre uma nova aba para criar ou editar um registro de autoridade'); |
|||
authorityLink.setAttribute('target', '_blank'); |
|||
authorityLink.innerText = 'Criar registro de autoridade'; |
|||
authorityLink.style.display = 'none'; |
|||
const createAuthorityLink = elem.closest('table') |
|||
.querySelector('.createAuthorityLink'); |
|||
createAuthorityLink.innerHTML = ""; |
|||
createAuthorityLink.appendChild(authorityLink); |
|||
const pattern1 = /\$0\sA\d{6}/; |
|||
const pattern2 = /\$0\s\(BN\)\d{9}/; |
|||
elem.addEventListener('focusout', () => { |
|||
// if already recorded |
|||
if (pattern1.test(elem.value)) { |
|||
// build the URL for Wikincat aut record edit |
|||
authorityLink.innerText = 'Editar autoridade'; |
|||
authorityLink.setAttribute( |
|||
'href', |
|||
`/wiki/Special:FormEdit/AutRecord/Autoridade:${ |
|||
elem.value.match(/A\d{6}/)}` |
|||
); |
|||
} else if (pattern2.test(elem.value)) { |
|||
// build the URL for BN aut record view |
|||
authorityLink.innerText = 'Ver registro de autoridade na BN'; |
|||
authorityLink.setAttribute( |
|||
'href', |
|||
`http://acervo.bn.gov.br/sophia_web/autoridade/detalhe/${ |
|||
elem.value.match(/\d{9}/)}` |
|||
); |
|||
} else { |
|||
// find the tag value from the chosen dropdown |
|||
tagFromDropdown = elem.closest('.instanceMain') |
|||
.querySelector('.oo-ui-inputWidget-input') |
|||
.getAttribute('title') || '00x'; |
|||
tagFromDropdown = tagFromDropdown.substring(0, 3); |
|||
// find the tag value from checked radio button |
|||
const tagFromRadio = elem.closest('.instanceMain') |
|||
.querySelector('input[origname=\'Field[authorityType]\']:checked') |
|||
.value; |
|||
const authorityTypes = { |
|||
'Pessoa': '100', |
|||
'Entidade coletiva': '110', |
|||
'Evento': '111', |
|||
'Título uniforme': '130', |
|||
'Tópico': '150', |
|||
'Local': '151' |
|||
}; |
|||
if (tagFromRadio in authorityTypes) { |
|||
tag = authorityTypes[tagFromRadio]; |
|||
} |
|||
// declare the indicators default values |
|||
let ind1 = elem.closest('.instanceMain') |
|||
.querySelector('select[origname=\'Field[ind1]\'] option:checked') |
|||
.value; |
|||
let ind2 = elem.closest('.instanceMain') |
|||
.querySelector('select[origname=\'Field[ind2]\'] option:checked') |
|||
.value; |
|||
// declare the 008 field default values |
|||
let directOrIndirectGeogSubdiv = ''; // 06 |
|||
let kindOfRecord = ''; // 09 |
|||
let descriptiveCatalogingRules = 'c'; // 10 |
|||
let subjectHeadingSystem = 'n'; // 11 |
|||
let typeOfSeries = 'n'; // 12 |
|||
let numberedOrUnnumberedSeries = 'n'; // 13 |
|||
let headingUseMainOrAddedEntry = 'a'; // 14 |
|||
let headingUseSubjectAddedEntry = 'a'; // 15 |
|||
let headingUseSeriesAddedEntry = 'b'; // 16 |
|||
let typeOfSubjectSubdivision = 'n'; // 17 |
|||
let undifferentiatedPersonalName = 'n'; // 32 |
|||
let levelOfEstablishment = 'a'; // 33 |
|||
// set the 008 field and indicadors specific values |
|||
if (tag === '100') { |
|||
undifferentiatedPersonalName = 'a'; |
|||
ind2 = ''; |
|||
} |
|||
if (tag === '110') { |
|||
// in case of autocomplete of 260 |
|||
if (tagFromDropdown === '260') { |
|||
directOrIndirectGeogSubdiv = 'n'; |
|||
kindOfRecord = 'b'; |
|||
headingUseMainOrAddedEntry = 'b'; |
|||
headingUseSubjectAddedEntry = 'b'; |
|||
levelOfEstablishment = 'n'; |
|||
ind1 = '1'; |
|||
} |
|||
ind2 = ''; |
|||
} |
|||
if (tag === '111') { |
|||
ind1 = '2'; |
|||
ind2 = ''; |
|||
} |
|||
if (tag === '130') { |
|||
typeOfSeries = 'a'; |
|||
numberedOrUnnumberedSeries = 'b'; |
|||
headingUseSeriesAddedEntry = 'a'; |
|||
if (tagFromDropdown === '130' |
|||
|| tagFromDropdown === '630' |
|||
|| tagFromDropdown === '730') { |
|||
ind2 = ind1; // an inverted value happens here, see and |
|||
ind1 = ''; // compare bib. and auth. 130 MARC definitions |
|||
} |
|||
ind1 = ''; |
|||
} |
|||
if (tag === '150' || tag === '151') { |
|||
descriptiveCatalogingRules = 'n'; |
|||
subjectHeadingSystem = 'z'; |
|||
headingUseMainOrAddedEntry = 'b'; |
|||
ind1 = ''; // 150 and 151 indicators must be empty in |
|||
ind2 = ''; // authority MARC records |
|||
if (tag === '151') { |
|||
typeOfSubjectSubdivision = 'd'; |
|||
} |
|||
} |
|||
// build the URL |
|||
const autRecordParams = { |
|||
AutRecord: { |
|||
directOrIndirectGeogSubdiv, |
|||
kindOfRecord, |
|||
descriptiveCatalogingRules, |
|||
subjectHeadingSystem, |
|||
typeOfSeries, |
|||
numberedOrUnnumberedSeries, |
|||
headingUseMainOrAddedEntry, |
|||
headingUseSubjectAddedEntry, |
|||
headingUseSeriesAddedEntry, |
|||
typeOfSubjectSubdivision, |
|||
undifferentiatedPersonalName, |
|||
levelOfEstablishment |
|||
}, |
|||
Field: { |
|||
'1': { |
|||
tag: '040', |
|||
data: '$a BR-FlWIK $b por $c BR-FlWIK $d BR-FlUSC' |
|||
}, |
|||
'2': { |
|||
tag, |
|||
ind1, |
|||
ind2, |
|||
data: elem.value |
|||
}, |
|||
'3': { |
|||
tag: '670', |
|||
data: '$a ' |
|||
} |
|||
} |
|||
}; |
|||
const url = new URL(`${window.location.origin}/wiki/Special:FormEdit/AutRecord`); |
|||
// function to transform a 3rd level object to URL query strings |
|||
const makeUrlParams = (obj) => { |
|||
for (const [key, value] of Object.entries(obj)) { |
|||
if (typeof value === 'object') { |
|||
for (const [key2, value2] of Object.entries(value)) { |
|||
if (typeof value2 === 'object') { |
|||
for (const [key3, value3] of Object.entries(value2)) { |
|||
url.searchParams.set(`${key}[${key2}][${key3}]`, value3); |
|||
} |
|||
} else { |
|||
url.searchParams.set(`${key}[${key2}]`, value2); |
|||
} |
|||
} |
|||
} else { |
|||
url.searchParams.set(key, value); |
|||
} |
|||
} |
|||
}; |
|||
makeUrlParams(autRecordParams); |
|||
authorityLink.innerText = 'Criar registro de autoridade'; |
|||
authorityLink.setAttribute('href', url.pathname + url.search); |
|||
} |
|||
authorityLink.style.display = ''; |
|||
}); |
|||
}); |
|||
} |
|||
function rmCarriageReturn() { |
|||
const textareas = document.body.querySelectorAll('textarea'); |
|||
textareas.forEach((textarea) => { |
|||
const element = textarea; |
|||
element.value = element.value.replace(' ', ''); |
|||
}); |
|||
} |
|||
function rmHtmlTags() { |
|||
const textareas = document.body.querySelectorAll('textarea'); |
|||
textareas.forEach((textarea) => { |
|||
const element = textarea; |
|||
element.value = element.value.replace(/<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g, ''); |
|||
}); |
|||
} |
|||
function rmTxtFromHiddenFields() { |
|||
const spans = document.body.querySelectorAll('span.hiddenByPF'); |
|||
spans.forEach((elem) => { |
|||
elem.querySelectorAll('.input.oo-ui-inputWidget-input').forEach((input) => { |
|||
const element = input; |
|||
element.value = ''; |
|||
}); |
|||
elem.querySelectorAll('textarea').forEach((input) => { |
|||
const element = input; |
|||
element.value = ''; |
|||
}); |
|||
}); |
|||
} |
|||
function normalizeInput() { |
|||
const instanceMains = document.body.querySelectorAll('.instanceMain div table'); |
|||
instanceMains.forEach((instanceMain) => { |
|||
instanceMain.querySelectorAll('.oo-ui-inputWidget-input').forEach((input) => { |
|||
const normalizedInput = input; |
|||
normalizedInput.value = normalizedInput.value |
|||
// "$a Bar \n$b Baz" > " $a Bar $b Baz" |
|||
.replace(/\s*(\$[a-z0-8])\s*/g, ' $1 ') |
|||
// "$a Bar\nFoo" > "$a Bar Foo" ou "$a Bar Foo" > "$a Bar Foo" |
|||
.replace(/\n|\s\s+|\t/g, ' ') |
|||
// replace "|" by "%7C" (Ex.: http://viaf.org/processed/WKP|Q2484404) |
|||
.replace('|', '%7C'); |
|||
}); |
|||
instanceMain.querySelectorAll('textarea').forEach((textarea) => { |
|||
const normalizedInput = textarea; |
|||
textarea.value = normalizedInput.value |
|||
// "$a Bar \n$b Baz" > " $a Bar $b Baz" |
|||
.replace(/\s*(\$[a-z0-8])\s*/g, ' $1 ') |
|||
// "$a Bar\nFoo" > "$a Bar Foo" ou "$a Bar Foo" > "$a Bar Foo" |
|||
.replace(/\n|\s\s+|\t/g, ' ') |
|||
// replace "|" by "%7C" (Ex.: http://viaf.org/processed/WKP|Q2484404) |
|||
.replace('|', '%7C'); |
|||
}); |
|||
}); |
|||
} |
|||
// calls main functions |
|||
createMarcFieldHelpLink(); |
|||
createAuthorityLinks(); |
|||
rmCarriageReturn(); |
|||
rmHtmlTags(); |
|||
// Como instâncias do formulário são criadas pelo botão "Adicionar campo", |
|||
// é necessário observar o DOM a partir da classe ".multipleTemplateList". |
|||
// Toda vez que o DOM é alterado (mais especificamente, quando uma nova |
|||
// child de ".multipleTemplateList" é criada), as funções |
|||
// createMarcFieldHelpLink() e createAuthorityLinks() são novamente chamadas. |
|||
// https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver |
|||
// create an observer instance |
|||
const observer = new MutationObserver((mutations) => { |
|||
mutations.forEach((mutation) => { |
|||
const newNodes = mutation.addedNodes; // DOM NodeList |
|||
if (newNodes.length !== 0) { // if there are new nodes added |
|||
createMarcFieldHelpLink(); |
|||
createAuthorityLinks(); |
|||
} |
|||
}); |
|||
}); |
|||
// select the target node |
|||
const target = document.querySelector('.multipleTemplateList'); |
|||
// configuration of the observer |
|||
const config = { |
|||
childList: true, |
|||
attributes: false, |
|||
subtree: false, |
|||
}; |
|||
// pass in the target node, as well as the observer options |
|||
observer.observe(target, config); |
|||
{{#formlink:form=BibRecord|link text=Criar registro bibliográfico|link type=button|query string=Field[1][tag]=020&Field[1][data]=$a&Field[2][tag]=040&Field[2][data]=$a BR-FlWIK $b por $c BR-FlWIK $d BR-FlUSC&Field[3][tag]=080&Field[3][data]=$a&Field[4][tag]=090&Field[4][data]=$a $b}} |
|||
// when clicking save... |
|||
const saveBtn = document.body.querySelector('#wpSave'); |
|||
saveBtn.addEventListener('click', () => { |
|||
observer.disconnect(); |
|||
rmTxtFromHiddenFields(); |
|||
rmCarriageReturn(); |
|||
rmHtmlTags(); |
|||
normalizeInput(); |
|||
}); |
|||
// when clicking adding field... |
|||
const addBtn = document.body.querySelector('.multipleTemplateAdder'); |
|||
addBtn.addEventListener('click', () => { |
|||
createMarcFieldHelpLink(); |
|||
}); |
|||
} |
|||
if (document.readyState === 'complete' || (document.readyState !== 'loading')) { |
|||
main(); |
|||
} else { |
|||
document.addEventListener('DOMContentLoaded', main); |
|||
} |
|||
</noinclude><includeonly> |
|||
// for no obvious reason to me, the first call to the "main" function is not |
|||
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div> |
|||
// occurring, so wait 3 seconds and call it anyway. |
|||
{{{info|page name=B<unique number;start=000001>|create title=Criar|edit title=Editar}}} |
|||
setTimeout(main, 3000); |
|||
{{{for template|BibRecord}}} <!-- Date entered on file precisa ficar fora da area collapsible para funcionar --> {{{field|dateEnteredOnFile|input type=text|default={{#timel:ymd}}|hidden}}} |
|||
<html> |
|||
<div class="wrap-collapsible"> |
|||
<input id="collapsible" class="toggle" type="checkbox"> |
|||
<label for="collapsible" class="lbl-toggle" tabindex="1"></html>Opções do '''Tipo de obra''' e do '''Campo Líder'''<span style="float: right;">{{#info:[http://www.dbd.puc-rio.br/MARC21/lider.html ⇾ Documentação do Líder]<br> |
|||
[https://docs.fabricioassumpcao.com/marcbrowser/ ⇾ '''marc'''browser]}}<html></span></label> |
|||
<div class="collapsible-content"> |
|||
<div class="content-inner"></html> |
|||
{| class="wikincatTable" |
|||
|- |
|||
| Tipo de obra: || {{{field|itemType|mandatory|input type=combobox|size=50|delimiter=,|values=01,02,03,04,05,06,07,08|default=01|mapping template=BibRecord/itemType}}} |
|||
|- |
|||
| Status do registro (05): || {{{field|recordStatus|input type=combobox|size=50|maxlength=1|delimiter=,|values=a,c,d,n,p|default=n|mapping template=BibRecord/leader/recordStatus}}} |
|||
|- |
|||
| Tipo de registro (06): || {{{field|typeOfRecord|input type=combobox|size=50|maxlength=1|delimiter=,|values=a,c,d,e,f,g,i,j,k,m,o,p,r,t|default=a|mapping template=BibRecord/leader/typeOfRecord}}} |
|||
|- |
|||
| Nível bibliográfico (07): || {{{field|bibliographicLevel|input type=combobox|size=50|maxlength=1|delimiter=,|values=a,b,c,d,i,m,s|default=m|mapping template=BibRecord/leader/bibliographicLevel}}} |
|||
|- |
|||
| Nível de codificação (17): || {{{field|encodingLevel|input type=combobox|size=50|maxlength=1|delimiter=,|values= ,1,2,3,4,5,7,8,u,z|default= |mapping template=BibRecord/leader/encodingLevel}}} |
|||
|- |
|||
| Forma da catalogação descritiva (18): || {{{field|descriptiveCatalogingForm|input type=combobox|size=50|maxlength=1|delimiter=,|values= ,a,c,i,n,u|default=a|mapping template=BibRecord/leader/descriptiveCatalogingForm}}} |
|||
|- |
|||
| Nível de registro de recurso multiparte (19): || {{{field|multipartResourceRecordLevel|input type=combobox|size=50|maxlength=1|delimiter=,|values= ,a,b,c|default= |mapping template=BibRecord/leader/multipartResourceRecordLevel}}} |
|||
|} {{{field|controlField006|input type=text|hidden}}} {{{field|controlField007|input type=text|hidden}}}<html> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="wrap-collapsible"> |
|||
<input id="collapsible2" class="toggle" type="checkbox"> |
|||
<label for="collapsible2" class="lbl-toggle" tabindex="8"></html>Opções do '''Campo 008'''<span style="float: right;">{{#info: [http://www.dbd.puc-rio.br/MARC21/tamanho.html Documentação do campo 008]<br/>[http://www.dbd.puc-rio.br/MARC21/t_todos.html ⇾ Para todos os materiais]<br/>[http://www.dbd.puc-rio.br/MARC21/t_livro.html ⇾ Para livros]}}<html></span></label> |
|||
<div class="collapsible-content"> |
|||
<div class="content-inner"></html> |
|||
{| class="wikincatTable" |
|||
|- |
|||
| Tipo de data (06): || {{{field|typeOfDate|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values=b,c,d,e,i,k,m,n,p,q,r,s,t,u|default=s|mapping template=BibRecord/field008/typeOfDate}}} |
|||
|- |
|||
| Primeira e segunda datas (07-10) (11-14): || {{{field|date1|input type=text|size=4|maxlength=4}}} {{{field|date2|input type=text|size=4|maxlength=4}}} |
|||
|- |
|||
| Local de publicação (15-17): || {{{field|placeOfPublication|input type=text|size=4|maxlength=3}}} <span style="color: gray;">spb, rjb, scb, dfb, xxu, xxk</span> <span style="float: right;">{{#info: [http://www.loc.gov/marc/countries/countries_regional.html Lista de códigos de locais de publicação]}}</span> |
|||
|- |
|||
| Ilustrações (18-21): || {{{field|illustrations|input type=combobox|existing values only|size=50|maxlength=4|delimiter=,|values= ,a,b,c,d,e,f,g,h,i,j,k,l,m,o,p|default= |mapping template=BibRecord/field008/illustrations}}} |
|||
|- |
|||
| Público alvo (22): || {{{field|targetAudience|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,a,b,c,d,e,f,g,j|default= |mapping template=BibRecord/field008/targetAudience}}} |
|||
|- |
|||
| Forma do item (23): || {{{field|formOfItem|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,a,b,c,d,f,o,q,r,s|default=r|mapping template=BibRecord/field008/formOfItem}}} |
|||
|- |
|||
| Natureza do conteúdo (24-27): || {{{field|natureOfContents|input type=combobox|existing values only|size=50|maxlength=4|delimiter=,|values= ,a,b,c,d,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,y,z,2,5,6|default= |mapping template=BibRecord/field008/natureOfContents}}} |
|||
|- |
|||
| Publicação governamental (28): || {{{field|governmentPublication|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,a,c,f,i,l,m,o,s,u,z|default= |mapping template=BibRecord/field008/governmentPublication}}} |
|||
|- |
|||
| Publicação de conferência (29): || {{{field|conferencePublication|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,1|default= |mapping template=BibRecord/field008/conferencePublication}}} |
|||
|- |
|||
| Coletânea de homenagem (30): || {{{field|festschrift|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,1|default= |mapping template=BibRecord/field008/festschrift}}} |
|||
|- |
|||
| Índice (31): || {{{field|index|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,1|default= |mapping template=BibRecord/field008/index}}} |
|||
|- |
|||
| Forma literária (33): || {{{field|literaryForm|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,1,d,e,f,h,i,j,m,p,s,u|default= |mapping template=BibRecord/field008/literaryForm}}} |
|||
|- |
|||
| Biografia (34): || {{{field|biography|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,a,b,c,d|default= |mapping template=BibRecord/field008/biography}}} |
|||
|- |
|||
| Idioma (35-37): || {{{field|language|input type=combobox|maxlength=3|values from property=Has language code}}} <span style="color:gray;">por, eng, spa, fre, ger, ita</span> <span style="float: right;">{{#info:[http://www.loc.gov/marc/languages/language_name.html Lista de códigos de idiomas]}}</span> |
|||
|- |
|||
| Registro modificado (38): || {{{field|modifiedRecord|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,s,d,x,r,o|default= |mapping template=BibRecord/field008/modifiedRecord}}} |
|||
|- |
|||
| Fonte da catalogação (39): || {{{field|catalogingSource|input type=combobox|existing values only|size=50|maxlength=1|delimiter=,|values= ,c,d,u|default=d|mapping template=BibRecord/field008/catalogingSource}}} |
|||
|}<html> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</html> |
|||
{{{end template}}} |
|||
{{{for template|Field|multiple|add button text=Adicionar campo|minimum instances=1}}} |
|||
{| class="formtable" |
|||
! Campo: <span class="marcFieldHelpLink"></span> |
|||
| {{{field|tag|mandatory|input type=combobox|size=105|delimiter=,|values=010,020,022,035,040,041,043,045,080,082,090,100,110,111,130,240,242,245,246,250,260,264,300,336,337,338,347,362,490,500,501,502,504,505,506,508,510,511,520,521,522,525,526,530,533,534,536,541,545,546,562,588,590,600,610,611,630,648,650,651,700,710,711,730,740,760,762,765,767,773,775,776,800,810,811,830,856|mapping template=BibRecord/tags|class=tagInput}}} |
|||
|- |
|||
! Autoridade: |
|||
| {{{field|authorityType|mandatory|input type=radiobutton|values=Nenhuma,Pessoa,Entidade coletiva,Evento,Título uniforme,Tópico,Local|show on select=Nenhuma=>noAuthority;Pessoa=>personalName;Entidade coletiva=>corporateName;Evento=>meetingName;Título uniforme=>uniformTitle;Tópico=>topicalTerm;Local=>geographicName|default=Nenhuma}}} |
|||
|- |
|||
! Indicadores: |
|||
| {{{field|ind1|input type=dropdown|values=#,0,1,2,3,4,5,6,7,8,9|default=#|existing values only|mandatory}}} {{{field|ind2|input type=dropdown|values=#,0,1,2,3,4,5,6,7,8,9|default=#|existing values only|mandatory}}} |
|||
|} |
|||
<div id="noAuthority"> |
|||
{| class="formtable" |
|||
! Subcampos: |
|||
| {{{field|data|input type=textarea|rows=3|cols=75|autogrow|placeholder=$a ... $b ... $c ...|class=noAuthority}}} |
|||
|} |
|||
</div> |
|||
<div id="personalName"> |
|||
{| class="formtable" |
|||
! Subcampos: |
|||
| {{{field|authorityData100|input type=combobox|size=105|placeholder=$a ... $q (...), $d ...|remote autocompletion|values from property=Personal name|class=personalName has-authority-control}}} |
|||
|- |
|||
! |
|||
| <span class="createAuthorityLink"></span> |
|||
|} |
|||
</div> |
|||
<div id="corporateName"> |
|||
{| class="formtable" |
|||
! Subcampos: |
|||
| {{{field|authorityData110|input type=combobox|size=105|placeholder=$a ... $b ...|remote autocompletion|values from property=Corporate name|class=corporateName has-authority-control}}} |
|||
|- |
|||
! |
|||
| <span class="createAuthorityLink"></span> |
|||
|} |
|||
</div> |
|||
<div id="meetingName"> |
|||
{| class="formtable" |
|||
! Subcampos: |
|||
| {{{field|authorityData111|input type=combobox|size=105|placeholder=$a ... ($n ... : $d ... : $c ...)|remote autocompletion|values from property=Meeting name|class=meetingName has-authority-control}}} |
|||
|- |
|||
! |
|||
| <span class="createAuthorityLink"></span> |
|||
|} |
|||
</div> |
|||
<div id="uniformTitle"> |
|||
{| class="formtable" |
|||
! Subcampos: |
|||
| {{{field|authorityData130|input type=combobox|size=105|placeholder=$a ...|remote autocompletion|values from property=Uniform title|class=uniformTitle has-authority-control}}} |
|||
|- |
|||
! |
|||
| <span class="createAuthorityLink"></span> |
|||
|} |
|||
</div> |
|||
<div id="topicalTerm"> |
|||
{| class="formtable" |
|||
! Subcampos: |
|||
| {{{field|authorityData150|input type=combobox|size=105|placeholder=$a ... $x ... $z ... $y ...|remote autocompletion|values from property=Topical term|class=topicalTerm has-authority-control}}} |
|||
|- |
|||
! |
|||
| <span class="createAuthorityLink"></span> |
|||
|} |
|||
</div> |
|||
<div id="geographicName"> |
|||
{| class="formtable" |
|||
! Subcampos: |
|||
| {{{field|authorityData151|input type=combobox|size=105|placeholder=$a ... $x ...|remote autocompletion|values from property=Geographic name|class=geographicName has-authority-control}}} |
|||
|- |
|||
! |
|||
| <span class="createAuthorityLink"></span> |
|||
|} |
|||
</div> |
|||
{{{end template}}} |
|||
{{{for template|EndOfRecord}}} |
|||
{{{end template}}} |
|||
---- |
|||
Ferramentas: {{#queryformlink:form=GetAuthorNotation|link text=pesquisar notação de '''Cutter-Sanborn'''|link type=|tooltip=Auxilia a localização na tabela Cutter-Sanborn|popup}}, {{#queryformlink:form=GetBookCover|link text=pesquisar '''imagem de capa'''|link type=|tooltip=Verifica a existência de imagem de capa|popup}} <!-- {{#queryformlink:form=Classify|link text=pesquisar '''classificação''' (CDD) e '''assuntos'''|link type=|tooltip=Verifica a existência de classificação e assuntos (em inglês)|popup}}, --> |
|||
---- |
|||
{{{standard input|save|label=Gravar alterações}}} * '''Atenção''': Após gravar, não se esqueça de clicar em "'''Mais'''" > "'''Atualizar'''" no menu superior (ao lado da caixa de busca) | {{{standard input|cancel}}} |
|||
<html> |
|||
<script src="/w/index.php?title=MediaWiki:MakeMarcFieldHelpLink.js&action=raw&ctype=text/javascript"></script> |
|||
<script src="/w/index.php?title=MediaWiki:NormalizeMarcData.js&action=raw&ctype=text/javascript"></script> |
|||
<script src="/w/index.php?title=MediaWiki:AuthorityLinks.jss&action=raw&ctype=text/javascript"></script> |
|||
<script src="/w/index.php?title=MediaWiki:MarcEditorDynamicLinks.js&action=raw&ctype=text/javascript"></script> |
|||
<script src="/w/index.php?title=MediaWiki:CollapsibleBySpaceOrEnter.js&action=raw&ctype=text/javascript"></script> |
|||
</html> |
|||
</includeonly> |
Edição das 20h12min de 14 de março de 2024