Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F67484837
DiffusionRepositoryStagingManagementPanel.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jun 22, 16:36
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jun 24, 16:36 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18401791
Attached To
rPH Phabricator
DiffusionRepositoryStagingManagementPanel.php
View Options
<?php
final
class
DiffusionRepositoryStagingManagementPanel
extends
DiffusionRepositoryManagementPanel
{
const
PANELKEY
=
'staging'
;
public
function
getManagementPanelLabel
()
{
return
pht
(
'Staging Area'
);
}
public
function
getManagementPanelOrder
()
{
return
700
;
}
protected
function
buildManagementPanelActions
()
{
$repository
=
$this
->
getRepository
();
$viewer
=
$this
->
getViewer
();
$can_edit
=
PhabricatorPolicyFilter
::
hasCapability
(
$viewer
,
$repository
,
PhabricatorPolicyCapability
::
CAN_EDIT
);
$staging_uri
=
$repository
->
getPathURI
(
'edit/staging/'
);
return
array
(
id
(
new
PhabricatorActionView
())
->
setIcon
(
'fa-pencil'
)
->
setName
(
pht
(
'Edit Staging'
))
->
setHref
(
$staging_uri
)
->
setDisabled
(!
$can_edit
)
->
setWorkflow
(!
$can_edit
),
);
}
public
function
buildManagementPanelContent
()
{
$repository
=
$this
->
getRepository
();
$viewer
=
$this
->
getViewer
();
$view
=
id
(
new
PHUIPropertyListView
())
->
setViewer
(
$viewer
)
->
setActionList
(
$this
->
newActions
());
$staging_uri
=
$repository
->
getStagingURI
();
if
(!
$staging_uri
)
{
$staging_uri
=
phutil_tag
(
'em'
,
array
(),
pht
(
'No Staging Area'
));
}
$view
->
addProperty
(
pht
(
'Staging Area URI'
),
$staging_uri
);
return
$this
->
newBox
(
pht
(
'Staging Area'
),
$view
);
}
}
Event Timeline
Log In to Comment