Do not show PlantID in myplants
[L-seed.git] / web / php / page / myplants.pg
index a7aa682..77d6f6c 100644 (file)
                                    grid.getStore().remove(r);
                                }
                        }
-               },{
-                       id: 'plantlistCheckPlantSyntax'
-                       ,text: 'Check Syntax'
-                       ,icon: 'img/icons/accept.png'
-                       ,cls: 'x-btn-text-icon'
-                       ,disabled: true
-                       ,handler: editor.CheckSyntax.createDelegate(editor, ['plantlistgrid'], true)
                },{
                        id: 'plantlistActivatePlant'
                        ,text: 'Activate'
                ,columns: [
                        new Ext.grid.RowNumberer()
                        ,{
-                               id: 'ID'
-                               ,header: 'ID'
-                               ,width: 200
-                               ,sortable: true
-                               ,dataIndex: 'ID'
-                       },{
                                id: 'Name'
                                ,header: 'Name'
                                ,width: 200
                                        xtype: 'textfield'
                                        ,allowBlank: true
                                }
+                       },{
+                               id: 'IsValid'
+                               ,header: 'Valid'
+                               ,width: 50
+                               ,sortable: true
+                               ,dataIndex: 'IsValid'
+                               ,renderer: function (value, metadata, record, rowindex, colindex, store) {
+                                       if (value) {
+                                               return '<img src="img/icons/accept.png"/>';
+                                       } else {
+                                               return '<img src="img/icons/cross.png"/>';
+                                       }
+                               }
                        },{
                                id: 'IsActive'
                                ,header: 'IsActive'
-                               ,width: 200
+                               ,width: 50
                                ,sortable: true
                                ,dataIndex: 'IsActive'
+                               ,renderer: function (value, metadata, record, rowindex, colindex, store) {
+                                       if (value) {
+                                               return '<img src="img/icons/award.png"/>';
+                                       } else {
+                                               return '';
+                                       }
+                               }
                        }
                ]
                ,sm: new Ext.grid.RowSelectionModel({
                        ,listeners: {
                                rowselect: function() {
                                        Ext.getCmp("plantlistDeletePlant").enable();
-                                       Ext.getCmp("plantlistCheckPlantSyntax").enable();
                                        Ext.getCmp("plantlistActivatePlant").enable();
                                        Ext.getCmp("plantlistEditPlant").enable();
                                }
                                ,rowdeselect: function() {
                                        Ext.getCmp("plantlistDeletePlant").disable();
-                                       Ext.getCmp("plantlistCheckPlantSyntax").disable();
                                        Ext.getCmp("plantlistActivatePlant").disable();
                                        Ext.getCmp("plantlistEditPlant").disable();
                                }