File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed
applications/phame/controller/blog Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 127127 'rsrc/css/phui/phui-button.css ' => '16020a60 ' ,
128128 'rsrc/css/phui/phui-crumbs-view.css ' => '414406b5 ' ,
129129 'rsrc/css/phui/phui-document-pro.css ' => 'e0fad431 ' ,
130- 'rsrc/css/phui/phui-document-summary.css ' => 'bca1ed88 ' ,
130+ 'rsrc/css/phui/phui-document-summary.css ' => '350d6025 ' ,
131131 'rsrc/css/phui/phui-document.css ' => 'a4a1c3b9 ' ,
132132 'rsrc/css/phui/phui-feed-story.css ' => 'b7b26d23 ' ,
133133 'rsrc/css/phui/phui-fontkit.css ' => '9cda225e ' ,
790790 'phui-calendar-list-css ' => 'c1c7f338 ' ,
791791 'phui-calendar-month-css ' => '476be7e0 ' ,
792792 'phui-crumbs-view-css ' => '414406b5 ' ,
793- 'phui-document-summary-view-css ' => 'bca1ed88 ' ,
793+ 'phui-document-summary-view-css ' => '350d6025 ' ,
794794 'phui-document-view-css ' => 'a4a1c3b9 ' ,
795795 'phui-document-view-pro-css ' => 'e0fad431 ' ,
796796 'phui-feed-story-css ' => 'b7b26d23 ' ,
Original file line number Diff line number Diff line change @@ -159,15 +159,20 @@ protected function renderPostList(
159159
160160 $ blogger = phutil_tag ('strong ' , array (), $ blogger );
161161 $ date = phabricator_datetime ($ post ->getDatePublished (), $ viewer );
162- $ subtitle = pht ('Written by %s on %s. ' , $ blogger , $ date );
162+ if ($ post ->isDraft ()) {
163+ $ subtitle = pht ('Unpublished draft by %s. ' , $ blogger );
164+ } else {
165+ $ subtitle = pht ('Written by %s on %s. ' , $ blogger , $ date );
166+ }
163167
164168 $ item = id (new PHUIDocumentSummaryView ())
165169 ->setTitle ($ post ->getTitle ())
166170 ->setHref ($ this ->getApplicationURI ('/post/view/ ' .$ post ->getID ().'/ ' ))
167171 ->setSubtitle ($ subtitle )
168172 ->setImage ($ blogger_image )
169173 ->setImageHref ($ blogger_uri )
170- ->setSummary ($ phame_post );
174+ ->setSummary ($ phame_post )
175+ ->setDraft ($ post ->isDraft ());
171176
172177 $ list [] = $ item ;
173178 }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ final class PHUIDocumentSummaryView extends AphrontTagView {
88 private $ subtitle ;
99 private $ href ;
1010 private $ summary ;
11+ private $ draft ;
1112
1213 public function setTitle ($ title ) {
1314 $ this ->title = $ title ;
@@ -39,11 +40,20 @@ public function setSummary($summary) {
3940 return $ this ;
4041 }
4142
43+ public function setDraft ($ draft ) {
44+ $ this ->draft = $ draft ;
45+ return $ this ;
46+ }
47+
4248 protected function getTagAttributes () {
4349 $ classes = array ();
4450 $ classes [] = 'phui-document-summary-view ' ;
4551 $ classes [] = 'phabricator-remarkup ' ;
4652
53+ if ($ this ->draft ) {
54+ $ classes [] = 'is-draft ' ;
55+ }
56+
4757 return array (
4858 'class ' => implode (' ' , $ classes ),
4959 );
Original file line number Diff line number Diff line change 22 * @provides phui-document-summary-view-css
33 */
44
5- .phui-document-summary-view {
6-
5+ .phui-document-summary-view . is-draft {
6+ opacity : 0.5 ;
77}
88
99body .phui-document-view .phui-document-summary-view h2 .remarkup-header {
You can’t perform that action at this time.
0 commit comments