--- a/src/main/scala/fis/crm/ui/ContactSnippet.scala Tue Apr 03 14:55:46 2012 +0200
+++ b/src/main/scala/fis/crm/ui/ContactSnippet.scala Tue Apr 03 15:22:08 2012 +0200
@@ -53,17 +53,20 @@
Title(c => i18n("Delete contact %s", c.linkName)) >>
locTpl("entity/delete") >> Snippet("form", deleteF) >> Hidden
- lazy val viewLoc: Loc[Contact] = viewOp.toLoc
- lazy val editLoc = editOp.toLoc
- lazy val deleteLoc = deleteOp.toLoc
+ private lazy val viewLoc: Loc[Contact] = viewOp.toLoc
+ private lazy val editLoc = editOp.toLoc
+ private lazy val deleteLoc = deleteOp.toLoc
val menu = listOp submenus (viewOp, editOp, createOp, deleteOp)
- def list: CssTr = /*ContactTable(from(CrmSchema.contacts)(c =>
- select(c) orderBy(c.lastName asc, c.firstName asc)))*/ ClearNodes
+ def list: CssTr = ContactTable(CrmSchema.allContacts)
def panel: CssTr = "*" #> viewLoc.currentValue.map { ContactPanel(_) }
+ object url {
+ def view: Contact => Box[String] = (viewLoc.calcHref _) andThen (Box !! _)
+ }
+
object form extends LiftScreen {
object c extends ScreenVar[Contact](Contact.createRecord)