Module:Chronology: Difference between revisions
MusikAnimal (talk | contribs) No edit summary |
MusikAnimal (talk | contribs) No edit summary |
||
Line 115: | Line 115: | ||
local results = cargo.query( | local results = cargo.query( | ||
'track_listings', | 'track_listings', | ||
'track, song | 'track, song', | ||
{ where = 'work = "' .. album .. '" AND main_listing = 1' } | { where = 'work = "' .. album .. '" AND main_listing = 1' } | ||
) | ) | ||
Line 129: | Line 129: | ||
if r > 1 then | if r > 1 then | ||
local prev_song = results[r - 1] | local prev_song = results[r - 1] | ||
wikitext = wikitext | wikitext = wikitext .. '"[[' .. prev_song.song .. ']]"<br/>' .. prev_song.track .. '.' | ||
end | end | ||
wikitext = wikitext .. "\n| style='width: 33%; text-align: center; vertical-align: top; padding: .2em .1em' |" | wikitext = wikitext .. "\n| style='width: 33%; text-align: center; vertical-align: top; padding: .2em .1em' |" | ||
wikitext = wikitext | wikitext = wikitext .. '"[[' .. result.song .. ']]"<br/>' .. result.track .. '.' | ||
wikitext = wikitext .. "\n| style='width: 33%; text-align: center; vertical-align: top; padding: .2em 0 .2em .1em' |" | wikitext = wikitext .. "\n| style='width: 33%; text-align: center; vertical-align: top; padding: .2em 0 .2em .1em' |" | ||
if results[r + 1] ~= nil then | if results[r + 1] ~= nil then | ||
local next_song = results[r + 1] | local next_song = results[r + 1] | ||
wikitext = wikitext | wikitext = wikitext .. '"[[' .. next_song.song .. ']]"<br/>' .. next_song.track .. '.' | ||
end | end | ||