@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.

Clearly show draft vs nondraft inline comments

Summary: Fixes T2638; mark draft inlines in Pholio in a way similar to Differential.

Test Plan: {F34553}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2638

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

+82 -45
+2 -2
src/__celerity_resource_map__.php
··· 3236 3236 ), 3237 3237 'pholio-css' => 3238 3238 array( 3239 - 'uri' => '/res/5bbb9e67/rsrc/css/application/pholio/pholio.css', 3239 + 'uri' => '/res/b74040b8/rsrc/css/application/pholio/pholio.css', 3240 3240 'type' => 'css', 3241 3241 'requires' => 3242 3242 array( ··· 3245 3245 ), 3246 3246 'pholio-inline-comments-css' => 3247 3247 array( 3248 - 'uri' => '/res/647d658d/rsrc/css/application/pholio/pholio-inline-comments.css', 3248 + 'uri' => '/res/241b121c/rsrc/css/application/pholio/pholio-inline-comments.css', 3249 3249 'type' => 'css', 3250 3250 'requires' => 3251 3251 array(
+37 -15
src/applications/pholio/view/PholioInlineCommentView.php
··· 40 40 } 41 41 42 42 $actions = null; 43 + $inline = $this->inlineComment; 44 + $phid = $inline->getPHID(); 45 + $id = $inline->getID(); 46 + $user = $this->user; 43 47 44 - if ($this->inlineComment->getTransactionPHID() === null && 45 - $this->inlineComment->getEditPolicy( 46 - PhabricatorPolicyCapability::CAN_EDIT) == $this->user->getPHID()) { 48 + $is_draft = ($inline->getTransactionPHID() === null); 49 + $can_edit = PhabricatorPolicyFilter::hasCapability( 50 + $user, 51 + $inline, 52 + PhabricatorPolicyCapability::CAN_EDIT); 53 + 54 + if ($is_draft && $can_edit) { 55 + $draft = phutil_tag( 56 + 'span', 57 + array( 58 + 'class' => 'pholio-inline-status', 59 + ), 60 + pht('Not Submitted Yet')); 47 61 48 62 $edit_action = javelin_tag( 49 63 'a', 50 64 array( 51 - 'href' => '/pholio/inline/edit/'.$this->inlineComment->getID(), 65 + 'href' => '/pholio/inline/edit/'.$id.'/', 52 66 'sigil' => 'inline-edit', 53 67 'meta' => array( 54 - 'phid' => $this->inlineComment->getPHID(), 55 - 'id' => $this->inlineComment->getID() 68 + 'phid' => $phid, 69 + 'id' => $id, 56 70 ) 57 71 ), 58 72 pht('Edit')); ··· 60 74 $delete_action = javelin_tag( 61 75 'a', 62 76 array( 63 - 'href' => '/pholio/inline/delete/'.$this->inlineComment->getID(), 77 + 'href' => '/pholio/inline/delete/'.$id.'/', 64 78 'sigil' => 'inline-delete', 65 79 'meta' => array( 66 - 'phid' => $this->inlineComment->getPHID(), 67 - 'id' => $this->inlineComment->getID() 80 + 'phid' => $phid, 81 + 'id' => $id, 68 82 ) 69 83 ), 70 84 pht('Delete')); 71 - 72 85 73 86 $actions = phutil_tag( 74 87 'span', 75 88 array( 76 89 'class' => 'pholio-inline-head-links' 77 90 ), 78 - array($edit_action, $delete_action)); 91 + phutil_implode_html( 92 + " \xC2\xB7 ", 93 + array($draft, $edit_action, $delete_action))); 79 94 } 80 95 81 96 $comment_header = phutil_tag( ··· 87 102 88 103 89 104 $comment = $this->engine->renderOneObject( 90 - $this->inlineComment, 105 + $inline, 91 106 PholioTransactionComment::MARKUP_FIELD_COMMENT, 92 107 $this->user); 93 108 ··· 96 111 array(), 97 112 $comment); 98 113 114 + $classes = array(); 115 + $classes[] = 'pholio-inline-comment'; 116 + 117 + if ($is_draft) { 118 + $classes[] = 'pholio-inline-comment-draft'; 119 + } 120 + 99 121 $comment_block = javelin_tag( 100 122 'div', 101 123 array( 102 - 'id' => $this->inlineComment->getPHID()."_comment", 103 - 'class' => 'pholio-inline-comment', 124 + 'id' => "{$phid}_comment", 125 + 'class' => implode(' ', $classes), 104 126 'sigil' => 'inline_comment', 105 127 'meta' => array( 106 - 'phid' => $this->inlineComment->getPHID() 128 + 'phid' => $phid, 107 129 ) 108 130 ), 109 131 array($comment_header, $comment_body));
+43
webroot/rsrc/css/application/pholio/pholio-inline-comments.css
··· 1 1 /** 2 2 * @provides pholio-inline-comments-css 3 3 */ 4 + 5 + .pholio-inline-comment { 6 + border: 1px solid #555555; 7 + background: #353535; 8 + margin: 0 0 5px 0; 9 + padding: 8px 10px; 10 + color: #ccc; 11 + 12 + font-family: Verdana; 13 + font-size: 11px; 14 + } 15 + 16 + .pholio-mock-inline-comments { 17 + width: 300px; 18 + border-left: 1px solid #101010; 19 + border-top: 1px solid #333; 20 + position: absolute; 21 + top: 0; 22 + bottom: 0; 23 + right: 0; 24 + padding: 10px; 25 + background: #282828; 26 + overflow-x: auto; 27 + text-align: left; 28 + } 29 + 4 30 .pholio-inline-comment-dialog-title { 5 31 font-weight: bold; 6 32 color: #fff; ··· 37 63 .pholio-inline-comment-dialog-buttons a { 38 64 display: none; 39 65 } 66 + 67 + .pholio-inline-comment-draft { 68 + border-style: dashed; 69 + border-color: #777777; 70 + background: #464646; 71 + } 72 + 73 + .pholio-inline-head-links { 74 + float: right; 75 + font-weight: normal; 76 + color: #777777; 77 + } 78 + 79 + .pholio-inline-head-links a { 80 + font-weight: normal; 81 + color: #2178db; 82 + }
-28
webroot/rsrc/css/application/pholio/pholio.css
··· 72 72 display: inline-block; 73 73 } 74 74 75 - .pholio-mock-inline-comments { 76 - width: 300px; 77 - border-left: 1px solid #101010; 78 - border-top: 1px solid #333; 79 - position: absolute; 80 - top: 0; 81 - bottom: 0; 82 - right: 0; 83 - padding: 10px; 84 - background: #282828; 85 - overflow-x: auto; 86 - text-align: left; 87 - } 88 - 89 - .pholio-inline-comment { 90 - border: 1px solid #333; 91 - border-bottom: 1px solid #555; 92 - background: #353535; 93 - margin: 0 0 5px 0; 94 - padding: 8px 10px; 95 - color: #ccc; 96 - } 97 - 98 75 .pholio-inline-comment-header { 99 76 color: #fff; 100 77 border-bottom: 1px solid #555; ··· 107 84 background-color: #222; 108 85 border-color: #555; 109 86 } 110 - 111 - .pholio-inline-head-links a { 112 - font-weight: normal; 113 - margin-left: 5px; 114 - }