AddColumn( 'collection_id', translate('ID'), 'right', '##collection_link##' ); $rowurl = $c->base_url . '/admin.php?action=edit&t=collection&id='; $browser->AddHidden( 'collection_link', "'' || collection_id || ''" ); $browser->AddColumn( 'dav_displayname', translate('Display Name') ); $browser->AddColumn( 'refs', translate('References'),'right','','(select count(*) from dav_binding where bound_source_id=collection_id )' ); $browser->SetOrdering( 'dav_displayname', 'A' ); $browser->SetJoins( "collection " ); $browser->SetWhere( "parent_container='/.external/'" ); $c->page_title = $browser->Title(); if ( $c->enable_row_linking ) { $browser->RowFormat( '', '', '#even' ); } else { $browser->RowFormat( '', '', '#even' ); } $page_elements[] = $browser; $externalqry = new AwlQuery( "SELECT count(*) as count from collection where parent_container='/.external/' and collection_id not in ( select bound_source_id from dav_binding where external_url is not null)" ); $externalqry->Exec('external-bind-url'); $external = $externalqry->Fetch(); if ( $external->count > 0 ) { $link = ''. translate("Remove dangling external calendars").'('.$external->count.')'; $c->stylesheets[] = 'css/edit.css'; $page_elements[] = $link; }