当前位置: 首页>>代码示例>>PHP>>正文


PHP Browser::AddRow方法代码示例

本文整理汇总了PHP中Browser::AddRow方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::AddRow方法的具体用法?PHP Browser::AddRow怎么用?PHP Browser::AddRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Browser的用法示例。


在下文中一共展示了Browser::AddRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: principal_collection_browser

function principal_collection_browser()
{
    global $c, $page_elements, $id, $editor;
    $browser = new Browser(translate('Principal Collections'));
    $browser->AddColumn('collection_id', translate('ID'), 'right', '##collection_link##');
    $rowurl = $c->base_url . '/admin.php?action=edit&t=collection&id=';
    $browser->AddHidden('collection_link', "'<a href=\"{$rowurl}' || collection_id || '\">' || collection_id || '</a>'");
    $browser->AddColumn('dav_name', translate('Path'));
    $browser->AddColumn('dav_displayname', translate('Display Name'));
    $browser->AddColumn('publicly_readable', translate('Public'), 'centre', '', 'CASE WHEN publicly_readable THEN \'' . translate('Yes') . '\' ELSE \'' . translate('No') . '\' END');
    $browser->AddColumn('privs', translate('Privileges'), '', '', "COALESCE( privileges_list(default_privileges), '[" . translate('from principal') . "]')");
    $delurl = $c->base_url . '/admin.php?action=edit&t=principal&id=' . $id . '&dav_name=##URL:dav_name##&subaction=delete_collection';
    $browser->AddColumn('delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"{$delurl}\">" . translate('Delete') . "</a>'");
    $browser->SetOrdering('dav_name', 'A');
    $browser->SetJoins("collection ");
    $browser->SetWhere('user_no = ' . intval($editor->Value('user_no')));
    $browser->AddRow(array('dav_name' => '<a href="' . $rowurl . '&user_no=' . intval($editor->Value('user_no')) . '" class="submit">' . translate('Create Collection') . '</a>'));
    if ($c->enable_row_linking) {
        $browser->RowFormat('<tr onMouseover="LinkHref(this,1);" title="' . translate('Click to edit principal details') . '" class="r%d">', '</tr>', '#even');
    } else {
        $browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
    }
    $browser->DoQuery();
    return $browser;
}
开发者ID:derekyu1437,项目名称:davical,代码行数:25,代码来源:principal-edit.php

示例2: translate

 $browser->SetWhere('by_collection = ' . $id);
 if ($c->enable_row_linking) {
     $browser->RowFormat('<tr onMouseover="LinkHref(this,1);" title="' . translate('Click to edit principal details') . '" class="r%d">', '</tr>', '#even');
 } else {
     $browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
 }
 $browser->DoQuery();
 $page_elements[] = $browser;
 if ($can_write_collection) {
     if (isset($_GET['edit_grant'])) {
         $browser->MatchedRow('to_principal', $_GET['edit_grant'], 'edit_grant_row');
     } else {
         $extra_row = array('to_principal' => -1);
         $browser->MatchedRow('to_principal', -1, 'edit_grant_row');
         $extra_row = (object) $extra_row;
         $browser->AddRow($extra_row);
     }
 }
 $browser = new Browser(translate('Access Tickets'));
 $browser->AddHidden('dav_owner_id');
 $browser->AddColumn('ticket_id', translate('Ticket ID'), '', '');
 $browser->AddColumn('target', translate('Target'), '', '<td style="white-space:nowrap;">%s</td>', "'" . $c->base_url . '/caldav.php' . "' ||COALESCE(d.dav_name,c.dav_name)");
 $browser->AddColumn('expiry', translate('Expires'), '', '', 'TO_CHAR(expires,\'YYYYMMDD"T"HH:MI:SS\')');
 $browser->AddColumn('privs', translate('Privileges'), '', '', "privileges_list(privileges)");
 $delurl = $c->base_url . '/admin.php?action=edit&t=principal&id=##dav_owner_id##&ticket_id=##URL:ticket_id##&subaction=delete_ticket';
 $browser->AddColumn('delete', translate('Action'), 'center', '', "'<a class=\"submit\" href=\"{$delurl}\">" . translate('Delete') . "</a>'");
 $browser->SetOrdering('target', 'A');
 $browser->SetJoins('access_ticket t LEFT JOIN collection c ON (target_collection_id=collection_id) LEFT JOIN caldav_data d ON (target_resource_id=dav_id)');
 $browser->SetWhere('target_collection_id = ' . intval($editor->Value('collection_id')));
 $browser->RowFormat('<tr class="r%d">', '</tr>', '#even');
 $browser->DoQuery();
开发者ID:rossryan,项目名称:Calico,代码行数:31,代码来源:collection-edit.php


注:本文中的Browser::AddRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。