summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2018-09-06 23:31:55 +0200
committerSebastian Reichel <sre@ring0.de>2018-09-06 23:35:46 +0200
commite26f1dccc7553a9b750f5bbdce824b44f6a9bcf4 (patch)
tree933cbf100244eaa62f82c29d087670bacbfd02b8 /src
parent7906378ff2687b4b7d578aa5b7d4a3e8d5a6e8a2 (diff)
downloadserial-barcode-scanner-e26f1dccc7553a9b750f5bbdce824b44f6a9bcf4.tar.bz2
web: user-import: show RFID diff
Diffstat (limited to 'src')
-rw-r--r--src/web/web.vala14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/web/web.vala b/src/web/web.vala
index 3098308..94c2ca1 100644
--- a/src/web/web.vala
+++ b/src/web/web.vala
@@ -224,10 +224,20 @@ public class WebServer {
foreach(var member in csvimport.get_members()) {
if(db.user_exists(member.id) && !db.user_equals(member)) {
var dbmember = db.get_user_info(member.id);
- data1 += @"<tr class=\"error\"><td><i class=\"icon-minus-sign\"></i><td>$(dbmember.id)</td><td>$(dbmember.firstname)</td><td>$(dbmember.lastname)</td><td>$(dbmember.email)</td><td>$(dbmember.gender)</td><td>$(dbmember.street)</td><td>$(dbmember.postcode)</td><td>$(dbmember.city)</td><td>$(dbmember.pgp)</td><td>$(dbmember.hidden)</td><td>$(dbmember.disabled)</td><td>$(dbmember.joined_at)</td></tr>";
+ var dbmemberrfid = "<ul>";
+ foreach(var rfidcode in dbmember.rfid) {
+ dbmemberrfid += @"<li>$(rfidcode)</li>";
+ }
+ dbmemberrfid += "</ul>";
+ data1 += @"<tr class=\"error\"><td><i class=\"icon-minus-sign\"></i><td>$(dbmember.id)</td><td>$(dbmember.firstname)</td><td>$(dbmember.lastname)</td><td>$(dbmember.email)</td><td>$(dbmember.gender)</td><td>$(dbmember.street)</td><td>$(dbmember.postcode)</td><td>$(dbmember.city)</td><td>$(dbmember.pgp)</td><td>$(dbmember.hidden)</td><td>$(dbmember.disabled)</td><td>$(dbmember.joined_at)</td><td>$(dbmemberrfid)</td></tr>";
}
if(!db.user_exists(member.id) || !db.user_equals(member)) {
- data1 += @"<tr class=\"success\"><td><i class=\"icon-plus-sign\"></td><td>$(member.id)</td><td>$(member.firstname)</td><td>$(member.lastname)</td><td>$(member.email)</td><td>$(member.gender)</td><td>$(member.street)</td><td>$(member.postcode)</td><td>$(member.city)</td><td>$(member.pgp)</td><td>$(member.hidden)</td><td>$(member.disabled)</td><td>$(member.joined_at)</td></tr>";
+ var memberrfid = "<ul>";
+ foreach(var rfidcode in member.rfid) {
+ memberrfid += @"<li>$(rfidcode)</li>";
+ }
+ memberrfid += "</ul>";
+ data1 += @"<tr class=\"success\"><td><i class=\"icon-plus-sign\"></td><td>$(member.id)</td><td>$(member.firstname)</td><td>$(member.lastname)</td><td>$(member.email)</td><td>$(member.gender)</td><td>$(member.street)</td><td>$(member.postcode)</td><td>$(member.city)</td><td>$(member.pgp)</td><td>$(member.hidden)</td><td>$(member.disabled)</td><td>$(member.joined_at)</td><td>$(memberrfid)</td></tr>";
}
}
t.replace("DATA1", data1);