Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/controller/post/PhamePostViewController.php
| Show All 40 Lines | public function handleRequest(AphrontRequest $request) { | ||||
| } | } | ||||
| if ($post->isDraft()) { | if ($post->isDraft()) { | ||||
| $document->appendChild( | $document->appendChild( | ||||
| id(new PHUIInfoView()) | id(new PHUIInfoView()) | ||||
| ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) | ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) | ||||
| ->setTitle(pht('Draft Post')) | ->setTitle(pht('Draft Post')) | ||||
| ->appendChild( | ->appendChild( | ||||
| pht('Only you can see this draft until you publish it. '. | pht( | ||||
| 'Use "Publish" to publish this post.'))); | 'This is a draft, and is only visible to you and other users '. | ||||
| 'who can edit %s. Use "Publish" to publish this post.', | |||||
| $viewer->renderHandle($post->getBlogPHID())))); | |||||
| } | } | ||||
| if ($post->isArchived()) { | if ($post->isArchived()) { | ||||
| $document->appendChild( | $document->appendChild( | ||||
| id(new PHUIInfoView()) | id(new PHUIInfoView()) | ||||
| ->setSeverity(PHUIInfoView::SEVERITY_ERROR) | ->setSeverity(PHUIInfoView::SEVERITY_ERROR) | ||||
| ->setTitle(pht('Archived Post')) | ->setTitle(pht('Archived Post')) | ||||
| ->appendChild( | ->appendChild( | ||||
| pht('Only you can see this archived post until you publish it. '. | pht( | ||||
| 'Use "Publish" to publish this post.'))); | 'This post has been archived, and is only visible to you and '. | ||||
| 'other users who can edit %s.', | |||||
| $viewer->renderHandle($post->getBlogPHID())))); | |||||
| } | } | ||||
| if (!$post->getBlog()) { | if (!$post->getBlog()) { | ||||
| $document->appendChild( | $document->appendChild( | ||||
| id(new PHUIInfoView()) | id(new PHUIInfoView()) | ||||
| ->setSeverity(PHUIInfoView::SEVERITY_WARNING) | ->setSeverity(PHUIInfoView::SEVERITY_WARNING) | ||||
| ->setTitle(pht('Not On A Blog')) | ->setTitle(pht('Not On A Blog')) | ||||
| ->appendChild( | ->appendChild( | ||||
| ▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines | |||||