-
Notifications
You must be signed in to change notification settings - Fork 2
2.2 Blade: UI components
A built-in date selector control, can be easily inserted into a form.
Blade template file: /views/components/form/DatePicker.blade.php
@feDatePicker([
'id'=>'element ID',
'label'=>'Label text',
'value'=>'Default Value'
])
@endfeDatePicker
Insert a uploader interface for user to process uploads.
Blade template file: /views/components/FileUpload.blade.php
@fefileupload([
'parameter'=>'',
...
])
@endfefileupload
parameter name | Values | Description |
---|---|---|
custom_action | string | Custom URL for the upload control. Default to route('LF_FileUploads'), URL:'/lf_uploadfiles/' |
formID | string | Element ID, default to 'LF_fileUploads_form' |
multifile | boolean | If multiple of files are allowed to be uploaded |
note: Controller "LF_FileUpload_Controller@processUploads" is used to process the files uploaded.
Initially, files are stored at "storage/LF_FilesUpload/"
A one stop-shop table control that renders html tables with filters, ajax data source, row-highlights, etc. This control uses a third-party plugin called DataTables. For more information, please visit DataTables Official website.
Blade template file: /views/components/DataTable.blade.php
@feDataTable([
'parameter'=>'',
...
])
html contents...
@endfeDataTable
parameter name | Values | Description |
---|---|---|
header | string | table header text |
tableID | string | html element ID |
headerList | array | list of header text. eg: ['idx','name','age',...] |
JsSetting | array | additional dataTable js configurations. eg:['serverSide'=>true,'columnDefs'=>['targets'=>1,'className'=>'cost','width'=>'20%']]. For a complete list of js available options,please visit DataTables Website |
header_bg | string | bootstrap color class for the table header. [dark,primary,success,danger,info,etc...]. Refer to the css portion of the wiki for a complete list of color classes. |
FilterLocation | string | set the location of the filter bar. [header or footer] |
footer | string | footer text of the table |
tableData | json | Initial table data. |
Adding menus to the navigation bar.
Blade template file: /views/components/sidebarMenu.blade.php
@fesidebarMenu([
'parameter'=>'',
...
])
@endfesidebarMenu
parameter name | Values | Description |
---|---|---|
active | boolean | if the link is active |
subMenus | false/string | Default:false. html text to be displayed as submenus |
icon | string | fontawesome icon name without "fa". For a list of all icons, please visit fontawesome |
A complete note pad control with interface is available to be inserted anywhere on the page.
Blade template file: /views/components/Notes.blade.php
@fenotes([
'parameter'=>'',
...
])
html contents...
@endfenotes
parameter name | Values | Description |
---|---|---|
custom_note_action | string | custom URL for saving the notes. Default: route('LF_SaveNotes'), URL:'/savenote/' |
formID | string | element ID. Default: "LF_notes_form" |
active | boolean | if class active is set |
default | string | default notes contents |
A bootstrap Modal control pack into one directive.
Blade template file: /views/components/Modal.blade.php
@feModal([
'parameter'=>'',
...
])
html contents...
@endfeModal
parameter name | Values | Description |
---|---|---|
modal_class | string | class name of the modal |
modal_direction | string | direction of the modal. Default: top |
modal_ID | string | ID for the element |
modal_size | string | modal size. Default: modal-lg |
has_form | string | if create a form tag within the modal |
form_action | string | target URL for the form |
form_name | string | name of the form tag |
form_id | string | ID for the form tag |
header_bg | string | modal header background color class. Default: primary |
header | string | modal header contents |
footer_bg | string | modal footer background color class. Default: gray-light |
footer | string | modal footercontents |
Feedback is much appreciated! I can be reached at [email protected]