Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/view/DiffusionCloneURIView.php
Show All 29 Lines | public function setDisplayURI($display_uri) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getDisplayURI() { | public function getDisplayURI() { | ||||
return $this->displayURI; | return $this->displayURI; | ||||
} | } | ||||
public function render() { | public function render() { | ||||
$viewer = $this->getViewer(); | |||||
require_celerity_resource('diffusion-icons-css'); | require_celerity_resource('diffusion-icons-css'); | ||||
Javelin::initBehavior('select-content'); | Javelin::initBehavior('select-content'); | ||||
$uri_id = celerity_generate_unique_node_id(); | $uri_id = celerity_generate_unique_node_id(); | ||||
$display = $this->getDisplayURI(); | $display = $this->getDisplayURI(); | ||||
Show All 36 Lines | $io = id(new PHUIButtonView()) | ||||
'selectID' => $uri_id, | 'selectID' => $uri_id, | ||||
)); | )); | ||||
switch ($uri->getEffectiveIOType()) { | switch ($uri->getEffectiveIOType()) { | ||||
case PhabricatorRepositoryURI::IO_READ: | case PhabricatorRepositoryURI::IO_READ: | ||||
case PhabricatorRepositoryURI::IO_READWRITE: | case PhabricatorRepositoryURI::IO_READWRITE: | ||||
switch ($uri->getBuiltinProtocol()) { | switch ($uri->getBuiltinProtocol()) { | ||||
case PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH: | case PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH: | ||||
$auth_uri = '/settings/panel/ssh/'; | $auth_uri = id(new PhabricatorSSHKeysSettingsPanel()) | ||||
->setViewer($viewer) | |||||
->setUser($viewer) | |||||
->getPanelURI(); | |||||
$auth_tip = pht('Manage SSH Keys'); | $auth_tip = pht('Manage SSH Keys'); | ||||
$auth_disabled = false; | $auth_disabled = false; | ||||
break; | break; | ||||
default: | default: | ||||
$auth_uri = '/settings/panel/vcspassword'; | $auth_uri = id(new DiffusionSetPasswordSettingsPanel()) | ||||
->setViewer($viewer) | |||||
->setUser($viewer) | |||||
->getPanelURI(); | |||||
$auth_tip = pht('Manage Password'); | $auth_tip = pht('Manage Password'); | ||||
$auth_disabled = false; | $auth_disabled = false; | ||||
break; | break; | ||||
} | } | ||||
break; | break; | ||||
default: | default: | ||||
$auth_disabled = true; | $auth_disabled = true; | ||||
$auth_tip = pht('External'); | $auth_tip = pht('External'); | ||||
Show All 28 Lines |