Bureaucrats, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Suppressors, Administrators, trusted
10,488
edits
No edit summary |
m (+language and translator) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
local id = frame.args['volume'] .. '-' .. frame.args['page'] .. '-' .. frame.args['item'] | local id = frame.args['volume'] .. '-' .. frame.args['page'] .. '-' .. frame.args['item'] | ||
return id | return id | ||
end | |||
local function isempty(s) | |||
return s == nil or s == '' | |||
end | end | ||
Line 24: | Line 28: | ||
local id = vNum .. '-' .. pNum .. '-' .. iNum | local id = vNum .. '-' .. pNum .. '-' .. iNum | ||
return id | return id | ||
end | |||
-- Create footnote with item summary and notes by editor and archivist | |||
-- View: TITLE by AUTHOR (signed as AUTHOR_SIGNED), SOURCE_TITLE, SOURCE_DETAILS. | |||
-- Translated from LANGUAGE by TRANSLATOR. NOTES. ARCHIVIST_NOTES. | |||
function sb.footnote( frame ) | |||
local str = '' | |||
if not isempty(frame.args['title']) then | |||
str = '<i>' .. frame.args['title'] .. '</i>' | |||
end | |||
if not isempty(frame.args['author']) then | |||
str = str .. ' by ' .. frame.args['author'] | |||
else | |||
if not isempty(frame.args['title']) then | |||
str = str .. ' by unknown author' | |||
else | |||
str = str .. frame.args['type'] .. ' by unknown author' | |||
end | |||
end | |||
if not isempty(frame.args['author_signed']) then | |||
str = str .. ' (signed as ' .. frame.args['author_signed'] .. ')' | |||
end | |||
if not isempty(frame.args['source_title']) then | |||
str = str .. ', <i>' .. frame.args['source_title'] .. '</i>' | |||
end | |||
if not isempty(frame.args['source_details']) then | |||
str = str .. ', ' .. frame.args['source_details'] | |||
end | |||
if not isempty(frame.args['language']) then | |||
str = str .. '. Translated from ' .. frame.args['language'] | |||
if not isempty(frame.args['translator']) then | |||
str = str .. ' by ' .. frame.args['translator'] | |||
end | |||
end | |||
if not isempty(frame.args['notes']) then | |||
str = str .. '. ' .. frame.args['notes'] | |||
end | |||
if not isempty(frame.args['archivist_notes']) then | |||
str = str .. '<br>' .. frame.args['archivist_notes'] .. '. – Archivist' | |||
end | |||
return str | |||
end | end | ||