Add Shadow Panels to PhabricatorMultiColumnView
Summary: This adds the ability to have a multi-column full height container that is responsive based on PHUIBox's shadow box. Test Plan: Tested new examples in UIExamples and Workboards. Reviewers: epriestley, edward, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5996
This commit is contained in:
@@ -12,6 +12,8 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
||||
}
|
||||
|
||||
public function renderExample() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$column1 = phutil_tag(
|
||||
'div',
|
||||
@@ -63,17 +65,102 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
||||
->setFluidLayout(true)
|
||||
->setGutter(AphrontMultiColumnView::GUTTER_SMALL);
|
||||
|
||||
$sunday = hsprintf('<strong>Sunday</strong><br /><br />Watch Football'.
|
||||
'<br />Code<br />Eat<br />Sleep');
|
||||
|
||||
$monday = hsprintf('<strong>Monday</strong><br /><br />Code'.
|
||||
'<br />Eat<br />Sleep');
|
||||
|
||||
$tuesday = hsprintf('<strong>Tuesday</strong><br />'.
|
||||
'<br />Code<br />Eat<br />Sleep');
|
||||
|
||||
$wednesday = hsprintf('<strong>Wednesday</strong><br /><br />Code'.
|
||||
'<br />Eat<br />Sleep');
|
||||
|
||||
$thursday = hsprintf('<strong>Thursday</strong><br />'.
|
||||
'<br />Code<br />Eat<br />Sleep');
|
||||
|
||||
$friday = hsprintf('<strong>Friday</strong><br /><br />Code'.
|
||||
'<br />Eat<br />Sleep');
|
||||
|
||||
$saturday = hsprintf('<strong>Saturday</strong><br /><br />StarCraft II'.
|
||||
'<br />All<br />Damn<br />Day');
|
||||
|
||||
$head5 = id(new PhabricatorHeaderView())
|
||||
->setHeader(pht('7 Column Fluid'));
|
||||
$layout5 = id(new AphrontMultiColumnView())
|
||||
->addColumn('Sunday')
|
||||
->addColumn('Monday')
|
||||
->addColumn('Tuesday')
|
||||
->addColumn('Wednesday')
|
||||
->addColumn('Thursday')
|
||||
->addColumn('Friday')
|
||||
->addColumn('Saturday')
|
||||
->setFluidLayout(true);
|
||||
->addColumn($sunday)
|
||||
->addColumn($monday)
|
||||
->addColumn($tuesday)
|
||||
->addColumn($wednesday)
|
||||
->addColumn($thursday)
|
||||
->addColumn($friday)
|
||||
->addColumn($saturday)
|
||||
->setFluidLayout(true)
|
||||
->setShadow(true);
|
||||
|
||||
$shipping = id(new AphrontFormLayoutView())
|
||||
->setUser($user)
|
||||
->setFullWidth(true)
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Name')
|
||||
->setDisableAutocomplete(true)
|
||||
->setSigil('name-input'))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Address')
|
||||
->setDisableAutocomplete(true)
|
||||
->setSigil('address-input'))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('City/State')
|
||||
->setDisableAutocomplete(true)
|
||||
->setSigil('city-input'))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Country')
|
||||
->setDisableAutocomplete(true)
|
||||
->setSigil('country-input'))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Postal Code')
|
||||
->setDisableAutocomplete(true)
|
||||
->setSigil('postal-input'));
|
||||
|
||||
$cc = id(new AphrontFormLayoutView())
|
||||
->setUser($user)
|
||||
->setFullWidth(true)
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Card Number')
|
||||
->setDisableAutocomplete(true)
|
||||
->setSigil('number-input')
|
||||
->setError(''))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('CVC')
|
||||
->setDisableAutocomplete(true)
|
||||
->setSigil('cvc-input')
|
||||
->setError(''))
|
||||
->appendChild(
|
||||
id(new PhortuneMonthYearExpiryControl())
|
||||
->setLabel('Expiration')
|
||||
->setUser($user)
|
||||
->setError(''));
|
||||
|
||||
$shipping_title = pht('Shipping Address');
|
||||
$billing_title = pht('Billing Address');
|
||||
$cc_title = pht('Payment Information');
|
||||
|
||||
$head6 = id(new PhabricatorHeaderView())
|
||||
->setHeader(pht('Let\'s Go Shopping'));
|
||||
$layout6 = id(new AphrontMultiColumnView())
|
||||
->addColumn(hsprintf('<h1>%s</h1>%s', $shipping_title, $shipping))
|
||||
->addColumn(hsprintf('<h1>%s</h1>%s', $billing_title, $shipping))
|
||||
->addColumn(hsprintf('<h1>%s</h1>%s', $cc_title, $cc))
|
||||
->setFluidLayout(true)
|
||||
->setShadow(true);
|
||||
|
||||
$wrap1 = phutil_tag(
|
||||
'div',
|
||||
@@ -110,6 +197,13 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
||||
),
|
||||
$layout5);
|
||||
|
||||
$wrap6 = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'ml'
|
||||
),
|
||||
$layout6);
|
||||
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(),
|
||||
@@ -123,7 +217,9 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
|
||||
$head4,
|
||||
$wrap4,
|
||||
$head5,
|
||||
$wrap5
|
||||
$wrap5,
|
||||
$head6,
|
||||
$wrap6
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user