diff options
author | Lennart Weller <lhw@ring0.de> | 2013-03-17 00:40:22 +0100 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2013-03-17 00:40:22 +0100 |
commit | 2ebf7bd03166249bac3aaaec76892d3cc03a6c13 (patch) | |
tree | 908c10f79b3f7f929e13bd60a59226a836325c7a | |
parent | 5232fbdec277de3cf3851a914890907d95e57706 (diff) | |
download | serial-barcode-scanner-2ebf7bd03166249bac3aaaec76892d3cc03a6c13.tar.bz2 |
use string templates instead
-rw-r--r-- | src/web.vala | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/web.vala b/src/web.vala index 2731386..ad619f4 100644 --- a/src/web.vala +++ b/src/web.vala @@ -440,9 +440,7 @@ public class WebServer { string table = ""; foreach(var e in db.get_stock()) { - table += "<tr><td><a href=\"/products/%s\">%s</a></td><td><a href=\"/products/%s\">%s</a></td><td>%d</td><td>%s€</td><td>%s€</td></tr>".printf( - e.id, e.id, e.id, e.name, e.amount, e.memberprice.to_string(), e.guestprice.to_string() - ); + table += @"<tr><td><a href=\"/products/$(e.id)\">$(e.id)</a></td><td><a href=\"/products/$(e.id)\">$(e.name)</a></td><td>$(e.amount)</td><td>$(e.memberprice)€</td><td>$(e.guestprice)€</td></tr>"; } t.replace("DATA", table); |