<?

function panel_list_edit($options=array())
{ $list_name=$options['list_name'];
  ?><div id="panel_list_edit"><form>
    <table class="info">
     <tr><td><?echo $options['title_list']?>:</td><td>
        <?  if (_sizeof(_IL($list_name)->recs)) foreach(_IL($list_name)->recs as $rec)
              {?><div class="item">
                    <input type="text" name="list_rec[<?echo $rec['id']?>][indx]"  value="<?echo $rec['indx']?>" class="small" <?if ($options['read_only_id']==$rec['id']) echo 'readonly'?>>
                    <input type="text" name="list_rec[<?echo $rec['id']?>][name]"  value="<?echo $rec['obj_name']?>" <?if ($options['read_only_id']==$rec['id']) echo 'readonly'?>>
                    <?if ($options['read_only_id']!=$rec['id']){?><button class="v2" cmd="list_rec_delete" list_name="<?echo $list_name?>" rec_id="<?echo $rec['id']?>">Удалить</button><?}?>
                </div><?}
        ?>
     </td></tr>
     <tr><td><?echo $options['title_create']?>:</td><td><input type="text" name="new_rec"  value="" class="big"> <button class="v2" cmd="list_rec_create" list_name="<?echo $list_name?>">Добавить</button></td></tr>
     <tr><td></td><td><input type="submit" class="v2" cmd="list_rec_update" value="Сохранить" list_name="<?echo $list_name?>"></td></tr>
   </table>
   </form></div><?
}





?>
