Changes

Undo revision 134557 by Memetails due to it causing spacing issue in event page
Line 24: Line 24:  
|style="background-color:#eef2f7;font-size:18px"|%s
 
|style="background-color:#eef2f7;font-size:18px"|%s
 
|style="background-color:#eef2f7;font-size:18px"|%s]=],
 
|style="background-color:#eef2f7;font-size:18px"|%s]=],
item_style_top    = [=[|data-sort-value="%s" style="background-color:#eef2f7;color:red;font-size:12px;line-height:14px;width:auto;border-top:4px solid grey"|]=],
+
item_style = [=[|-
item_style_bottom = [=[|data-sort-value="%s" style="background-color:#eef2f7;color:red;font-size:12px;line-height:14px;width:auto;border-bottom:4px solid grey"|]=],
+
|data-sort-value="%s" style="background-color:#eef2f7;color:red;font-size:12px;line-height:14px;width:auto;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
item_style_both  = [=[|data-sort-value="%s" style="background-color:#eef2f7;color:red;font-size:12px;line-height:14px;width:auto;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
   
item_amount_style = [=[
 
item_amount_style = [=[
 
|style="background-color:#eef2f7;font-size:18px;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
 
|style="background-color:#eef2f7;font-size:18px;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
inner_table_header = [=[|-
  −
|
  −
{|style="text-align:center;width:100%"]=],
  −
or_style = [=[|rowspan="2"style="background-color:#eef2f7;color:red"|OR]=],
  −
item_link = [=[[[%s]]]=],
   
}
 
}
   Line 137: Line 131:  
local difficulty = {'Casual', 'Easy', 'Medium', 'Hard'}
 
local difficulty = {'Casual', 'Easy', 'Medium', 'Hard'}
 
 
--Output the reward items as a table inside the cell
+
--Output the reward items
table.insert(result, template.inner_table_header)
+
table.insert(result, template.item_style)
 
local str = "%s"
 
local str = "%s"
 
for c=1, #names do
 
for c=1, #names do
if c>1 then table.insert(result, template.or_style) end
+
if c>1 then str = str .. " OR %s " end
table.insert(result, template.item_style_top)
+
str = string.format(str, getAsset(names[c]:sub(1, -2)))
table.insert(result, getAsset(names[c]:sub(1, -2)))
   
end
 
end
table.insert(result, "|-")
+
table.insert(result, str)
for c=1, #names do
  −
table.insert(result, template.item_style_bottom)
  −
table.insert(result, string.format(template.item_link, names[c]:sub(1, -2)))
  −
end
  −
table.insert(result, template.footer)
   
 
 
--Output the amounts of reward for each difficulty & item
 
--Output the amounts of reward for each difficulty & item
958

edits