/
_x_gtl.html.haml
30 lines (29 loc) · 1.39 KB
/
_x_gtl.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- button_div ||= "center_tb"
- rec_display = ""
- no_rec_display = "display:none"
- @ajax_paging_buttons = true
#gtl_div
- view ||= @view
- table = view.sub_table ? view.sub_table : view.table unless view.nil?
- action_url ||= "explorer"
- @gtl_type = "grid" if @gtl_type.nil?
- if view.nil? || table.data.length == 0
- rec_display = "display:none"
- no_rec_display = ""
#no_records_div{:style => no_rec_display}
- if view.nil? || table.data.length == 0
= render :partial => "layouts/flash_msg"
= render :partial => 'layouts/info_msg', :locals => {:message => _("No Records Found.")}
- if @bottom_msg
= h(@bottom_msg)
#records_div{:style => rec_display}
- if table && table.data.length > 0
- unless @embedded
- if render_flash_msg?
= render :partial => "layouts/flash_msg"
- if @gtl_type.nil? || @gtl_type == "grid"
= render :partial => "layouts/gtl/grid", :locals => {:table => table, :button_div => button_div, :view => view, :action_url => action_url}
- elsif @gtl_type == "tile"
= render :partial => "layouts/gtl/tile", :locals => {:table => table, :button_div => button_div, :view => view, :action_url => action_url}
- elsif @gtl_type == "list"
= render :partial => "layouts/gtl/list", :locals => {:table => table, :button_div => button_div, :view => view, :action_url => action_url}