@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<?php
2
3/**
4 * Render the "Undo" action to recover discarded inline comments.
5 *
6 * This extends @{class:PHUIDiffInlineCommentView} so it can use the same
7 * scaffolding code as other kinds of inline comments.
8 */
9final class PHUIDiffInlineCommentUndoView
10 extends PHUIDiffInlineCommentView {
11
12 public function isHideable() {
13 return false;
14 }
15
16 public function render() {
17 $link = javelin_tag(
18 'a',
19 array(
20 'href' => '#',
21 'sigil' => 'differential-inline-comment-undo',
22 ),
23 pht('Undo'));
24
25 return phutil_tag(
26 'div',
27 array(
28 'class' => 'differential-inline-undo',
29 ),
30 array(pht('Changes discarded.'), ' ', $link));
31 }
32
33}