Remove subprojects from the Projects UI and API

Summary:
These are currently useless and confusing (they have no application impact), and should be migrated to edges if we want to restore them in some form.

I left the actual storage so this doesn't destroy any data, it just removes all traces of this feature from the UI.

Test Plan: Looked at and edited projects.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3183
This commit is contained in:
epriestley
2012-08-07 11:57:27 -07:00
parent fbf6d967ff
commit f01c89f8de
5 changed files with 1 additions and 160 deletions

View File

@@ -152,10 +152,7 @@ final class PhabricatorProjectProfileController
$blurb = phutil_escape_html($blurb);
$blurb = str_replace("\n", '<br />', $blurb);
$phids = array_merge(
array($project->getAuthorPHID()),
$project->getSubprojectPHIDs()
);
$phids = array($project->getAuthorPHID());
$phids = array_unique($phids);
$handles = id(new PhabricatorObjectHandleData($phids))
->loadHandles();
@@ -187,23 +184,6 @@ final class PhabricatorProjectProfileController
</div>
</div>';
if ($project->getSubprojectPHIDs()) {
$table = $this->renderSubprojectTable(
$handles,
$project->getSubprojectPHIDs());
$subproject_list = $table->render();
} else {
$subproject_list = '<p><em>No subprojects.</em></p>';
}
$about .=
'<div class="phabricator-profile-info-group">'.
'<h1 class="phabricator-profile-info-header">Subprojects</h1>'.
'<div class="phabricator-profile-info-pane">'.
$subproject_list.
'</div>'.
'</div>';
return $about;
}
@@ -327,39 +307,4 @@ final class PhabricatorProjectProfileController
return $content;
}
private function renderSubprojectTable(
array $handles,
array $subprojects_phids) {
assert_instances_of($handles, 'PhabricatorObjectHandle');
$rows = array();
foreach ($subprojects_phids as $subproject_phid) {
$phid = $handles[$subproject_phid]->getPHID();
$rows[] = array(
phutil_escape_html($handles[$phid]->getFullName()),
phutil_render_tag(
'a',
array(
'class' => 'small grey button',
'href' => $handles[$phid]->getURI(),
),
'View Project Profile'),
);
}
$table = new AphrontTableView($rows);
$table->setHeaders(
array(
'Name',
'',
));
$table->setColumnClasses(
array(
'pri',
'action right',
));
return $table;
}
}