# HG changeset patch # User IBBoard # Date 1251826347 0 # Node ID e9c4158394627c2671142b96e3a0a53185ec196b # Parent 5145b7c61ae0ad71a3ce9349c214d6d59ee7e128 Re #68: Add "export" of army * Add total to title and points value to units diff -r 5145b7c61ae0 -r e9c415839462 api/Exporters/WarFoundryHtmlExporter.cs --- a/api/Exporters/WarFoundryHtmlExporter.cs Tue Sep 01 16:06:39 2009 +0000 +++ b/api/Exporters/WarFoundryHtmlExporter.cs Tue Sep 01 17:32:27 2009 +0000 @@ -7,6 +7,7 @@ using System.IO; using System.Xml; using System.Xml.Schema; +using IBBoard.Lang; using IBBoard.WarFoundry.API.Objects; namespace IBBoard.WarFoundry.API.Exporters @@ -47,7 +48,7 @@ XmlElement body = doc.CreateElement("body"); html.AppendChild(body); XmlElement header = doc.CreateElement("h1"); - header.InnerText = army.Name; + header.InnerText = Translation.GetTranslation("armyHtmlOutputBodyHeader", "{0} - {1}pts", army.Name, army.PointsTotal); body.AppendChild(header); foreach (XmlElement table in CreateTables(army, doc)) @@ -103,6 +104,11 @@ XmlElement notes = doc.CreateElement("th"); notes.InnerText = "Notes"; headerRow.AppendChild(notes); + + XmlElement points = doc.CreateElement("th"); + points.InnerText = "Points"; + headerRow.AppendChild(points); + return table; } @@ -119,6 +125,14 @@ statCell.InnerText = stat.SlotValueString; row.AppendChild(statCell); } + + XmlElement notes = doc.CreateElement("td"); + notes.InnerText = "TODO: Notes here (equipment etc)"; + row.AppendChild(notes); + + XmlElement points = doc.CreateElement("td"); + points.InnerText = unit.PointsValue.ToString(); + row.AppendChild(points); return row; }