mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-25 06:50:55 +01:00
Update Phurl Edit page to new UI
Summary: Updates Phurl UI on Edit/Create Test Plan: Edit a Phurl, Create a Phurl. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15579
This commit is contained in:
parent
5a1990487d
commit
18e9e793c3
1 changed files with 18 additions and 8 deletions
|
@ -24,6 +24,7 @@ final class PhabricatorPhurlURLEditController
|
||||||
$viewer);
|
$viewer);
|
||||||
$submit_label = pht('Create');
|
$submit_label = pht('Create');
|
||||||
$page_title = pht('Shorten URL');
|
$page_title = pht('Shorten URL');
|
||||||
|
$header_icon = 'fa-plus-square';
|
||||||
$subscribers = array();
|
$subscribers = array();
|
||||||
$cancel_uri = $this->getApplicationURI();
|
$cancel_uri = $this->getApplicationURI();
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,7 +43,8 @@ final class PhabricatorPhurlURLEditController
|
||||||
}
|
}
|
||||||
|
|
||||||
$submit_label = pht('Update');
|
$submit_label = pht('Update');
|
||||||
$page_title = pht('Update URL');
|
$page_title = pht('Edit URL: %s', $url->getName());
|
||||||
|
$header_icon = 'fa-pencil';
|
||||||
|
|
||||||
$subscribers = PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
$subscribers = PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
||||||
$url->getPHID());
|
$url->getPHID());
|
||||||
|
@ -238,19 +240,27 @@ final class PhabricatorPhurlURLEditController
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs->addTextCrumb($page_title);
|
$crumbs->addTextCrumb($page_title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($page_title)
|
->setHeaderText(pht('URL'))
|
||||||
->setValidationException($validation_exception)
|
->setValidationException($validation_exception)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->appendChild($form);
|
->appendChild($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($page_title)
|
||||||
$crumbs,
|
->setHeaderIcon($header_icon);
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$object_box,
|
$object_box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $page_title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($page_title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue