--- a/src/main/scala/fis/crm/ui/ContactSnippet.scala Fri Feb 10 09:53:09 2012 +0100
+++ b/src/main/scala/fis/crm/ui/ContactSnippet.scala Fri Feb 10 09:53:09 2012 +0100
@@ -158,4 +158,17 @@
}
}
+import fis.base.ui._
+
+object ContactSnippet2 extends EntitySnippet[Contact] {
+ implicit def str2ns(s: String): NodeSeq = Text(s)
+ def prefix = "contact2"
+ def asEntity(id: Long): Box[Contact] = Contact.findByKey(id)
+ def titleList = "Contacts"
+ def titleAdd = "Create a contact"
+ def titleShow(c: Contact) = "Contact " + c.linkName
+ def titleEdit(c: Contact) = "Edit contact " + c.linkName
+ def titleDelete(c: Contact) = "Delete contact " + c.linkName
+}
+
// vim: set ts=2 sw=2 et: