Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F968786
DiffusionRepositoryPublishingManagementPanel.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DiffusionRepositoryPublishingManagementPanel.php
View Options
<?php
final
class
DiffusionRepositoryPublishingManagementPanel
extends
DiffusionRepositoryManagementPanel
{
const
PANELKEY
=
'publishing'
;
public
function
getManagementPanelLabel
()
{
return
pht
(
'Publishing'
);
}
public
function
getManagementPanelOrder
()
{
return
1100
;
}
public
function
getManagementPanelIcon
()
{
$repository
=
$this
->
getRepository
();
$has_any
=
$repository
->
isPublishingDisabled
();
if
(
$has_any
)
{
return
'fa-flash'
;
}
else
{
return
'fa-flash grey'
;
}
}
protected
function
getEditEngineFieldKeys
()
{
return
array
(
'publish'
,
);
}
public
function
buildManagementPanelCurtain
()
{
$repository
=
$this
->
getRepository
();
$viewer
=
$this
->
getViewer
();
$action_list
=
$this
->
newActionList
();
$can_edit
=
PhabricatorPolicyFilter
::
hasCapability
(
$viewer
,
$repository
,
PhabricatorPolicyCapability
::
CAN_EDIT
);
$publishing_uri
=
$this
->
getEditPageURI
();
$action_list
->
addAction
(
id
(
new
PhabricatorActionView
())
->
setIcon
(
'fa-pencil'
)
->
setName
(
pht
(
'Edit Publishing'
))
->
setHref
(
$publishing_uri
)
->
setDisabled
(!
$can_edit
)
->
setWorkflow
(!
$can_edit
));
return
$this
->
newCurtainView
()
->
setActionList
(
$action_list
);
}
public
function
buildManagementPanelContent
()
{
$repository
=
$this
->
getRepository
();
$viewer
=
$this
->
getViewer
();
$view
=
id
(
new
PHUIPropertyListView
())
->
setViewer
(
$viewer
);
$notify
=
$repository
->
isPublishingDisabled
()
?
pht
(
'Off'
)
:
pht
(
'On'
);
$notify
=
phutil_tag
(
'em'
,
array
(),
$notify
);
$view
->
addProperty
(
pht
(
'Publishing'
),
$notify
);
return
$this
->
newBox
(
pht
(
'Publishing'
),
$view
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 3:55 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
225959
Default Alt Text
DiffusionRepositoryPublishingManagementPanel.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment