Line 30: |
Line 30: |
| end | | end |
| | | |
− | -- Create unique ID for the item, which consist of: Volume-Page-Item_on_page | + | -- Create footnote with item summary and notes by editor and archivist |
− | -- ID example: 01-017-03
| |
− | -- Call example: {{#invoke: SB | item_id | volume=1 | page=17 | item=3 }}
| |
− | -- Values: volume=1..99, page=1..999, item=1..99
| |
| function sb.footnote( frame ) | | function sb.footnote( frame ) |
| local str = '' | | local str = '' |
− | local arch_note = frame.args['archivist_notes']
| |
| | | |
− | if isempty(frame.args['archivist_notes']) then | + | if not isempty(frame.args['title']) then |
− | str = 'by unknown author' | + | str = '<i>' .. frame.args['title'] .. '</i>' |
| + | end |
| + | |
| + | if not isempty(frame.args['author']) then |
| + | str = str .. ' by ' .. frame.args['author'] |
| else | | else |
− | str = 'by ' .. frame.args['author'] | + | str = str .. ' by unknown author' |
| + | 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['notes']) then |
| + | str = str .. '. ' .. frame.args['notes'] |
| end | | end |
| | | |
| if not isempty(frame.args['archivist_notes']) then | | if not isempty(frame.args['archivist_notes']) then |
− | str = str .. frame.args['archivist_notes'] .. '. -- Arhchivist.' | + | str = str .. '<br>' .. frame.args['archivist_notes'] .. '. – Archivist.' |
| end | | end |
| | | |
− | local final_str = '<i>' .. frame.args['title'] .. '</i>' .. str | + | return str |
− | return final_str
| |
| end | | end |
| | | |