@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add ImageView to PropertyListView

Summary: Adds imageview (dark background) to Files and Macro.

Test Plan: Test a file and a macro, see darkness.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5131

+22 -7
+1 -1
src/__celerity_resource_map__.php
··· 2924 2924 ), 2925 2925 'phabricator-property-list-view-css' => 2926 2926 array( 2927 - 'uri' => '/res/cd84ee5a/rsrc/css/layout/phabricator-property-list-view.css', 2927 + 'uri' => '/res/dfee0687/rsrc/css/layout/phabricator-property-list-view.css', 2928 2928 'type' => 'css', 2929 2929 'requires' => 2930 2930 array(
+1 -4
src/applications/files/controller/PhabricatorFileInfoController.php
··· 146 146 147 147 if ($file->isViewableImage()) { 148 148 149 - // TODO: Clean this up after Pholio (dark backgrounds, standardization, 150 - // etc.) 151 - 152 149 $image = phutil_tag( 153 150 'img', 154 151 array( ··· 163 160 ), 164 161 $image); 165 162 166 - $view->addTextContent($linked_image); 163 + $view->addImageContent($linked_image); 167 164 } 168 165 169 166 return $view;
+1 -1
src/applications/macro/controller/PhabricatorMacroViewController.php
··· 157 157 $sub_view); 158 158 159 159 if ($file) { 160 - $view->addTextContent( 160 + $view->addImageContent( 161 161 phutil_tag( 162 162 'img', 163 163 array(
+15 -1
src/view/layout/PhabricatorPropertyListView.php
··· 59 59 return $this; 60 60 } 61 61 62 + public function addImageContent($content) { 63 + $this->parts[] = array( 64 + 'type' => 'image', 65 + 'content' => $content, 66 + ); 67 + return $this; 68 + } 69 + 62 70 public function invokeWillRenderEvent() { 63 71 if ($this->object && $this->getUser() && !$this->invokedWillRenderEvent) { 64 72 $event = new PhabricatorEvent( ··· 91 99 $items[] = $this->renderSectionPart($part); 92 100 break; 93 101 case 'text': 102 + case 'image': 94 103 $items[] = $this->renderTextPart($part); 95 104 break; 96 105 default: ··· 166 175 } 167 176 168 177 private function renderTextPart(array $part) { 178 + $classes = array(); 179 + $classes[] = 'phabricator-property-list-text-content'; 180 + if ($part['type'] == 'image') { 181 + $classes[] = 'phabricator-property-list-image-content'; 182 + } 169 183 return phutil_tag( 170 184 'div', 171 185 array( 172 - 'class' => 'phabricator-property-list-text-content', 186 + 'class' => implode($classes, ' '), 173 187 ), 174 188 $part['content']); 175 189 }
+4
webroot/rsrc/css/layout/phabricator-property-list-view.css
··· 93 93 border-bottom: 1px solid #dbdbdb; 94 94 } 95 95 96 + .phabricator-property-list-image-content { 97 + background: #282828; 98 + } 99 + 96 100 97 101 /* In the common case where we immediately follow a header, move back up 30px 98 102 so we snuggle next to the header. */