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

Fix Oblivious skin summary remarkup and partially fix title

Summary: Ref T9546. I only got the title to always show the blog title (better than nothing) -- showing the post title properly isn't trivial and is more work than I want to do right now.

Test Plan:
  - Description now has remarkup.
  - Title now shows blog title (better than nothing).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9546

Differential Revision: https://secure.phabricator.com/D14423
This commit is contained in:
epriestley 2015-11-06 20:24:11 +00:00 committed by epriestley
parent 3a90cb56b4
commit 80f1d01602
2 changed files with 17 additions and 8 deletions

View file

@ -13,6 +13,6 @@
echo _e($blog->getName());
?></a>
</h1>
<p><?php echo _e($blog->getDescription()); ?></p>
<p><?php echo $skin->remarkup($blog->getDescription()); ?></p>
</div>
<div class="oblivious-content">

View file

@ -79,6 +79,12 @@ final class PhameBasicTemplateBlogSkin extends PhameBasicBlogSkin {
return $this->cssResources;
}
public function remarkup($corpus) {
$view = id(new PHUIRemarkupView($this->getViewer(), $corpus));
return hsprintf('%s', $view);
}
public function getName() {
return $this->getSpecification()->getName();
}
@ -107,13 +113,16 @@ final class PhameBasicTemplateBlogSkin extends PhameBasicBlogSkin {
private function getDefaultScope() {
return array(
'skin' => $this,
'blog' => $this->getBlog(),
'uri' => $this->getURI($this->getURIPath()),
'home_uri' => $this->getURI(''),
'title' => $this->getTitle(),
'skin' => $this,
'blog' => $this->getBlog(),
'uri' => $this->getURI($this->getURIPath()),
'home_uri' => $this->getURI(''),
// TODO: This is wrong for detail pages, which should show the post
// title, but getting it right is a pain and this is better than nothing.
'title' => $this->getBlog()->getName(),
'description' => $this->getDescription(),
'og_type' => $this->getOGType(),
'og_type' => $this->getOGType(),
);
}
@ -135,7 +144,7 @@ final class PhameBasicTemplateBlogSkin extends PhameBasicBlogSkin {
return $this->renderTemplate(
'post-detail.php',
array(
'post' => $post,
'post' => $post,
));
}