Diffusion browser: Update editor link when clicking on a line
Summary: Highlighing and URL are fixed on click - now the edit button too. Test Plan: click on lines with and without value in "Editr Link" (And without %l in it). Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9227
This commit is contained in:
@@ -413,6 +413,7 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
|
||||
|
||||
$callsign = $repository->getCallsign();
|
||||
$editor_link = $user->loadEditorLink($path, $line, $callsign);
|
||||
$template = $user->loadEditorLink($path, '%l', $callsign);
|
||||
|
||||
$icon_edit = id(new PHUIIconView())
|
||||
->setIconFont('fa-pencil');
|
||||
@@ -421,6 +422,8 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
|
||||
->setText(pht('Open in Editor'))
|
||||
->setHref($editor_link)
|
||||
->setIcon($icon_edit)
|
||||
->setID('editor_link')
|
||||
->setMetadata(array('link_template' => $template))
|
||||
->setDisabled(!$editor_link);
|
||||
|
||||
return $button;
|
||||
|
||||
Reference in New Issue
Block a user