mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Update Phortune for two column, spruce up UI
Summary: Moves everything I could find in Phortune to new UI layouts. Test Plan: Tested every page I could get two, unclear how to test subscriptions. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15513
This commit is contained in:
parent
e3f89279f9
commit
881785aba4
21 changed files with 473 additions and 244 deletions
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => 'a93de192',
|
'core.pkg.css' => 'befbf333',
|
||||||
'core.pkg.js' => '7d8faf57',
|
'core.pkg.js' => '7d8faf57',
|
||||||
'darkconsole.pkg.js' => 'e7393ebb',
|
'darkconsole.pkg.js' => 'e7393ebb',
|
||||||
'differential.pkg.css' => '7ba78475',
|
'differential.pkg.css' => '7ba78475',
|
||||||
|
@ -145,7 +145,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-info-view.css' => '28efab79',
|
'rsrc/css/phui/phui-info-view.css' => '28efab79',
|
||||||
'rsrc/css/phui/phui-list.css' => '9da2aa00',
|
'rsrc/css/phui/phui-list.css' => '9da2aa00',
|
||||||
'rsrc/css/phui/phui-object-box.css' => '6b487c57',
|
'rsrc/css/phui/phui-object-box.css' => '6b487c57',
|
||||||
'rsrc/css/phui/phui-object-item-list-view.css' => '18b2ce8e',
|
'rsrc/css/phui/phui-object-item-list-view.css' => '8d99e42b',
|
||||||
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
|
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
|
||||||
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
|
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
|
||||||
'rsrc/css/phui/phui-profile-menu.css' => '7e92a89a',
|
'rsrc/css/phui/phui-profile-menu.css' => '7e92a89a',
|
||||||
|
@ -156,7 +156,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-status.css' => '37309046',
|
'rsrc/css/phui/phui-status.css' => '37309046',
|
||||||
'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2',
|
'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2',
|
||||||
'rsrc/css/phui/phui-timeline-view.css' => 'a0173eba',
|
'rsrc/css/phui/phui-timeline-view.css' => 'a0173eba',
|
||||||
'rsrc/css/phui/phui-two-column-view.css' => '37d704f3',
|
'rsrc/css/phui/phui-two-column-view.css' => '9c43b599',
|
||||||
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7',
|
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7',
|
||||||
'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647',
|
'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647',
|
||||||
'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96',
|
'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96',
|
||||||
|
@ -834,7 +834,7 @@ return array(
|
||||||
'phui-inline-comment-view-css' => '5953c28e',
|
'phui-inline-comment-view-css' => '5953c28e',
|
||||||
'phui-list-view-css' => '9da2aa00',
|
'phui-list-view-css' => '9da2aa00',
|
||||||
'phui-object-box-css' => '6b487c57',
|
'phui-object-box-css' => '6b487c57',
|
||||||
'phui-object-item-list-view-css' => '18b2ce8e',
|
'phui-object-item-list-view-css' => '8d99e42b',
|
||||||
'phui-pager-css' => 'bea33d23',
|
'phui-pager-css' => 'bea33d23',
|
||||||
'phui-pinboard-view-css' => '2495140e',
|
'phui-pinboard-view-css' => '2495140e',
|
||||||
'phui-profile-menu-css' => '7e92a89a',
|
'phui-profile-menu-css' => '7e92a89a',
|
||||||
|
@ -846,7 +846,7 @@ return array(
|
||||||
'phui-tag-view-css' => '6bbd83e2',
|
'phui-tag-view-css' => '6bbd83e2',
|
||||||
'phui-theme-css' => '027ba77e',
|
'phui-theme-css' => '027ba77e',
|
||||||
'phui-timeline-view-css' => 'a0173eba',
|
'phui-timeline-view-css' => 'a0173eba',
|
||||||
'phui-two-column-view-css' => '37d704f3',
|
'phui-two-column-view-css' => '9c43b599',
|
||||||
'phui-workboard-color-css' => 'ac6fe6a7',
|
'phui-workboard-color-css' => 'ac6fe6a7',
|
||||||
'phui-workboard-view-css' => 'e6d89647',
|
'phui-workboard-view-css' => 'e6d89647',
|
||||||
'phui-workcard-view-css' => '3646fb96',
|
'phui-workcard-view-css' => '3646fb96',
|
||||||
|
|
|
@ -74,6 +74,7 @@ final class PhortuneAccountEditController extends PhortuneController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
if ($is_new) {
|
if ($is_new) {
|
||||||
$cancel_uri = $this->getApplicationURI('account/');
|
$cancel_uri = $this->getApplicationURI('account/');
|
||||||
|
@ -112,18 +113,25 @@ final class PhortuneAccountEditController extends PhortuneController {
|
||||||
->addCancelButton($cancel_uri));
|
->addCancelButton($cancel_uri));
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($title)
|
->setHeaderText(pht('Account'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setValidationException($validation_exception)
|
->setValidationException($validation_exception)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon('fa-pencil');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ final class PhortuneAccountListController extends PhortuneController {
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(pht('Accounts'));
|
$crumbs->addTextCrumb(pht('Accounts'));
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$payment_list = id(new PHUIObjectItemListView())
|
$payment_list = id(new PHUIObjectItemListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
@ -34,10 +35,11 @@ final class PhortuneAccountListController extends PhortuneController {
|
||||||
|
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setObjectName(pht('Account %d', $account->getID()))
|
->setSubhead(pht('Account %d', $account->getID()))
|
||||||
->setHeader($account->getName())
|
->setHeader($account->getName())
|
||||||
->setHref($this->getApplicationURI($account->getID().'/'))
|
->setHref($this->getApplicationURI($account->getID().'/'))
|
||||||
->setObject($account);
|
->setObject($account)
|
||||||
|
->setIcon('fa-credit-card');
|
||||||
|
|
||||||
$payment_list->addItem($item);
|
$payment_list->addItem($item);
|
||||||
}
|
}
|
||||||
|
@ -53,6 +55,7 @@ final class PhortuneAccountListController extends PhortuneController {
|
||||||
|
|
||||||
$payment_box = id(new PHUIObjectBoxView())
|
$payment_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($payment_header)
|
->setHeader($payment_header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setObjectList($payment_list);
|
->setObjectList($payment_list);
|
||||||
|
|
||||||
$merchant_list = id(new PHUIObjectItemListView())
|
$merchant_list = id(new PHUIObjectItemListView())
|
||||||
|
@ -64,10 +67,11 @@ final class PhortuneAccountListController extends PhortuneController {
|
||||||
|
|
||||||
foreach ($merchants as $merchant) {
|
foreach ($merchants as $merchant) {
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setObjectName(pht('Merchant %d', $merchant->getID()))
|
->setSubhead(pht('Merchant %d', $merchant->getID()))
|
||||||
->setHeader($merchant->getName())
|
->setHeader($merchant->getName())
|
||||||
->setHref($this->getApplicationURI('/merchant/'.$merchant->getID().'/'))
|
->setHref($this->getApplicationURI('/merchant/'.$merchant->getID().'/'))
|
||||||
->setObject($merchant);
|
->setObject($merchant)
|
||||||
|
->setIcon('fa-bank');
|
||||||
|
|
||||||
$merchant_list->addItem($item);
|
$merchant_list->addItem($item);
|
||||||
}
|
}
|
||||||
|
@ -83,17 +87,24 @@ final class PhortuneAccountListController extends PhortuneController {
|
||||||
|
|
||||||
$merchant_box = id(new PHUIObjectBoxView())
|
$merchant_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($merchant_header)
|
->setHeader($merchant_header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setObjectList($merchant_list);
|
->setObjectList($merchant_list);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader(pht('Accounts'));
|
||||||
$crumbs,
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$payment_box,
|
$payment_box,
|
||||||
$merchant_box,
|
$merchant_box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,15 +36,55 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$this->addAccountCrumb($crumbs, $account, $link = false);
|
$this->addAccountCrumb($crumbs, $account, $link = false);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($title);
|
->setHeader($title)
|
||||||
|
->setHeaderIcon('fa-credit-card');
|
||||||
|
|
||||||
|
$curtain = $this->buildCurtainView($account, $invoices);
|
||||||
|
$invoices = $this->buildInvoicesSection($account, $invoices);
|
||||||
|
$purchase_history = $this->buildPurchaseHistorySection($account);
|
||||||
|
$charge_history = $this->buildChargeHistorySection($account);
|
||||||
|
$subscriptions = $this->buildSubscriptionsSection($account);
|
||||||
|
$payment_methods = $this->buildPaymentMethodsSection($account);
|
||||||
|
|
||||||
|
$timeline = $this->buildTransactionTimeline(
|
||||||
|
$account,
|
||||||
|
new PhortuneAccountTransactionQuery());
|
||||||
|
$timeline->setShouldTerminate(true);
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setCurtain($curtain)
|
||||||
|
->setMainColumn(array(
|
||||||
|
$invoices,
|
||||||
|
$purchase_history,
|
||||||
|
$charge_history,
|
||||||
|
$subscriptions,
|
||||||
|
$payment_methods,
|
||||||
|
$timeline,
|
||||||
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function buildCurtainView(PhortuneAccount $account, $invoices) {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||||
|
$viewer,
|
||||||
|
$account,
|
||||||
|
PhabricatorPolicyCapability::CAN_EDIT);
|
||||||
|
|
||||||
$edit_uri = $this->getApplicationURI('account/edit/'.$account->getID().'/');
|
$edit_uri = $this->getApplicationURI('account/edit/'.$account->getID().'/');
|
||||||
|
|
||||||
$actions = id(new PhabricatorActionListView())
|
$curtain = $this->newCurtainView($account);
|
||||||
->setUser($viewer)
|
$curtain->addAction(
|
||||||
->addAction(
|
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Edit Account'))
|
->setName(pht('Edit Account'))
|
||||||
->setIcon('fa-pencil')
|
->setIcon('fa-pencil')
|
||||||
|
@ -52,14 +92,6 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
->setDisabled(!$can_edit)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow(!$can_edit));
|
->setWorkflow(!$can_edit));
|
||||||
|
|
||||||
$properties = id(new PHUIPropertyListView())
|
|
||||||
->setObject($account)
|
|
||||||
->setUser($viewer);
|
|
||||||
|
|
||||||
$properties->addProperty(
|
|
||||||
pht('Members'),
|
|
||||||
$viewer->renderHandleList($account->getMemberPHIDs()));
|
|
||||||
|
|
||||||
$status_items = $this->getStatusItemsForAccount($account, $invoices);
|
$status_items = $this->getStatusItemsForAccount($account, $invoices);
|
||||||
$status_view = new PHUIStatusListView();
|
$status_view = new PHUIStatusListView();
|
||||||
foreach ($status_items as $item) {
|
foreach ($status_items as $item) {
|
||||||
|
@ -72,46 +104,39 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
->setTarget(idx($item, 'target'))
|
->setTarget(idx($item, 'target'))
|
||||||
->setNote(idx($item, 'note')));
|
->setNote(idx($item, 'note')));
|
||||||
}
|
}
|
||||||
$properties->addProperty(
|
|
||||||
pht('Status'),
|
|
||||||
$status_view);
|
|
||||||
|
|
||||||
$properties->setActionList($actions);
|
$member_phids = $account->getMemberPHIDs();
|
||||||
|
$handles = $viewer->loadHandles($member_phids);
|
||||||
|
|
||||||
$invoices = $this->buildInvoicesSection($account, $invoices);
|
$member_list = id(new PHUIObjectItemListView())
|
||||||
$purchase_history = $this->buildPurchaseHistorySection($account);
|
->setSimple(true);
|
||||||
$charge_history = $this->buildChargeHistorySection($account);
|
|
||||||
$subscriptions = $this->buildSubscriptionsSection($account);
|
|
||||||
$payment_methods = $this->buildPaymentMethodsSection($account);
|
|
||||||
|
|
||||||
$timeline = $this->buildTransactionTimeline(
|
foreach ($member_phids as $member_phid) {
|
||||||
$account,
|
$image_uri = $handles[$member_phid]->getImageURI();
|
||||||
new PhortuneAccountTransactionQuery());
|
$image_href = $handles[$member_phid]->getURI();
|
||||||
$timeline->setShouldTerminate(true);
|
$person = $handles[$member_phid];
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$member = id(new PHUIObjectItemView())
|
||||||
->setHeader($header)
|
->setImageURI($image_uri)
|
||||||
->addPropertyList($properties);
|
->setHref($image_href)
|
||||||
|
->setHeader($person->getFullName());
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$member_list->addItem($member);
|
||||||
array(
|
}
|
||||||
$crumbs,
|
|
||||||
$object_box,
|
$curtain->newPanel()
|
||||||
$invoices,
|
->setHeaderText(pht('Status'))
|
||||||
$purchase_history,
|
->appendChild($status_view);
|
||||||
$charge_history,
|
|
||||||
$subscriptions,
|
$curtain->newPanel()
|
||||||
$payment_methods,
|
->setHeaderText(pht('Members'))
|
||||||
$timeline,
|
->appendChild($member_list);
|
||||||
),
|
|
||||||
array(
|
return $curtain;
|
||||||
'title' => $title,
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildPaymentMethodsSection(PhortuneAccount $account) {
|
private function buildPaymentMethodsSection(PhortuneAccount $account) {
|
||||||
$request = $this->getRequest();
|
$viewer = $this->getViewer();
|
||||||
$viewer = $request->getUser();
|
|
||||||
|
|
||||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||||
$viewer,
|
$viewer,
|
||||||
|
@ -179,6 +204,7 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setObjectList($list);
|
->setObjectList($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,8 +212,7 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
PhortuneAccount $account,
|
PhortuneAccount $account,
|
||||||
array $carts) {
|
array $carts) {
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$viewer = $this->getViewer();
|
||||||
$viewer = $request->getUser();
|
|
||||||
|
|
||||||
$phids = array();
|
$phids = array();
|
||||||
foreach ($carts as $cart) {
|
foreach ($carts as $cart) {
|
||||||
|
@ -211,12 +236,12 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($table);
|
->setTable($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildPurchaseHistorySection(PhortuneAccount $account) {
|
private function buildPurchaseHistorySection(PhortuneAccount $account) {
|
||||||
$request = $this->getRequest();
|
$viewer = $this->getViewer();
|
||||||
$viewer = $request->getUser();
|
|
||||||
|
|
||||||
$carts = id(new PhortuneCartQuery())
|
$carts = id(new PhortuneCartQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
|
@ -260,12 +285,12 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($table);
|
->setTable($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildChargeHistorySection(PhortuneAccount $account) {
|
private function buildChargeHistorySection(PhortuneAccount $account) {
|
||||||
$request = $this->getRequest();
|
$viewer = $this->getViewer();
|
||||||
$viewer = $request->getUser();
|
|
||||||
|
|
||||||
$charges = id(new PhortuneChargeQuery())
|
$charges = id(new PhortuneChargeQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
|
@ -302,12 +327,12 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($table);
|
->setTable($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildSubscriptionsSection(PhortuneAccount $account) {
|
private function buildSubscriptionsSection(PhortuneAccount $account) {
|
||||||
$request = $this->getRequest();
|
$viewer = $this->getViewer();
|
||||||
$viewer = $request->getUser();
|
|
||||||
|
|
||||||
$subscriptions = id(new PhortuneSubscriptionQuery())
|
$subscriptions = id(new PhortuneSubscriptionQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
|
@ -338,6 +363,7 @@ final class PhortuneAccountViewController extends PhortuneController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($table);
|
->setTable($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ final class PhortuneCartCheckoutController
|
||||||
$cart_box = id(new PHUIObjectBoxView())
|
$cart_box = id(new PHUIObjectBoxView())
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
->setHeaderText(pht('Cart Contents'))
|
->setHeaderText(pht('Cart Contents'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($cart_table);
|
->setTable($cart_table);
|
||||||
|
|
||||||
$title = $cart->getName();
|
$title = $cart->getName();
|
||||||
|
@ -200,6 +201,7 @@ final class PhortuneCartCheckoutController
|
||||||
|
|
||||||
$payment_box = id(new PHUIObjectBoxView())
|
$payment_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Choose Payment Method'))
|
->setHeaderText(pht('Choose Payment Method'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->appendChild($form)
|
->appendChild($form)
|
||||||
->appendChild($provider_form);
|
->appendChild($provider_form);
|
||||||
|
|
||||||
|
@ -208,17 +210,24 @@ final class PhortuneCartCheckoutController
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(pht('Checkout'));
|
$crumbs->addTextCrumb(pht('Checkout'));
|
||||||
$crumbs->addTextCrumb($title);
|
$crumbs->addTextCrumb($title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon('fa-shopping-cart');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$cart_box,
|
$cart_box,
|
||||||
$description_box,
|
$description_box,
|
||||||
$payment_box,
|
$payment_box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@ abstract class PhortuneCartController
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Description'))
|
->setHeaderText(pht('Description'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->appendChild($box);
|
->appendChild($box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,22 +108,28 @@ final class PhortuneCartViewController
|
||||||
break;
|
break;
|
||||||
case PhortuneCart::STATUS_PURCHASED:
|
case PhortuneCart::STATUS_PURCHASED:
|
||||||
$error_view = id(new PHUIInfoView())
|
$error_view = id(new PHUIInfoView())
|
||||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
->setSeverity(PHUIInfoView::SEVERITY_SUCCESS)
|
||||||
->appendChild(pht('This purchase has been completed.'));
|
->appendChild(pht('This purchase has been completed.'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$properties = $this->buildPropertyListView($cart);
|
if ($errors) {
|
||||||
$actions = $this->buildActionListView(
|
$error_view = id(new PHUIInfoView())
|
||||||
|
->setSeverity(PHUIInfoView::SEVERITY_WARNING)
|
||||||
|
->appendChild($errors);
|
||||||
|
}
|
||||||
|
|
||||||
|
$details = $this->buildDetailsView($cart);
|
||||||
|
$curtain = $this->buildCurtainView(
|
||||||
$cart,
|
$cart,
|
||||||
$can_edit,
|
$can_edit,
|
||||||
$authority,
|
$authority,
|
||||||
$resume_uri);
|
$resume_uri);
|
||||||
$properties->setActionList($actions);
|
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setHeader(pht('Order Detail'));
|
->setHeader(pht('Order Detail'))
|
||||||
|
->setHeaderIcon('fa-shopping-cart');
|
||||||
|
|
||||||
if ($cart->getStatus() == PhortuneCart::STATUS_PURCHASED) {
|
if ($cart->getStatus() == PhortuneCart::STATUS_PURCHASED) {
|
||||||
$done_uri = $cart->getDoneURI();
|
$done_uri = $cart->getDoneURI();
|
||||||
|
@ -138,16 +144,10 @@ final class PhortuneCartViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
$cart_box = id(new PHUIObjectBoxView())
|
$cart_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeaderText(pht('Cart Items'))
|
||||||
->addPropertyList($properties)
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($cart_table);
|
->setTable($cart_table);
|
||||||
|
|
||||||
if ($errors) {
|
|
||||||
$cart_box->setFormErrors($errors);
|
|
||||||
} else if ($error_view) {
|
|
||||||
$cart_box->setInfoView($error_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
$description = $this->renderCartDescription($cart);
|
$description = $this->renderCartDescription($cart);
|
||||||
|
|
||||||
$charges = id(new PhortuneChargeQuery())
|
$charges = id(new PhortuneChargeQuery())
|
||||||
|
@ -173,6 +173,7 @@ final class PhortuneCartViewController
|
||||||
|
|
||||||
$charges = id(new PHUIObjectBoxView())
|
$charges = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Charges'))
|
->setHeaderText(pht('Charges'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($charges_table);
|
->setTable($charges_table);
|
||||||
|
|
||||||
$account = $cart->getAccount();
|
$account = $cart->getAccount();
|
||||||
|
@ -184,6 +185,7 @@ final class PhortuneCartViewController
|
||||||
$this->addAccountCrumb($crumbs, $cart->getAccount());
|
$this->addAccountCrumb($crumbs, $cart->getAccount());
|
||||||
}
|
}
|
||||||
$crumbs->addTextCrumb(pht('Cart %d', $cart->getID()));
|
$crumbs->addTextCrumb(pht('Cart %d', $cart->getID()));
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$timeline = $this->buildTransactionTimeline(
|
$timeline = $this->buildTransactionTimeline(
|
||||||
$cart,
|
$cart,
|
||||||
|
@ -191,23 +193,28 @@ final class PhortuneCartViewController
|
||||||
$timeline
|
$timeline
|
||||||
->setShouldTerminate(true);
|
->setShouldTerminate(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setCurtain($curtain)
|
||||||
|
->setMainColumn(array(
|
||||||
|
$error_view,
|
||||||
|
$details,
|
||||||
$cart_box,
|
$cart_box,
|
||||||
$description,
|
$description,
|
||||||
$charges,
|
$charges,
|
||||||
$timeline,
|
$timeline,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => pht('Cart'),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle(pht('Cart %d', $cart->getID()))
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildPropertyListView(PhortuneCart $cart) {
|
private function buildDetailsView(PhortuneCart $cart) {
|
||||||
|
|
||||||
$viewer = $this->getRequest()->getUser();
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
$view = id(new PHUIPropertyListView())
|
$view = id(new PHUIPropertyListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
@ -239,21 +246,21 @@ final class PhortuneCartViewController
|
||||||
pht('Updated'),
|
pht('Updated'),
|
||||||
phabricator_datetime($cart->getDateModified(), $viewer));
|
phabricator_datetime($cart->getDateModified(), $viewer));
|
||||||
|
|
||||||
return $view;
|
return id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText(pht('Details'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildActionListView(
|
private function buildCurtainView(
|
||||||
PhortuneCart $cart,
|
PhortuneCart $cart,
|
||||||
$can_edit,
|
$can_edit,
|
||||||
$authority,
|
$authority,
|
||||||
$resume_uri) {
|
$resume_uri) {
|
||||||
|
|
||||||
$viewer = $this->getRequest()->getUser();
|
$viewer = $this->getViewer();
|
||||||
$id = $cart->getID();
|
$id = $cart->getID();
|
||||||
|
$curtain = $this->newCurtainView($cart);
|
||||||
$view = id(new PhabricatorActionListView())
|
|
||||||
->setUser($viewer)
|
|
||||||
->setObject($cart);
|
|
||||||
|
|
||||||
$can_cancel = ($can_edit && $cart->canCancelOrder());
|
$can_cancel = ($can_edit && $cart->canCancelOrder());
|
||||||
|
|
||||||
|
@ -269,7 +276,7 @@ final class PhortuneCartViewController
|
||||||
$accept_uri = $this->getApplicationURI("{$prefix}cart/{$id}/accept/");
|
$accept_uri = $this->getApplicationURI("{$prefix}cart/{$id}/accept/");
|
||||||
$print_uri = $this->getApplicationURI("{$prefix}cart/{$id}/?__print__=1");
|
$print_uri = $this->getApplicationURI("{$prefix}cart/{$id}/?__print__=1");
|
||||||
|
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Cancel Order'))
|
->setName(pht('Cancel Order'))
|
||||||
->setIcon('fa-times')
|
->setIcon('fa-times')
|
||||||
|
@ -279,7 +286,7 @@ final class PhortuneCartViewController
|
||||||
|
|
||||||
if ($authority) {
|
if ($authority) {
|
||||||
if ($cart->getStatus() == PhortuneCart::STATUS_REVIEW) {
|
if ($cart->getStatus() == PhortuneCart::STATUS_REVIEW) {
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Accept Order'))
|
->setName(pht('Accept Order'))
|
||||||
->setIcon('fa-check')
|
->setIcon('fa-check')
|
||||||
|
@ -287,7 +294,7 @@ final class PhortuneCartViewController
|
||||||
->setHref($accept_uri));
|
->setHref($accept_uri));
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Refund Order'))
|
->setName(pht('Refund Order'))
|
||||||
->setIcon('fa-reply')
|
->setIcon('fa-reply')
|
||||||
|
@ -295,28 +302,28 @@ final class PhortuneCartViewController
|
||||||
->setHref($refund_uri));
|
->setHref($refund_uri));
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Update Status'))
|
->setName(pht('Update Status'))
|
||||||
->setIcon('fa-refresh')
|
->setIcon('fa-refresh')
|
||||||
->setHref($update_uri));
|
->setHref($update_uri));
|
||||||
|
|
||||||
if ($can_edit && $resume_uri) {
|
if ($can_edit && $resume_uri) {
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Continue Checkout'))
|
->setName(pht('Continue Checkout'))
|
||||||
->setIcon('fa-shopping-cart')
|
->setIcon('fa-shopping-cart')
|
||||||
->setHref($resume_uri));
|
->setHref($resume_uri));
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Printable Version'))
|
->setName(pht('Printable Version'))
|
||||||
->setHref($print_uri)
|
->setHref($print_uri)
|
||||||
->setOpenInNewWindow(true)
|
->setOpenInNewWindow(true)
|
||||||
->setIcon('fa-print'));
|
->setIcon('fa-print'));
|
||||||
|
|
||||||
return $view;
|
return $curtain;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,29 +145,39 @@ final class PhortuneMerchantEditController
|
||||||
->setValue($button_text)
|
->setValue($button_text)
|
||||||
->addCancelButton($cancel_uri));
|
->addCancelButton($cancel_uri));
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
if ($is_new) {
|
if ($is_new) {
|
||||||
$crumbs->addTextCrumb(pht('Create Merchant'));
|
$crumbs->addTextCrumb(pht('Create Merchant'));
|
||||||
|
$header->setHeaderIcon('fa-plus-square');
|
||||||
} else {
|
} else {
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
pht('Merchant %d', $merchant->getID()),
|
pht('Merchant %d', $merchant->getID()),
|
||||||
$this->getApplicationURI('/merchant/'.$merchant->getID().'/'));
|
$this->getApplicationURI('/merchant/'.$merchant->getID().'/'));
|
||||||
$crumbs->addTextCrumb(pht('Edit'));
|
$crumbs->addTextCrumb(pht('Edit'));
|
||||||
|
$header->setHeaderIcon('fa-pencil');
|
||||||
}
|
}
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText(pht('Merchant'))
|
||||||
->setValidationException($validation_exception)
|
->setValidationException($validation_exception)
|
||||||
->setHeaderText($title)
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ final class PhortuneMerchantInvoiceCreateController
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($merchant->getName());
|
$crumbs->addTextCrumb($merchant->getName());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$v_title = $request->getStr('title');
|
$v_title = $request->getStr('title');
|
||||||
$e_title = true;
|
$e_title = true;
|
||||||
|
@ -229,18 +230,25 @@ final class PhortuneMerchantInvoiceCreateController
|
||||||
->setValue(pht('Send Invoice')));
|
->setValue(pht('Send Invoice')));
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('New Invoice'))
|
->setHeaderText(pht('Details'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon('fa-plus-square');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ final class PhortuneMerchantViewController
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($merchant->getName());
|
$crumbs->addTextCrumb($merchant->getName());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$title = pht(
|
$title = pht(
|
||||||
'Merchant %d %s',
|
'Merchant %d %s',
|
||||||
|
@ -26,43 +27,44 @@ final class PhortuneMerchantViewController
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($merchant->getName())
|
->setHeader($merchant->getName())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setPolicyObject($merchant);
|
->setPolicyObject($merchant)
|
||||||
|
->setHeaderIcon('fa-bank');
|
||||||
|
|
||||||
$providers = id(new PhortunePaymentProviderConfigQuery())
|
$providers = id(new PhortunePaymentProviderConfigQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withMerchantPHIDs(array($merchant->getPHID()))
|
->withMerchantPHIDs(array($merchant->getPHID()))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$properties = $this->buildPropertyListView($merchant, $providers);
|
$details = $this->buildDetailsView($merchant, $providers);
|
||||||
$actions = $this->buildActionListView($merchant);
|
$description = $this->buildDescriptionView($merchant);
|
||||||
$properties->setActionList($actions);
|
$curtain = $this->buildCurtainView($merchant);
|
||||||
|
|
||||||
$provider_list = $this->buildProviderList(
|
$provider_list = $this->buildProviderList(
|
||||||
$merchant,
|
$merchant,
|
||||||
$providers);
|
$providers);
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
|
||||||
->setHeader($header)
|
|
||||||
->addPropertyList($properties);
|
|
||||||
|
|
||||||
$timeline = $this->buildTransactionTimeline(
|
$timeline = $this->buildTransactionTimeline(
|
||||||
$merchant,
|
$merchant,
|
||||||
new PhortuneMerchantTransactionQuery());
|
new PhortuneMerchantTransactionQuery());
|
||||||
$timeline->setShouldTerminate(true);
|
$timeline->setShouldTerminate(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setCurtain($curtain)
|
||||||
$box,
|
->setMainColumn(array(
|
||||||
|
$details,
|
||||||
|
$description,
|
||||||
$provider_list,
|
$provider_list,
|
||||||
$timeline,
|
$timeline,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildPropertyListView(
|
private function buildDetailsView(
|
||||||
PhortuneMerchant $merchant,
|
PhortuneMerchant $merchant,
|
||||||
array $providers) {
|
array $providers) {
|
||||||
|
|
||||||
|
@ -128,24 +130,31 @@ final class PhortuneMerchantViewController
|
||||||
|
|
||||||
$view->addProperty(pht('Status'), $status_view);
|
$view->addProperty(pht('Status'), $status_view);
|
||||||
|
|
||||||
$view->addProperty(
|
return id(new PHUIObjectBoxView())
|
||||||
pht('Members'),
|
->setHeaderText(pht('DETAILS'))
|
||||||
$viewer->renderHandleList($merchant->getMemberPHIDs()));
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->appendChild($view);
|
||||||
|
}
|
||||||
|
|
||||||
$view->invokeWillRenderEvent();
|
private function buildDescriptionView(PhortuneMerchant $merchant) {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$view = id(new PHUIPropertyListView())
|
||||||
|
->setUser($viewer);
|
||||||
|
|
||||||
$description = $merchant->getDescription();
|
$description = $merchant->getDescription();
|
||||||
if (strlen($description)) {
|
if (strlen($description)) {
|
||||||
$description = new PHUIRemarkupView($viewer, $description);
|
$description = new PHUIRemarkupView($viewer, $description);
|
||||||
$view->addSectionHeader(
|
|
||||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
|
||||||
$view->addTextContent($description);
|
$view->addTextContent($description);
|
||||||
|
return id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText(pht('DESCRIPTION'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $view;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildActionListView(PhortuneMerchant $merchant) {
|
private function buildCurtainView(PhortuneMerchant $merchant) {
|
||||||
$viewer = $this->getRequest()->getUser();
|
$viewer = $this->getRequest()->getUser();
|
||||||
$id = $merchant->getID();
|
$id = $merchant->getID();
|
||||||
|
|
||||||
|
@ -154,11 +163,9 @@ final class PhortuneMerchantViewController
|
||||||
$merchant,
|
$merchant,
|
||||||
PhabricatorPolicyCapability::CAN_EDIT);
|
PhabricatorPolicyCapability::CAN_EDIT);
|
||||||
|
|
||||||
$view = id(new PhabricatorActionListView())
|
$curtain = $this->newCurtainView($merchant);
|
||||||
->setUser($viewer)
|
|
||||||
->setObject($merchant);
|
|
||||||
|
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('Edit Merchant'))
|
->setName(pht('Edit Merchant'))
|
||||||
->setIcon('fa-pencil')
|
->setIcon('fa-pencil')
|
||||||
|
@ -166,7 +173,7 @@ final class PhortuneMerchantViewController
|
||||||
->setWorkflow(!$can_edit)
|
->setWorkflow(!$can_edit)
|
||||||
->setHref($this->getApplicationURI("merchant/edit/{$id}/")));
|
->setHref($this->getApplicationURI("merchant/edit/{$id}/")));
|
||||||
|
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('View Orders'))
|
->setName(pht('View Orders'))
|
||||||
->setIcon('fa-shopping-cart')
|
->setIcon('fa-shopping-cart')
|
||||||
|
@ -174,7 +181,7 @@ final class PhortuneMerchantViewController
|
||||||
->setDisabled(!$can_edit)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow(!$can_edit));
|
->setWorkflow(!$can_edit));
|
||||||
|
|
||||||
$view->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('View Subscriptions'))
|
->setName(pht('View Subscriptions'))
|
||||||
->setIcon('fa-moon-o')
|
->setIcon('fa-moon-o')
|
||||||
|
@ -182,8 +189,7 @@ final class PhortuneMerchantViewController
|
||||||
->setDisabled(!$can_edit)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow(!$can_edit));
|
->setWorkflow(!$can_edit));
|
||||||
|
|
||||||
|
$curtain->addAction(
|
||||||
$view->addAction(
|
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setName(pht('New Invoice'))
|
->setName(pht('New Invoice'))
|
||||||
->setIcon('fa-fax')
|
->setIcon('fa-fax')
|
||||||
|
@ -191,7 +197,30 @@ final class PhortuneMerchantViewController
|
||||||
->setDisabled(!$can_edit)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow(!$can_edit));
|
->setWorkflow(!$can_edit));
|
||||||
|
|
||||||
return $view;
|
$member_phids = $merchant->getMemberPHIDs();
|
||||||
|
$handles = $viewer->loadHandles($member_phids);
|
||||||
|
|
||||||
|
$member_list = id(new PHUIObjectItemListView())
|
||||||
|
->setSimple(true);
|
||||||
|
|
||||||
|
foreach ($member_phids as $member_phid) {
|
||||||
|
$image_uri = $handles[$member_phid]->getImageURI();
|
||||||
|
$image_href = $handles[$member_phid]->getURI();
|
||||||
|
$person = $handles[$member_phid];
|
||||||
|
|
||||||
|
$member = id(new PHUIObjectItemView())
|
||||||
|
->setImageURI($image_uri)
|
||||||
|
->setHref($image_href)
|
||||||
|
->setHeader($person->getFullName());
|
||||||
|
|
||||||
|
$member_list->addItem($member);
|
||||||
|
}
|
||||||
|
|
||||||
|
$curtain->newPanel()
|
||||||
|
->setHeaderText(pht('Members'))
|
||||||
|
->appendChild($member_list);
|
||||||
|
|
||||||
|
return $curtain;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildProviderList(
|
private function buildProviderList(
|
||||||
|
@ -283,6 +312,7 @@ final class PhortuneMerchantViewController
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setObjectList($provider_list);
|
->setObjectList($provider_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,20 +158,29 @@ final class PhortunePaymentMethodCreateController
|
||||||
->addCancelButton($cancel_uri));
|
->addCancelButton($cancel_uri));
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($provider->getPaymentMethodDescription())
|
->setHeaderText(pht('Method'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(pht('Add Payment Method'));
|
$crumbs->addTextCrumb(pht('Add Payment Method'));
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader(pht('Add Payment Method'))
|
||||||
$crumbs,
|
->setHeaderIcon('fa-plus-square');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $provider->getPaymentMethodDescription(),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($provider->getPaymentMethodDescription())
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderSelectProvider(
|
private function renderSelectProvider(
|
||||||
|
|
|
@ -58,22 +58,31 @@ final class PhortunePaymentMethodEditController
|
||||||
->setValue(pht('Save Changes')));
|
->setValue(pht('Save Changes')));
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Edit Payment Method'))
|
->setHeaderText(pht('Payment Method'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($account->getName(), $account_uri);
|
$crumbs->addTextCrumb($account->getName(), $account_uri);
|
||||||
$crumbs->addTextCrumb($method->getDisplayName());
|
$crumbs->addTextCrumb($method->getDisplayName());
|
||||||
$crumbs->addTextCrumb(pht('Edit'));
|
$crumbs->addTextCrumb(pht('Edit'));
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader(pht('Edit Payment Method'))
|
||||||
$crumbs,
|
->setHeaderIcon('fa-pencil');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => pht('Edit Payment Method'),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle(pht('Edit Payment Method'))
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ final class PhortuneProductListController extends PhabricatorController {
|
||||||
->setName(pht('Create Product'))
|
->setName(pht('Create Product'))
|
||||||
->setHref($this->getApplicationURI('product/edit/'))
|
->setHref($this->getApplicationURI('product/edit/'))
|
||||||
->setIcon('fa-plus-square'));
|
->setIcon('fa-plus-square'));
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$product_list = id(new PHUIObjectItemListView())
|
$product_list = id(new PHUIObjectItemListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
@ -39,20 +40,33 @@ final class PhortuneProductListController extends PhabricatorController {
|
||||||
->setObjectName($product->getID())
|
->setObjectName($product->getID())
|
||||||
->setHeader($product->getProductName())
|
->setHeader($product->getProductName())
|
||||||
->setHref($view_uri)
|
->setHref($view_uri)
|
||||||
->addAttribute($price->formatForDisplay());
|
->addAttribute($price->formatForDisplay())
|
||||||
|
->setIcon('fa-gift');
|
||||||
|
|
||||||
$product_list->addItem($item);
|
$product_list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$box = id(new PHUIObjectBoxView())
|
||||||
array(
|
->setHeaderText(pht('Products'))
|
||||||
$crumbs,
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
$product_list,
|
->setObjectList($product_list);
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader(pht('Products'))
|
||||||
|
->setHeaderIcon('fa-gift');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
|
$box,
|
||||||
$pager,
|
$pager,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,11 @@ final class PhortuneProductViewController extends PhortuneController {
|
||||||
$title = pht('Product: %s', $product->getProductName());
|
$title = pht('Product: %s', $product->getProductName());
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($product->getProductName());
|
->setHeader($product->getProductName())
|
||||||
|
->setHeaderIcon('fa-gift');
|
||||||
|
|
||||||
$edit_uri = $this->getApplicationURI('product/edit/'.$product->getID().'/');
|
$edit_uri = $this->getApplicationURI('product/edit/'.$product->getID().'/');
|
||||||
|
|
||||||
$actions = id(new PhabricatorActionListView())
|
|
||||||
->setUser($viewer);
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
pht('Products'),
|
pht('Products'),
|
||||||
|
@ -31,26 +29,30 @@ final class PhortuneProductViewController extends PhortuneController {
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
pht('#%d', $product->getID()),
|
pht('#%d', $product->getID()),
|
||||||
$request->getRequestURI());
|
$request->getRequestURI());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$properties = id(new PHUIPropertyListView())
|
$properties = id(new PHUIPropertyListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setActionList($actions)
|
|
||||||
->addProperty(
|
->addProperty(
|
||||||
pht('Price'),
|
pht('Price'),
|
||||||
$product->getPriceAsCurrency()->formatForDisplay());
|
$product->getPriceAsCurrency()->formatForDisplay());
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeaderText(pht('DETAILS'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->addPropertyList($properties);
|
->addPropertyList($properties);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setFooter(array(
|
||||||
$object_box,
|
$object_box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,7 @@ final class PhortuneProviderEditController
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($merchant->getName(), $cancel_uri);
|
$crumbs->addTextCrumb($merchant->getName(), $cancel_uri);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
if ($is_new) {
|
if ($is_new) {
|
||||||
$crumbs->addTextCrumb(pht('Add Provider'));
|
$crumbs->addTextCrumb(pht('Add Provider'));
|
||||||
|
@ -185,19 +186,27 @@ final class PhortuneProviderEditController
|
||||||
pht('Edit Provider %d', $provider_config->getID()));
|
pht('Edit Provider %d', $provider_config->getID()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setHeaderIcon('fa-pencil');
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
->setHeaderText($title)
|
->setHeaderText(pht('Properties'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->appendChild($form);
|
->appendChild($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function processChooseClassRequest(
|
private function processChooseClassRequest(
|
||||||
|
@ -266,20 +275,28 @@ final class PhortuneProviderEditController
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($merchant->getName(), $cancel_uri);
|
$crumbs->addTextCrumb($merchant->getName(), $cancel_uri);
|
||||||
$crumbs->addTextCrumb($title);
|
$crumbs->addTextCrumb($title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($title)
|
->setHeaderText(pht('Provider'))
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon('fa-plus-square');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,18 +140,26 @@ final class PhortuneSubscriptionEditController extends PhortuneController {
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setHeaderText(pht('Edit %s', $subscription->getSubscriptionName()))
|
->setHeaderText(pht('Subscription'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
->appendChild($form);
|
->appendChild($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader(pht('Edit %s', $subscription->getSubscriptionName()))
|
||||||
$crumbs,
|
->setHeaderIcon('fa-pencil');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$box,
|
$box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,14 +35,13 @@ final class PhortuneSubscriptionViewController extends PhortuneController {
|
||||||
$title = $subscription->getSubscriptionFullName();
|
$title = $subscription->getSubscriptionFullName();
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($title);
|
->setHeader($title)
|
||||||
|
->setHeaderIcon('fa-calendar-o');
|
||||||
$actions = id(new PhabricatorActionListView())
|
|
||||||
->setUser($viewer);
|
|
||||||
|
|
||||||
|
$curtain = $this->newCurtainView($subscription);
|
||||||
$edit_uri = $subscription->getEditURI();
|
$edit_uri = $subscription->getEditURI();
|
||||||
|
|
||||||
$actions->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setIcon('fa-pencil')
|
->setIcon('fa-pencil')
|
||||||
->setName(pht('Edit Subscription'))
|
->setName(pht('Edit Subscription'))
|
||||||
|
@ -50,7 +49,6 @@ final class PhortuneSubscriptionViewController extends PhortuneController {
|
||||||
->setDisabled(!$can_edit)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow(!$can_edit));
|
->setWorkflow(!$can_edit));
|
||||||
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
if ($authority) {
|
if ($authority) {
|
||||||
$this->addMerchantCrumb($crumbs, $merchant);
|
$this->addMerchantCrumb($crumbs, $merchant);
|
||||||
|
@ -58,10 +56,10 @@ final class PhortuneSubscriptionViewController extends PhortuneController {
|
||||||
$this->addAccountCrumb($crumbs, $account);
|
$this->addAccountCrumb($crumbs, $account);
|
||||||
}
|
}
|
||||||
$crumbs->addTextCrumb($subscription->getSubscriptionCrumbName());
|
$crumbs->addTextCrumb($subscription->getSubscriptionCrumbName());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$properties = id(new PHUIPropertyListView())
|
$properties = id(new PHUIPropertyListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer);
|
||||||
->setActionList($actions);
|
|
||||||
|
|
||||||
$next_invoice = $subscription->getTrigger()->getNextEventPrediction();
|
$next_invoice = $subscription->getTrigger()->getNextEventPrediction();
|
||||||
$properties->addProperty(
|
$properties->addProperty(
|
||||||
|
@ -83,23 +81,27 @@ final class PhortuneSubscriptionViewController extends PhortuneController {
|
||||||
pht('Autopay With'),
|
pht('Autopay With'),
|
||||||
$autopay_method);
|
$autopay_method);
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$details = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeaderText(pht('DETAILS'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->addPropertyList($properties);
|
->addPropertyList($properties);
|
||||||
|
|
||||||
$due_box = $this->buildDueInvoices($subscription, $authority);
|
$due_box = $this->buildDueInvoices($subscription, $authority);
|
||||||
$invoice_box = $this->buildPastInvoices($subscription, $authority);
|
$invoice_box = $this->buildPastInvoices($subscription, $authority);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setCurtain($curtain)
|
||||||
$object_box,
|
->setMainColumn(array(
|
||||||
|
$details,
|
||||||
$due_box,
|
$due_box,
|
||||||
$invoice_box,
|
$invoice_box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildDueInvoices(
|
private function buildDueInvoices(
|
||||||
|
@ -136,6 +138,7 @@ final class PhortuneSubscriptionViewController extends PhortuneController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($invoice_header)
|
->setHeader($invoice_header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->appendChild($invoice_table);
|
->appendChild($invoice_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,6 +202,7 @@ final class PhortuneSubscriptionViewController extends PhortuneController {
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
return id(new PHUIObjectBoxView())
|
||||||
->setHeader($invoice_header)
|
->setHeader($invoice_header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->appendChild($invoice_table);
|
->appendChild($invoice_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,10 +70,11 @@ final class PhortuneMerchantSearchEngine
|
||||||
$list->setUser($viewer);
|
$list->setUser($viewer);
|
||||||
foreach ($merchants as $merchant) {
|
foreach ($merchants as $merchant) {
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setObjectName(pht('Merchant %d', $merchant->getID()))
|
->setSubhead(pht('Merchant %d', $merchant->getID()))
|
||||||
->setHeader($merchant->getName())
|
->setHeader($merchant->getName())
|
||||||
->setHref('/phortune/merchant/'.$merchant->getID().'/')
|
->setHref('/phortune/merchant/'.$merchant->getID().'/')
|
||||||
->setObject($merchant);
|
->setObject($merchant)
|
||||||
|
->setIcon('fa-bank');
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ final class PHUIObjectItemListView extends AphrontTagView {
|
||||||
private $pager;
|
private $pager;
|
||||||
private $noDataString;
|
private $noDataString;
|
||||||
private $flush;
|
private $flush;
|
||||||
|
private $simple;
|
||||||
private $allowEmptyList;
|
private $allowEmptyList;
|
||||||
private $states;
|
private $states;
|
||||||
private $itemClass = 'phui-object-item-standard';
|
private $itemClass = 'phui-object-item-standard';
|
||||||
|
@ -35,6 +36,11 @@ final class PHUIObjectItemListView extends AphrontTagView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setSimple($simple) {
|
||||||
|
$this->simple = $simple;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setNoDataString($no_data_string) {
|
public function setNoDataString($no_data_string) {
|
||||||
$this->noDataString = $no_data_string;
|
$this->noDataString = $no_data_string;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -69,6 +75,9 @@ final class PHUIObjectItemListView extends AphrontTagView {
|
||||||
if ($this->flush) {
|
if ($this->flush) {
|
||||||
$classes[] = 'phui-object-list-flush';
|
$classes[] = 'phui-object-list-flush';
|
||||||
}
|
}
|
||||||
|
if ($this->simple) {
|
||||||
|
$classes[] = 'phui-object-list-simple';
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'class' => $classes,
|
'class' => $classes,
|
||||||
|
|
|
@ -782,3 +782,44 @@ ul.phui-object-item-list-view .phui-object-item-selected
|
||||||
padding: 0 8px 8px;
|
padding: 0 8px 8px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* - Simple List------------------------------------------------------------- */
|
||||||
|
|
||||||
|
.phui-object-list-simple .phui-object-item-with-image .phui-object-item-frame {
|
||||||
|
min-height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-object-list-simple .phui-object-item-image {
|
||||||
|
height: 26px;
|
||||||
|
width: 26px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-object-list-simple .phui-object-item-with-image
|
||||||
|
.phui-object-item-content-box {
|
||||||
|
margin-left: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-object-list-simple .phui-object-item-name {
|
||||||
|
padding: 2px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-object-list-simple .phui-object-item-name a {
|
||||||
|
color: {$darkbluetext};
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-object-item-list-view.phui-object-list-simple .phui-object-item-frame {
|
||||||
|
border: none;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-object-item-list-view.phui-object-list-simple li:last-child
|
||||||
|
.phui-object-item-frame {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-object-list-simple .phui-object-item-actions {
|
||||||
|
top: 2px;
|
||||||
|
bottom: 2px;
|
||||||
|
right: 2px;
|
||||||
|
}
|
||||||
|
|
|
@ -197,3 +197,8 @@
|
||||||
.phui-info-view {
|
.phui-info-view {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phui-two-column-view .phui-box-blue-property
|
||||||
|
.phui-header-shell + .phui-info-view {
|
||||||
|
margin: 16px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue