changeset 132:e9c415839462

Re #68: Add "export" of army * Add total to title and points value to units
author IBBoard <dev@ibboard.co.uk>
date Tue, 01 Sep 2009 17:32:27 +0000
parents 5145b7c61ae0
children a6d1cc17ec33
files api/Exporters/WarFoundryHtmlExporter.cs
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 		}