Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F71891802
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, Jul 13, 15:08
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jul 15, 15:08 (2 d)
Engine
blob
Format
Raw Data
Handle
19013373
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