1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Adds Remarkup Rendering to Calendar Events' Descriptions.

Summary: Closes T8032

Test Plan: Verify that when editing a calendar event's description, there is a UI bar helping with adding markup to the description. Also verify that markup is displayed correctly on the event page once the event has been updated.

Reviewers: lpriestley, #blessed_reviewers, epriestley

Reviewed By: lpriestley, #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8032

Differential Revision: https://secure.phabricator.com/D13355
This commit is contained in:
Paul Kassianik 2015-06-19 08:32:50 -07:00 committed by epriestley
parent 69d12f64ba
commit 40851e5b25
2 changed files with 16 additions and 6 deletions

View file

@ -437,10 +437,11 @@ final class PhabricatorCalendarEventEditController
->setValue($end_disabled); ->setValue($end_disabled);
} }
$description = id(new AphrontFormTextAreaControl()) $description = id(new PhabricatorRemarkupControl())
->setLabel(pht('Description')) ->setLabel(pht('Description'))
->setName('description') ->setName('description')
->setValue($description); ->setValue($description)
->setUser($viewer);
$view_policies = id(new AphrontFormPolicyControl()) $view_policies = id(new AphrontFormPolicyControl())
->setUser($viewer) ->setUser($viewer)

View file

@ -362,10 +362,19 @@ final class PhabricatorCalendarEventViewController
pht('Icon'), pht('Icon'),
$icon_display); $icon_display);
$properties->addSectionHeader( if (strlen($event->getDescription())) {
pht('Description'),
PHUIPropertyListView::ICON_SUMMARY); $description = PhabricatorMarkupEngine::renderOneObject(
$properties->addTextContent($event->getDescription()); id(new PhabricatorMarkupOneOff())->setContent($event->getDescription()),
'default',
$viewer);
$properties->addSectionHeader(
pht('Description'),
PHUIPropertyListView::ICON_SUMMARY);
$properties->addTextContent($description);
}
return $properties; return $properties;
} }