3 final class PhameDraftListView
extends AphrontTagView
{
8 public function setPosts($posts) {
9 assert_instances_of($posts, 'PhamePost');
10 $this->posts
= $posts;
14 public function setBlogs($blogs) {
15 assert_instances_of($blogs, 'PhameBlog');
16 $this->blogs
= $blogs;
20 protected function getTagAttributes() {
22 $classes[] = 'phame-blog-list';
23 return array('class' => implode(' ', $classes));
26 protected function getTagContent() {
27 require_celerity_resource('phame-css');
30 foreach ($this->posts
as $post) {
31 $blog = $post->getBlog();
32 $image_uri = $blog->getProfileImageURI();
36 'class' => 'phame-blog-list-image',
37 'style' => 'background-image: url('.$image_uri.');',
38 'href' => $blog->getViewURI(),
44 'class' => 'phame-blog-list-title',
45 'href' => $post->getViewURI(),
49 $icon = id(new PHUIIconView())
50 ->setIcon('fa-pencil-square-o')
51 ->addClass('phame-blog-list-icon');
56 'href' => '/phame/post/edit/'.$post->getID().'/',
57 'class' => 'phame-blog-list-new-post',
64 'class' => 'phame-blog-list-item',
74 $list = pht('You have no draft posts.');
80 'class' => 'phame-blog-list-header',
85 'href' => '/phame/post/query/draft/',
89 return id(new PHUIBoxView())
90 ->appendChild($header)
93 ->setColor(PHUIBoxView
::BLUE
);