Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81138086
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
Wed, Sep 4, 09:32
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Sep 6, 09:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20521823
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