Editing Module:HousingTable
From Eco - English Wiki
Your changes will be displayed to readers once an authorized user accepts them. (help)
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
local Utils = require('Module:Utils') | local Utils = require('Module:Utils') | ||
local L = require('Module:Localization') | local L = require('Module:Localization') | ||
function p.table(frame) | function p.table(frame) | ||
Line 26: | Line 9: | ||
local ItemData = mw.loadData("Module:ItemData") | local ItemData = mw.loadData("Module:ItemData") | ||
local returnStr = | local returnStr = [[<table class="wikitable sortable jquery-tablesorter"> | ||
<tr> | |||
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">]] .. L.t('Item') .. [[</th> | |||
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">]] .. L.t('Room') .. [[</th> | |||
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">]] .. L.t('Type') .. [[</th> | |||
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">]] .. L.t('Value') .. [[</th> | |||
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">]] .. L.t('Dim. Return %') .. [[</th> | |||
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">]] .. L.t('Dimensions') .. [[</th> | |||
</tr>]] | |||
local items = {} | local items = {} | ||
Line 39: | Line 30: | ||
for _, item in pairs(items) do | for _, item in pairs(items) do | ||
returnStr = returnStr .. '<tr><td>[[' .. item.item .. ']]</td><td>' .. item.room .. '</td><td>' .. item.type .. '</td><td>' .. item.value .. '</td><td>' .. item.depreciation | returnStr = returnStr .. ' < tr > < td > [[' .. item.item .. ']] </td><td>' .. item.room .. '</td><td>' .. item.type .. '</td><td>' .. item.value .. '</td><td>' .. item.depreciation .. '</td><td>' .. item.dimensions .. '</td></tr>' | ||
end | end | ||
return returnStr .. '</table>' | return returnStr .. '</table>' | ||
end | end | ||
Line 79: | Line 46: | ||
else | else | ||
return a.room < b.room | return a.room < b.room | ||
end | end | ||
end | end | ||
return p | return p |