本文整理汇总了PHP中Bootstrap::h方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::h方法的具体用法?PHP Bootstrap::h怎么用?PHP Bootstrap::h使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bootstrap
的用法示例。
在下文中一共展示了Bootstrap::h方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
public function indexAction()
{
$elements = array();
$elements[] = Bootstrap::row()->add(12, Bootstrap::h(1, 'Internet providers'));
$elements[] = BootstrapUI::tableRemote()->title('List of providers')->column('name', 'provider name')->column('total', 'count', 70)->column('action', '', 30)->sortableColumns(array('name', 'total'))->searchable()->sortField('name', 'asc');
return View::create('base')->with('title', 'Internet providers')->with('content', $elements);
}
示例2: indexAction
public function indexAction()
{
$elements = array();
$elements[] = Bootstrap::row()->add(12, Bootstrap::h(1, 'Stack traces')->secondaryText('This is list of collected stack trace summaries'));
$table = BootstrapUI::tableRemote()->title('List of stack trace summaries')->searchable()->column('id')->column('summary')->column('total', 'count', 70)->sortableColumns(array('id', 'total'))->sortField('id', 'desc');
$elements[] = $table;
return View::create('base')->with('title', 'Stack traces')->with('content', $elements);
}
示例3: stackTracesAction
public function stackTracesAction()
{
$osVersionId = (int) Url::getVar('os_version_id');
if ($osVersionId <= 0) {
Application::throwError(400, 'Bad request');
}
$osVersion = Version::fetchOne($osVersionId);
if ($osVersion === false) {
Application::throwError(404, 'Can not find os_version');
}
$title = "Stack traces for {$osVersion->os} {$osVersion->name}";
$elements = array();
$elements[] = Bootstrap::row()->add(12, Bootstrap::h(1, $title)->secondaryText("Total {$osVersion->total} reports"));
$elements[] = Bootstrap::row()->add(12, BootstrapUI::tableRemote()->title('Most common stack traces')->column('total', 'count', 80)->column('summary', 'stack trace summary')->column('action', '', 30)->sortableColumns(array('summary', 'total'))->sortField('total', 'desc')->extraParam('os_version_id', $osVersionId));
return View::create('base')->with('title', $title)->with('content', $elements);
}
示例4: indexAction
public function indexAction()
{
$calculationInProgress = Status::isCalculationInProgress();
$elements = array();
$user = Session::get('user');
// Check for currently ongoing calculation
if ($calculationInProgress) {
$alert = Bootstrap::alert('<img src="' . Url::link('img/alert.png') . '" /> Data calculation is in progress! Reports might be slower then usual! Status: ' . Status::getCalculationStatus())->color('warning')->dismissable();
$elements[] = $alert;
}
$title = Bootstrap::h(1, 'Welcome ' . ($this->getUser('first_name') === null ? $this->getUser('username') : $this->getUser('first_name')))->secondaryText('Your timezone is <a href="' . Url::href('profile') . '">' . $user['timezone'] . '</a>, ' . Timezone::date($user['timezone'], 'M dS, H:i:s'));
$elements[] = Bootstrap::row()->add(12, $title);
// last reports row
$row = Bootstrap::row();
$minutes = 15;
$panel = Bootstrap::panel("Reports per minute in last {$minutes} minutes", new Chart\RequestsPerSecond($minutes))->color('blue');
$row->add(4, $panel);
$panel = Bootstrap::panel("Problematic apps in last {$minutes} minutes", new Chart\ProblematicApps($minutes))->color('blue');
$row->add(4, $panel);
$panel = Bootstrap::panel("Problematic brands in last {$minutes} minutes", new Chart\ProblematicBrands($minutes))->color('blue');
$row->add(4, $panel);
$elements[] = $row;
// quick reports
$row = Bootstrap::row();
// quick links
$listGroup = Bootstrap::listGroup();
foreach (Menu::getReportLinks() as $url => $text) {
$listGroup->addLink($url, $text);
}
$row->add(4, Bootstrap::panel('Quick links', $listGroup));
// countries
$panel = Bootstrap::panel("Reports from countries in last {$minutes} minutes", new Chart\ProblematicCountries($minutes))->color('blue');
$row->add(4, $panel);
// OS versions
$panel = Bootstrap::panel("OS and version in last {$minutes} minutes", new Chart\ProblematicOsVersions($minutes))->color('blue');
$row->add(4, $panel);
$elements[] = $row;
$dashboardDaysCacheKey = "DashboardDays-last-10-days-offset-0min";
if (!$calculationInProgress || Cache::has($dashboardDaysCacheKey)) {
// dahsboard last 10 days
$row = Bootstrap::row();
$row->add(12, Bootstrap::panel('Number of crash reports in last 10 days', new Chart\DashboardDays(10))->color('blue'));
$elements[] = $row;
}
return View::create('base')->with('title', 'Dashboard')->with('content', $elements);
}
示例5: versionsAction
public function versionsAction()
{
$packageId = (int) Url::getVar('package_id');
if ($packageId <= 0) {
Application::throwError(400, 'Bad request');
}
$package = Package::fetchOne($packageId);
if ($package === false) {
Application::throwError(404, 'Can not find package');
}
$last = Url::getVar('last');
$title = 'Package versions for ' . $package->name;
$elements = array();
$elements[] = Bootstrap::row()->add(12, Bootstrap::h(1, $title));
$elements[] = Bootstrap::row()->add(12, Bootstrap::buttonGroup()->add(Bootstrap::anchor('Last 12 hours', Url::href('packages', 'versions', array('package_id' => $packageId, 'last' => '12-hour')))->asButton()->color($last == '12-hour' ? 'blue' : 'default'))->add(Bootstrap::anchor('Last day', Url::href('packages', 'versions', array('package_id' => $packageId, 'last' => 'day')))->asButton()->color($last == 'day' ? 'blue' : 'default'))->add(Bootstrap::anchor('Last week', Url::href('packages', 'versions', array('package_id' => $packageId, 'last' => 'week')))->asButton()->color($last == 'week' ? 'blue' : 'default'))->add(Bootstrap::anchor('Last 2 weeks', Url::href('packages', 'versions', array('package_id' => $packageId, 'last' => '2-weeks')))->asButton()->color($last == '2-weeks' ? 'blue' : 'default'))->add(Bootstrap::anchor('Last month', Url::href('packages', 'versions', array('package_id' => $packageId, 'last' => 'month')))->asButton()->color($last == 'month' ? 'blue' : 'default'))->add(Bootstrap::anchor('Last 2 months', Url::href('packages', 'versions', array('package_id' => $packageId, 'last' => '2-months')))->asButton()->color($last == '2-months' ? 'blue' : 'default'))->add(Bootstrap::anchor('All', Url::href('packages', 'versions', array('package_id' => $packageId)))->asButton()->color($last == null ? 'blue' : 'default'))->setAttribute('style', 'margin-bottom: 10px'));
$elements[] = BootstrapUI::tableRemote()->title('Most common versions')->column('total', 'count', 80)->column('name', 'package version')->column('action', '', 30)->sortableColumns(array('name', 'total'))->sortField('total', 'desc')->extraParam('package_id', $packageId)->extraParam('last', $last);
return View::create('base')->with('title', $title)->with('content', $elements);
}
示例6: addUserAction
/**
* Show the page to add new user
*/
public function addUserAction()
{
$title = 'Add new user';
$content = array(Bootstrap::row()->add(8, \Bootstrap::h(1, $title), 2));
$content[] = Bootstrap::row()->add(8, Bootstrap::panel('New user', $this->getUserForm())->color('blue'), 2);
return View::create('base')->with('title', $title)->with('content', $content);
}