Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103052534
DiffusionRepositoryActionsManagementPanel.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, Feb 26, 21:37
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Feb 28, 21:37 (2 d)
Engine
blob
Format
Raw Data
Handle
24485997
Attached To
rPH Phabricator
DiffusionRepositoryActionsManagementPanel.php
View Options
<?php
final
class
DiffusionRepositoryActionsManagementPanel
extends
DiffusionRepositoryManagementPanel
{
const
PANELKEY
=
'actions'
;
public
function
getManagementPanelLabel
()
{
return
pht
(
'Actions'
);
}
public
function
getManagementPanelOrder
()
{
return
1100
;
}
// c4science customization
public
function
allowAccess
()
{
return
true
;
}
public
function
getManagementPanelIcon
()
{
return
'fa-flash'
;
}
protected
function
getEditEngineFieldKeys
()
{
return
array
(
'publish'
,
'autoclose'
,
);
}
public
function
buildManagementPanelContent
()
{
$repository
=
$this
->
getRepository
();
$viewer
=
$this
->
getViewer
();
$view
=
id
(
new
PHUIPropertyListView
())
->
setViewer
(
$viewer
);
$notify
=
$repository
->
getDetail
(
'herald-disabled'
)
?
pht
(
'Off'
)
:
pht
(
'On'
);
$notify
=
phutil_tag
(
'em'
,
array
(),
$notify
);
$view
->
addProperty
(
pht
(
'Publish/Notify'
),
$notify
);
$autoclose
=
$repository
->
getDetail
(
'disable-autoclose'
)
?
pht
(
'Off'
)
:
pht
(
'On'
);
$autoclose
=
phutil_tag
(
'em'
,
array
(),
$autoclose
);
$view
->
addProperty
(
pht
(
'Autoclose'
),
$autoclose
);
$can_edit
=
PhabricatorPolicyFilter
::
hasCapability
(
$viewer
,
$repository
,
PhabricatorPolicyCapability
::
CAN_EDIT
);
$actions_uri
=
$this
->
getEditPageURI
();
$button
=
id
(
new
PHUIButtonView
())
->
setTag
(
'a'
)
->
setIcon
(
'fa-pencil'
)
->
setText
(
pht
(
'Edit'
))
->
setHref
(
$actions_uri
)
->
setDisabled
(!
$can_edit
)
->
setWorkflow
(!
$can_edit
);
return
$this
->
newBox
(
pht
(
'Actions'
),
$view
,
array
(
$button
));
}
}
Event Timeline
Log In to Comment