{{popup.title}}
×
{{if popup.text}}
{{popup.text}}
{{/if}} {{if type=="new_facility"}}
{{call GTM.Field({type:'textedit',label:'Наименование',name:'name',value:''})}} {{call GTM.Field({type:'select',label:'Чертеж',name:'plan_id',list:cspace.dictionaries.Plan})}} {{call GTM.Field({type:'select',label:'Родитель',name:'parent_id',list:cspace.tree,value:cspace.popup.parent_id,empty_option:'-'})}}
{{call GTM.Field({type:'submit',label:'Создать',func:'GTM.save_new_facility'})}}
{{/if}} {{if type=="models"}}
{{call GTM.Field({type:'select',label:'Элемент',width:15,name:'sensor_model_id',list:cspace.dictionaries.SensorModel})}}
{{call GTM.Field({type:'submit',label:'Добавить',func:'GTM.add_sensor_model'})}}
{{/if}} {{if type=="sensor"}} {{include "website/GTM/dashboard/sensor"}} {{/if}} {{if type=="group"}}
{{call GTM.Field({type:'textedit',label:'Наименование',name:'name',value:cspace.group.name})}} {{call GTM.Field({type:'hidden',name:'id',value:cspace.group.id})}}
{{call GTM.Field({type:'submit',label:'Сохранить',func:'GTM.save_group'})}}
{{/if}} {{if type=="add_to_group"}}
{{foreach item in groups}} {{call GTM.Field({type:'checkbox',label:cspace.item.name, name:cspace.item.id, value:cspace.item.enabled})}} {{/foreach}} {{call GTM.Field({type:'hidden',name:'sensor_id',value:cspace.sensor.id})}}
{{call GTM.Field({type:'submit',label:'Сохранить',func:'GTM.save_sensor_group'})}}
{{/if}} {{if type=="braid"}}
{{foreach item in braid.braids}} {{call GTM.Field({type:'checkbox',label:cspace.item.deep, name:cspace.item.id, value:cspace.item.enabled})}} {{/foreach}}
{{call GTM.Field({type:'submit',label:'Сохранить',func:'GTM.save_enable_braid'})}}
{{/if}} {{if type=="comments"}}
{{foreach item in comments}}
{{item.user_cr_name}}
{{item.date_cr}}
{{if item.body}}
{{B:item.body}}
{{/if}} {{if item.images.length}}
{{foreach image in item.images}} {{/foreach}}
{{/if}}
{{/foreach}}
{{call GTM.Field({type:'textarea',label:'Текст сообщения',name:'body'})}} {{call GTM.Field({type:'file',label:'Фотографии',name:'images',width:15,multi:1})}} {{call GTM.Field({type:'hidden',name:'name',value:'images'})}} {{call GTM.Field({type:'hidden',name:'type',value:cspace.comments_type})}} {{call GTM.Field({type:'hidden',name:'id',value:cspace.id})}}
{{call GTM.Field({type:'submit',label:'Сохранить',func:'GTM.save_comment'})}}
{{/if}} {{if type=="history"}}
{{foreach item in history}}
[{{item.date_cr}}] {{item.user_name}} внес изменения:
{{B:item.text}}
{{/foreach}}
{{/if}} {{if type=="normatives"}}
{{foreach item in facility.normatives}} {{call GTM.Field({type:'textedit',label:cspace.item.name,name:'type_'+cspace.item.id,value:cspace.item.value})}} {{/foreach}}
{{call GTM.Field({type:'submit',label:'Сохранить',func:'GTM.save_normatives'})}}
{{/if}} {{if type=="stamp"}}
{{call GTM.Field({type:'submit',label:'Сохранить',func:'GTM.save_stamp'})}}
{{/if}} {{if type=="import_xlsx"}}
{{call GTM.Field({type:"file",label:"XLSX",name:"file",width:15})}} {{call GTM.Field({type:'hidden',name:'name',value:'xlsx'})}} {{call GTM.Field({type:'hidden',name:'sensor_id',value:cspace.sensor.id})}}
{{call GTM.Field({type:'submit', label:'Загрузить', func:'GTM.load_xlsx', width:15 })}}
{{/if}} {{if type=="add_full_stat"}}
{{call GTM.Field({type:'date',label:'Статистика на дату',width:5, name:'date_to',value:''})}}
Объекты
{{foreach item in facilities}} {{call GTM.Field({type:'checkbox',label:cspace.item.name, id:cspace.item.id, level:cspace.item.level, name:'facility_'+cspace.item.id })}} {{/foreach}}
Модели
{{foreach item in dictionaries.SensorModel}} {{call GTM.Field({type:'checkbox',label:cspace.item.name, id:cspace.item.id, name:'sensor_model_'+cspace.item.id})}} {{/foreach}}
{{call GTM.Field({type:'submit',label:'Готово',func:'GTM.get_full_stat'})}}
{{/if}}