1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Shuffle project information around on detail page

Summary:
Ref T4007. Fixes T4009. Ref T4008.

  - Move blurb to a text section.
  - Make it render as remarkup.
  - Put policy information and status information in header.

Test Plan: See screenshot.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T4009, T4007, T4008

Differential Revision: https://secure.phabricator.com/D7373
This commit is contained in:
epriestley 2013-10-21 11:34:45 -07:00
parent ee254b5c2a
commit da9a362169
2 changed files with 20 additions and 4 deletions

View file

@ -59,11 +59,19 @@ final class PhabricatorProjectProfileController
$header = id(new PHUIHeaderView())
->setHeader($project->getName())
->setSubheader(phutil_utf8_shorten($profile->getBlurb(), 1024))
->setUser($user)
->setPolicyObject($project)
->setImage($picture);
if ($project->getStatus() == PhabricatorProjectStatus::STATUS_ACTIVE) {
$header->setStatus('oh-ok', '', pht('Active'));
} else {
$header->setStatus('policy-noone', '', pht('Archived'));
}
$actions = $this->buildActionListView($project);
$properties = $this->buildPropertyListView($project, $actions);
$properties = $this->buildPropertyListView($project, $profile, $actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
@ -253,6 +261,7 @@ final class PhabricatorProjectProfileController
private function buildPropertyListView(
PhabricatorProject $project,
PhabricatorProjectProfile $profile,
PhabricatorActionListView $actions) {
$request = $this->getRequest();
$viewer = $request->getUser();
@ -266,6 +275,13 @@ final class PhabricatorProjectProfileController
pht('Created'),
phabricator_datetime($project->getDateCreated(), $viewer));
$view->addSectionHeader(pht('Description'));
$view->addTextContent(
PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())->setContent($profile->getBlurb()),
'default',
$viewer));
return $view;
}

View file

@ -127,8 +127,8 @@ final class PhabricatorProjectProfileEditController
->setOptions($options)
->setValue($project->getStatus()))
->appendChild(
id(new AphrontFormTextAreaControl())
->setLabel(pht('Blurb'))
id(new PhabricatorRemarkupControl())
->setLabel(pht('Description'))
->setName('blurb')
->setValue($profile->getBlurb()))
->appendChild(