paper links for alumni

This commit is contained in:
Oliver Kennedy 2016-08-11 18:48:25 -04:00
parent 9fd33eb97c
commit 2d13e0aaba
2 changed files with 20 additions and 8 deletions

View file

@ -9,13 +9,6 @@
"projects" : ["mimir"],
"ubit" : "yyang25"
},
"Niccolò Meneghetti" : {
"status" : "PhD",
"projects" : ["mimir"],
"ubit" : "niccolom",
"advisor" : ["Jan Chomicki"],
"link" : "http://www.acsu.buffalo.edu/~niccolom/"
},
"Ting Xie" : {
"status" : "PhD",
"projects" : ["insider-threats"],
@ -172,6 +165,16 @@
"position" : "Software Engineer",
"company" : "HPE/Vertica",
"year" : 2016
},
"Niccolò Meneghetti" : {
"status" : "PhD",
"projects" : ["mimir"],
"ubit" : "niccolom",
"advisor" : ["Jan Chomicki"],
"link" : "http://www.acsu.buffalo.edu/~niccolom/",
"position" : "Software Engineer",
"company" : "HPE/Vertica",
"year" : 2016
}
}
}

View file

@ -55,11 +55,20 @@ module LabMetadata
def LabMetadata.link_for(person)
cname = @@cnames[person] || person
data = $db["lab/members"][cname]
if data.nil? then person else
unless data.nil? then
link =
if /^https?:\/\// =~ data["link"] then data["link"]
else GemSmith::root_path(data["link"]) end
"<a class=\"lab_member\" href=\"#{link}\">#{person}</a>"
else
alum = $db["lab/alumni/#{cname}"]
if alum and alum["link"] then
"<a class=\"lab_member\" href=\"#{alum["link"]}\">#{person}</a>"
elsif alum then
"<span class=\"lab_member\">#{person}</span>"
else
person
end
end
end