Changes

+ reason header
Line 10: Line 10:  
   return
 
   return
 
     '<table class="wikitable sortable plainlinks" id="mod-overrides-list">'
 
     '<table class="wikitable sortable plainlinks" id="mod-overrides-list">'
     .. "<tr><th style=\"position: sticky; top: 0;\">mod name</th><th style=\"position: sticky; top: 0;\">update keys</th><th style=\"position: sticky; top: 0;\">manifest version</th><th style=\"position: sticky; top: 0;\">mod page version</th><th style=\"position: sticky; top: 0;\">&nbsp;</th></tr>";
+
     .. "<tr><th style=\"position: sticky; top: 0;\">mod name</th><th style=\"position: sticky; top: 0;\">update keys</th><th style=\"position: sticky; top: 0;\">manifest version</th><th style=\"position: sticky; top: 0;\">mod page version</th><th style=\"position: sticky; top: 0;\">reason</th><th style=\"position: sticky; top: 0;\">&nbsp;</th></tr>";
 
end
 
end
   Line 21: Line 21:  
--- Render a mod row in the mod data overrides table.
 
--- Render a mod row in the mod data overrides table.
 
-- @param frame The arguments passed to the script.
 
-- @param frame The arguments passed to the script.
-- @test mw.log(p.entry({ args = { name="Lookup Anything", id="Pathoschild.LookupAnything", ["update keys"]="-Nexus:541, +Nexus:905", ["local version"]="1.05-beta → 1.0.5-beta", ["remote version"]="1.06 → 1.0.6" }}))
+
-- @test mw.log(p.entry({ args = { name="Lookup Anything", id="Pathoschild.LookupAnything", ["update keys"]="-Nexus:541, +Nexus:905", ["local version"]="1.05-beta → 1.0.5-beta", ["remote version"]="1.06 → 1.0.6", ["reason"]="test values" }}))
 
function p.entry(frame)
 
function p.entry(frame)
 
   -- read input args
 
   -- read input args
Line 29: Line 29:  
   local localVersion  = private.emptyToNil(frame.args["local version"])
 
   local localVersion  = private.emptyToNil(frame.args["local version"])
 
   local remoteVersion = private.emptyToNil(frame.args["remote version"])
 
   local remoteVersion = private.emptyToNil(frame.args["remote version"])
 +
  local reason        = private.emptyToNil(frame.args["reason"])
    
   -- build HTML row
 
   -- build HTML row
Line 38: Line 39:  
   row:attr("data-remote-version", remoteVersion)
 
   row:attr("data-remote-version", remoteVersion)
 
   row:attr("data-update-keys", updateKeys)
 
   row:attr("data-update-keys", updateKeys)
 +
  row:attr("data-reason", reason)
 
   row:attr("style", "line-height: 1em;")
 
   row:attr("style", "line-height: 1em;")
 
   row:newline()
 
   row:newline()
Line 75: Line 77:  
     local field = mw.html.create("td")
 
     local field = mw.html.create("td")
 
     field:wikitext(remoteVersion)
 
     field:wikitext(remoteVersion)
 +
    row:node(field)
 +
    row:newline()
 +
  end
 +
 +
  -- add reason field
 +
  do
 +
    local field = mw.html.create("td")
 +
    field:wikitext(reason)
 
     row:node(field)
 
     row:node(field)
 
     row:newline()
 
     row:newline()
translators
8,404

edits