Page MenuHomePhabricator

Locations Scenario: View Controller
Closed, ResolvedPublic

Description

The main view controller for locations (at /locations/view/123/, where users end up if they click the name of a review) barely has any code and just renders a blank page.

Build this controller out step by step so users can review and edit locations by visiting the location detail page. You can submit reviews for small steps as you complete them, and do not need to do everything at once.

You can reference other ViewControllers as examples. PhabricatorBadgesViewController might be a good one to look at, since it's fairly simple but has most of the features.

  • Load the object using LocationsLocationQuery, and 404 if it does not exist.
  • Add breadcrumbs to get back to the list.
  • Change the title to include the location name.
  • Add a PHUITwoColumnView with a header that shows the location name.
  • Add a "Curtain", which is the right-hand column. It should have an "Edit Location" action.
  • Add a timeline, which is a list of changes made to the object. (You'll need to implement a TransactionQuery first.)