<?
  // шаблон - вывод ссылками без разделитея
  function list_park_full(&$list_recs,$options=array())
  {
    $id=($options['id'])? 'id='.$options['id']:'' ;
    ?><table class="basic auto fz_small list_park_full" <?echo $id?>>
        <colgroup><col id="c1"><col id="c2"><col id="c3"></colgroup>
        <tr><th>Автопарк</th><th>Организация</th><th>Кол-во сотрудников</th><th>Операции</th></tr><? ;
        if (_sizeof($list_recs)) foreach($list_recs as $rec)
        { ?><tr class=item>
                <td class="left"><?echo $rec['obj_name']?></td>
                <td><? if ($rec['parent']>1 and isset(PERSONAL()->tree[$rec['parent']])) echo '<a href="/cab/personal/org/'.$rec['parent'].'/">'.PERSONAL()->tree[$rec['parent']]->name.'</a>'   ;?></td>
                <td><? $cnt=execSQL_value('select count(pkey) from obj_site_personals where clss=211 and enabled=1 and parent='.$rec['pkey']) ;
                       echo $cnt ;
                ?></td>
                <td>
                  <? if ($rec['parent']==1)
                     {?><form><select name="org_id"><option value="new">Новая организация</option>
                          <? if (_sizeof(PERSONAL()->tree['root']->list_obj)) foreach(PERSONAL()->tree['root']->list_obj as $org_id)
                                {?><option value="<?echo $org_id?>"><?echo PERSONAL()->get_name_by_id($org_id) ; ?></option><?}
                          ?>
                        </select>
                        <button class="v2 button_small" cmd="aspmo_personal/get_panel_create_org" park_id="<?echo $rec['pkey']?>">Добавить</button>
                        </form>
                       <?
                     }
                     else
                     {?><button class="v2 button_small" cmd="aspmo_personal/delete_org_from_park" park_id="<?echo $rec['pkey']?>">Удалить</button><?}
                  ?>
                </td>

            </tr><?
        }
      ?></table><?
  }
?>
