Modul:Citation: Unterschied zwischen den Versionen
bookitem, cite classes
(range format) |
(bookitem, cite classes) |
||
| Zeile 2: | Zeile 2: | ||
local citation = { | local citation = { | ||
suite = 'Citation', | suite = 'Citation', | ||
serial = '2021- | serial = '2021-08-16', | ||
item = 56159597 | item = 56159597 | ||
} | } | ||
| Zeile 212: | Zeile 212: | ||
-- make title part | -- make title part | ||
local function makeTitle( title, volume, addition, url, scale, titleType ) | local function makeTitle( title, volume, addition, url, scale, titleType ) | ||
if titleType == ' | if titleType == 'bookitem' then | ||
title = cu.formatItem( title, ci.formatters.tiCollectionTitle ) | title = cu.formatItem( title, ci.formatters.tiCollectionTitle ) | ||
elseif titleType == 'journal' then | elseif titleType == 'journal' then | ||
| Zeile 449: | Zeile 449: | ||
title = makeTitle( args.title, args.volume, args.titleAddition, args.url, | title = makeTitle( args.title, args.volume, args.titleAddition, args.url, | ||
args.scale, 'title' ) | args.scale, 'title' ) | ||
else -- | else -- bookitem | ||
author = makeAuthor( '', args.editor ) | author = makeAuthor( '', args.editor ) | ||
title = makeTitle( args.collection, args.volume, args.titleAddition, | title = makeTitle( args.collection, args.volume, args.titleAddition, | ||
args.url, '', ' | args.url, '', 'bookitem' ) | ||
end | end | ||
return author .. title .. makePublished( args ) | return author .. title .. makePublished( args ) | ||
| Zeile 462: | Zeile 462: | ||
local editor = makeAuthor( '', args.editor ) | local editor = makeAuthor( '', args.editor ) | ||
local collection = makeTitle( args.collection, args.volume, args.titleAddition, | local collection = makeTitle( args.collection, args.volume, args.titleAddition, | ||
args.siteUrl, '', ' | args.siteUrl, '', 'bookitem' ) | ||
return author .. title .. ci.formatters.tiIn .. editor .. collection | return author .. title .. ci.formatters.tiIn .. editor .. collection | ||
| Zeile 578: | Zeile 578: | ||
if args.type == 'map' or args.type == 'book' then | if args.type == 'map' or args.type == 'book' then | ||
citation = makeBook( args ) | citation = makeBook( args ) | ||
elseif args.type == ' | elseif args.type == 'bookitem' then | ||
citation = makeCollection( args ) | citation = makeCollection( args ) | ||
elseif args.type == 'journal' or args.type == 'newspaper' | elseif args.type == 'journal' or args.type == 'newspaper' | ||
| Zeile 598: | Zeile 598: | ||
return cu.getErrorMsgs() | return cu.getErrorMsgs() | ||
.. tostring( mw.html.create( 'cite' ) | .. tostring( mw.html.create( 'cite' ) | ||
:attr( 'class', | :attr( 'class', ci.citeClass .. ci.addCiteClasses[ args.type ] ) | ||
:css( 'font-style', 'normal' ) | :css( 'font-style', 'normal' ) | ||
:wikitext( citation ) | :wikitext( citation ) | ||
| Zeile 618: | Zeile 618: | ||
args.type = 'map' | args.type = 'map' | ||
elseif cu.getArgValue( ci.params, 'collection', args ) ~= '' then | elseif cu.getArgValue( ci.params, 'collection', args ) ~= '' then | ||
args.type = ' | args.type = 'bookitem' | ||
elseif cu.getArgValue( ci.params, 'journal', args ) ~= '' then | elseif cu.getArgValue( ci.params, 'journal', args ) ~= '' then | ||
args.type = 'journal' | args.type = 'journal' | ||