class
AzuCLI::Generate::Template
- AzuCLI::Generate::Template
- Teeplate::FileTree
- Reference
- Object
Overview
Inner class for generating Jinja2 HTML templates
Defined in:
azu_cli/generators/template.crConstant Summary
-
OUTPUT_DIR =
"./public/templates"
Constructors
Instance Method Summary
-
#____collect_files(____files)
:nodoc:
- #__ecr0(____io)
- #__ecr2(____io)
- #__ecr4(____io)
- #__ecr6(____io)
- #__ecr8(____io)
- #action : String
- #action=(action : String)
-
#field_label(field_name : String) : String
Get field label
-
#field_placeholder(field_name : String) : String
Get field placeholder
-
#field_required?(field_name : String) : Bool
Check if field is required
- #fields : Hash(String, String)
- #fields=(fields : Hash(String, String))
-
#form_action : String
Get form action URL
-
#form_classes : String
Get Bootstrap form classes
-
#form_method : String
Get form method
-
#html_input_type(field_type : String) : String
Get field type for HTML input
- #module_name : String
- #module_name=(module_name : String)
- #module_path : String
- #module_path=(module_path : String)
- #name : String
- #name=(name : String)
-
#page_title : String
Get page title for the action
-
#render(output_dir : String, force : Bool = false, interactive : Bool = true, list : Bool = false, color : Bool = false)
Override render to create proper directory structure
- #resource : String
- #resource=(resource : String)
- #resource_plural : String
- #resource_plural=(resource_plural : String)
- #resource_singular : String
- #resource_singular=(resource_singular : String)
- #snake_case_name : String
- #snake_case_name=(snake_case_name : String)
-
#template_filename : String
Get template filename for the action
-
#template_path : String
Get full template path matching Azu framework expectations
Constructor Detail
def self.new(name : String, fields : Hash(String, String), action : String, module_name : String = "App")
#
Instance Method Detail
def render(output_dir : String, force : Bool = false, interactive : Bool = true, list : Bool = false, color : Bool = false)
#
Override render to create proper directory structure