{{if w==null}} {{widget_id=queries['widget_id']}} {{w=widget_by_id widget_id}} {{end}} {{if db==null}} {{dashboard = queries['dashboard']}} {{db=dashboard_ref dashboard}} {{end}} {{if dbs==null}} {{dbs=dashboards_ref}} {{end}} {{wid = w.id}} {{style_css=''}} {{if db.layout == 'FIXED_RESIZEABLE' || db.layout == 'MASONRY_RESIZEABLE'}} {{swidth=''}} {{sheight=''}} {{if w.width>0}} {{swidth='width:' | string.append w.width | string.append 'px;'}} {{end}} {{if w.height>0}} {{h=w.height}} {{sheight='height:' | string.append h | string.append 'px;'}} {{end}} {{if w.width>0 || w.height>0}} {{style_css='overflow:hidden;' | string.append sheight | string.append swidth}} {{end}} {{if db.layout == 'FIXED_RESIZEABLE'}} {{style_css=style_css | string.append 'position:fixed;left: ' | string.append position_left | string.append 'px; top: ' | string.append position_top | string.append 'px;'}} {{end}} {{end}} {{style_css=style_css | string.append 'border: ' | string.append w.border_size | string.append 'px solid #999999; border-color: ' | string.append w.border_color | string.append '; border-radius: ' | string.append w.border_radius | string.append 'px; background: ' | string.append w.background_color | string.append ';'}} {{if w.stretch_background}} {{stretch='background-size: cover;'}} {{else}} {{stretch='background-position: center;'}} {{end}}
{{if dbs.edit_mode}}
{{end}}
{{if (w.type=='Device')}} {{dialog_id='edit_device_card'}} {{includefileraw Dashboards/Cards/Internal/card_device.html}} {{else if w.type=='Thermostat'}} {{dialog_id='edit_thermostat_card'}} {{includefileraw Dashboards/Cards/Internal/card_thermostat.html}} {{else if w.type=='Media'}} {{dialog_id='edit_media_card'}} {{includefileraw Dashboards/Cards/Internal/card_media.html}} {{else if w.type=='Camera'}} {{dialog_id='edit_camera_card'}} {{includefileraw Dashboards/Cards/Internal/card_camera.html}} {{else if w.type=='Custom'}} {{dialog_id='edit_custom_card'}} {{cardfile='Dashboards/Cards/' | string.append w.card_file}} {{includefileparms cardfile [w.id]}} {{end}}
{{ if db.layout == 'MASONRY_RESIZEABLE' || db.layout == 'FIXED_RESIZEABLE' }} {{if dbs.edit_mode}}
{{end}} {{end}}
{{if dbs.edit_mode}}
{{includefileraw includes/dashboard_card_edit_controls.html}}
{{end}} {{if (w.type=='Device')}} {{includefileraw Dashboards/Cards/Internal/card_device_dialogs.html}} {{else if w.type=='Thermostat'}} {{includefileraw Dashboards/Cards/Internal/card_thermostat_dialogs.html}} {{else if w.type=='Media'}} {{includefileraw Dashboards/Cards/Internal/card_media_dialogs.html}} {{else if w.type=='Camera'}} {{includefileraw Dashboards/Cards/Internal/card_camera_dialogs.html}} {{end}}