Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105974261
PhabricatorProjectSubprojectWarningController.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
Fri, Mar 21, 05:32
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Mar 23, 05:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25066269
Attached To
rPH Phabricator
PhabricatorProjectSubprojectWarningController.php
View Options
<?php
final
class
PhabricatorProjectSubprojectWarningController
extends
PhabricatorProjectController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$response
=
$this
->
loadProject
();
if
(
$response
)
{
return
$response
;
}
$project
=
$this
->
getProject
();
$can_edit
=
PhabricatorPolicyFilter
::
hasCapability
(
$viewer
,
$project
,
PhabricatorPolicyCapability
::
CAN_EDIT
);
if
(!
$can_edit
)
{
return
new
Aphront404Response
();
}
$id
=
$project
->
getID
();
$cancel_uri
=
"/project/subprojects/{$id}/"
;
$done_uri
=
"/project/edit/?parent={$id}"
;
if
(
$request
->
isFormPost
())
{
return
id
(
new
AphrontRedirectResponse
())
->
setURI
(
$done_uri
);
}
$doc_href
=
PhabricatorEnv
::
getDoclink
(
'Projects User Guide'
);
$conversion_help
=
pht
(
"Creating a project's first subproject **moves all "
.
"members** to become members of the subproject instead."
.
"
\n\n
"
.
"See [[ %s | Projects User Guide ]] in the documentation for details. "
.
"This process can not be undone."
,
$doc_href
);
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Convert to Parent Project'
))
->
appendChild
(
new
PHUIRemarkupView
(
$viewer
,
$conversion_help
))
->
addCancelButton
(
$cancel_uri
)
->
addSubmitButton
(
pht
(
'Convert Project'
));
}
}
Event Timeline
Log In to Comment