Module:Tour stats: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 350: Line 350:
join = table.concat(joins2, ','),
join = table.concat(joins2, ','),
offset = offset,
offset = offset,
groupBy = table.concat(groups, ',')
groupBy = table.concat(groups, ','),
limit = 5000
}
}
)
)
Line 384: Line 385:
}
}


-- for key, value in pairs(args) do
-- if filters[key] == false then
-- filters[key] = value
-- end
-- end
-- local results = p._query(filters)
local results = p._query(args)
local results = p._query(args)
local root = mw.html.create('div')
local root = mw.html.create('div'):addClass('search-results')


local title = 'Results'
local title = 'Results'
Line 398: Line 392:
-- TODO: maybe give more fitting title, at least mention song(s) names
-- TODO: maybe give more fitting title, at least mention song(s) names


root:tag('div')
local lang = mw.getContentLanguage()
:wikitext(#results .. ' results')
local totals_div = root:tag('div'):addClass('search-results--totals')
-- TODO: add more data (N artists, N prerecorded, etc.)
:wikitext(#results .. ' ' .. lang:plural(#results, 'result', 'results'))


local get_row = require('Module:Live show row')._main
local get_row = require('Module:Live show row')._main