CurryInfo: spicey-4.2.0 / Spicey.EntitiesToHtmlGeneration.toListView

definition: Info
 
toListView :: ToHtmlGenerator
toListView erdname (Entity entityName attrlist) _ _ =
 cmtfunc
  ("The list view of a " ++ entityName ++ " entity in HTML format.\n" ++
   "This view is used in a row of a table of all entities.")
  (thisModuleName erdname, lowEntity ++ "ToListView") 2 Public
  (withHTMLContext
     (baseType (model erdname, entityName) ~> listType (listType htmlTVar)))
  [simpleRule [CPVar envar]
     (list2ac
       (map (\a@(Attribute _ domain key _) ->
              let attref = applyF (model erdname, lowEntity ++ attributeName a)
                                  [CVar envar]
              in list2ac
                  [if key == Unique
                     then applyF hrefSmallButtonName
                           [applyF (spiceyModule,"showRoute") [CVar envar],
                            list2ac [applyF (attributeToConverter a) [attref]]]
                     else applyF (attributeToConverter a) [attref]
                  ] )
            attrlist))]
 where lowEntity = lowerFirst entityName
       envar = (1, lowEntity)
demand: Info
 argument 2
deterministic: Info
 deterministic operation
failfree: Info
 (_, _, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,{Entity},_,_) |-> _}
name: Info
 toListView
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 String -> Database.ERD.Entity -> [Database.ERD.Relationship]
-> [Database.ERD.Entity] -> AbstractCurry.Types.CFuncDecl
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term