private function showClientPortal()
{
$account = Auth::user()->account->load('country');
$css = $account->client_view_css ? $account->client_view_css : '';
if (Utils::isNinja() && $css) {
// Unescape the CSS for display purposes
$css = str_replace(['\\3C ', '\\3E ', '\\26 '], ['<', '>', '&'], $css);
}
$types = [GATEWAY_TYPE_CREDIT_CARD, GATEWAY_TYPE_BANK_TRANSFER, GATEWAY_TYPE_PAYPAL, GATEWAY_TYPE_BITCOIN, GATEWAY_TYPE_DWOLLA];
$options = [];
foreach ($types as $type) {
if ($account->getGatewayByType($type)) {
$options[$type] = trans("texts.{$type}");
}
}
$data = ['client_view_css' => $css, 'enable_portal_password' => $account->enable_portal_password, 'send_portal_password' => $account->send_portal_password, 'title' => trans('texts.client_portal'), 'section' => ACCOUNT_CLIENT_PORTAL, 'account' => $account, 'products' => Product::scope()->orderBy('product_key')->get(), 'gateway_types' => $options];
return View::make('accounts.client_portal', $data);
}