github.com/gocaveman/caveman@v0.0.0-20191211162744-0ddf99dbdf6e/gen/view-model-detail.go (about)

     1  package gen
     2  
     3  // generates form from model
     4  
     5  // mobile-first
     6  
     7  // embedability - think about what happens if we want to move this to an include file
     8  //  and call it from JS in a modal or something, what can we do to make that scenario painless
     9  //  Vue components look promising, but need to see how to bring in the templates without
    10  //  duplication - possibly a {{define "once /path-to-include.gohtml"}}{{end}} or something
    11  //  is needed to make this work painlessly - that or we give templates a way of deduplicating
    12  //  themselves...  actually that could be really simple, {{if not (.Included "/template-name.gohtml")}}
    13  //  {{.MarkIncluded "/template-name.gohtml"}}, or if we can somehow detect the current template
    14  //  name, we can even do {{if .Once}} ... {{end}} - which would be rad, although maybe
    15  //  {{if .Once "/template-name.gohtml"}} ... {{end}} is more practical.
    16  
    17  // can customize fields
    18  
    19  // loads page data from controller
    20  
    21  // need to be able to pass in something that allows us to look up relations - definitely needs think-through
    22  
    23  // error message handling on saving
    24  // including login redirection for when login times out