mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Update Diffusion UI
Summary: This updates (all?) of Diffusion/Audit to new UI, included edit and other extra form pages. It's fairly complete but I don't know all the nooks and crannies so to speak to fully verify I didn't mess anything up. Test Plan: Tested creating new repositories, browsing, searching, auditing. Need more eyes. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15487
This commit is contained in:
parent
08b1a33dc3
commit
8f94aa8a06
40 changed files with 1049 additions and 659 deletions
|
@ -7,12 +7,12 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => '225e8ac7',
|
||||
'core.pkg.css' => 'a93de192',
|
||||
'core.pkg.js' => '7d8faf57',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '7ba78475',
|
||||
'differential.pkg.js' => 'd0cd0df6',
|
||||
'diffusion.pkg.css' => 'f45955ed',
|
||||
'diffusion.pkg.css' => 'dc8e0cc2',
|
||||
'diffusion.pkg.js' => '3a9a8bfa',
|
||||
'maniphest.pkg.css' => '4845691a',
|
||||
'maniphest.pkg.js' => '949a7498',
|
||||
|
@ -64,9 +64,9 @@ return array(
|
|||
'rsrc/css/application/differential/revision-history.css' => '0e8eb855',
|
||||
'rsrc/css/application/differential/revision-list.css' => 'f3c47d33',
|
||||
'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55',
|
||||
'rsrc/css/application/diffusion/diffusion-icons.css' => '2941baf1',
|
||||
'rsrc/css/application/diffusion/diffusion-icons.css' => '3311444d',
|
||||
'rsrc/css/application/diffusion/diffusion-readme.css' => '356a4f3c',
|
||||
'rsrc/css/application/diffusion/diffusion-source.css' => '075ba788',
|
||||
'rsrc/css/application/diffusion/diffusion-source.css' => '68b30fd3',
|
||||
'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
|
||||
'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2',
|
||||
'rsrc/css/application/flag/flag.css' => '5337623f',
|
||||
|
@ -123,7 +123,7 @@ return array(
|
|||
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
||||
'rsrc/css/phui/phui-badge.css' => 'f25c3476',
|
||||
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
||||
'rsrc/css/phui/phui-box.css' => '96a10c5d',
|
||||
'rsrc/css/phui/phui-box.css' => 'b2d49bae',
|
||||
'rsrc/css/phui/phui-button.css' => 'a64a8de6',
|
||||
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => '79d536e5',
|
||||
|
@ -135,28 +135,28 @@ return array(
|
|||
'rsrc/css/phui/phui-fontkit.css' => '9cda225e',
|
||||
'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e',
|
||||
'rsrc/css/phui/phui-form.css' => 'aac1d51d',
|
||||
'rsrc/css/phui/phui-head-thing.css' => '31638812',
|
||||
'rsrc/css/phui/phui-header-view.css' => '26cffd3d',
|
||||
'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f',
|
||||
'rsrc/css/phui/phui-header-view.css' => '230254d3',
|
||||
'rsrc/css/phui/phui-hovercard.css' => 'de1a2119',
|
||||
'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad',
|
||||
'rsrc/css/phui/phui-icon.css' => '3f33ab57',
|
||||
'rsrc/css/phui/phui-image-mask.css' => 'a8498f9c',
|
||||
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
|
||||
'rsrc/css/phui/phui-info-view.css' => '6d7c3509',
|
||||
'rsrc/css/phui/phui-info-view.css' => '28efab79',
|
||||
'rsrc/css/phui/phui-list.css' => '9da2aa00',
|
||||
'rsrc/css/phui/phui-object-box.css' => '6b487c57',
|
||||
'rsrc/css/phui/phui-object-item-list-view.css' => '18b2ce8e',
|
||||
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
|
||||
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
|
||||
'rsrc/css/phui/phui-profile-menu.css' => '7e92a89a',
|
||||
'rsrc/css/phui/phui-property-list-view.css' => 'b12e801c',
|
||||
'rsrc/css/phui/phui-property-list-view.css' => '1d42ee7c',
|
||||
'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591',
|
||||
'rsrc/css/phui/phui-segment-bar-view.css' => '46342871',
|
||||
'rsrc/css/phui/phui-spacing.css' => '042804d6',
|
||||
'rsrc/css/phui/phui-status.css' => '37309046',
|
||||
'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2',
|
||||
'rsrc/css/phui/phui-timeline-view.css' => 'a0173eba',
|
||||
'rsrc/css/phui/phui-two-column-view.css' => '61dd6d38',
|
||||
'rsrc/css/phui/phui-two-column-view.css' => 'c110d0c3',
|
||||
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7',
|
||||
'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647',
|
||||
'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96',
|
||||
|
@ -553,9 +553,9 @@ return array(
|
|||
'differential-revision-history-css' => '0e8eb855',
|
||||
'differential-revision-list-css' => 'f3c47d33',
|
||||
'differential-table-of-contents-css' => 'ae4b7a55',
|
||||
'diffusion-icons-css' => '2941baf1',
|
||||
'diffusion-icons-css' => '3311444d',
|
||||
'diffusion-readme-css' => '356a4f3c',
|
||||
'diffusion-source-css' => '075ba788',
|
||||
'diffusion-source-css' => '68b30fd3',
|
||||
'diviner-shared-css' => 'aa3656aa',
|
||||
'font-aleo' => '8bdb2835',
|
||||
'font-fontawesome' => 'c43323c5',
|
||||
|
@ -805,7 +805,7 @@ return array(
|
|||
'phui-action-panel-css' => '91c7b835',
|
||||
'phui-badge-view-css' => 'f25c3476',
|
||||
'phui-big-info-view-css' => 'bd903741',
|
||||
'phui-box-css' => '96a10c5d',
|
||||
'phui-box-css' => 'b2d49bae',
|
||||
'phui-button-css' => 'a64a8de6',
|
||||
'phui-calendar-css' => 'ccabe893',
|
||||
'phui-calendar-day-css' => 'd1cf6f93',
|
||||
|
@ -822,15 +822,15 @@ return array(
|
|||
'phui-fontkit-css' => '9cda225e',
|
||||
'phui-form-css' => 'aac1d51d',
|
||||
'phui-form-view-css' => '4a1a0f5e',
|
||||
'phui-head-thing-view-css' => '31638812',
|
||||
'phui-header-view-css' => '26cffd3d',
|
||||
'phui-head-thing-view-css' => 'fd311e5f',
|
||||
'phui-header-view-css' => '230254d3',
|
||||
'phui-hovercard' => '1bd28176',
|
||||
'phui-hovercard-view-css' => 'de1a2119',
|
||||
'phui-icon-set-selector-css' => '1ab67aad',
|
||||
'phui-icon-view-css' => '3f33ab57',
|
||||
'phui-image-mask-css' => 'a8498f9c',
|
||||
'phui-info-panel-css' => '27ea50a1',
|
||||
'phui-info-view-css' => '6d7c3509',
|
||||
'phui-info-view-css' => '28efab79',
|
||||
'phui-inline-comment-view-css' => '5953c28e',
|
||||
'phui-list-view-css' => '9da2aa00',
|
||||
'phui-object-box-css' => '6b487c57',
|
||||
|
@ -838,7 +838,7 @@ return array(
|
|||
'phui-pager-css' => 'bea33d23',
|
||||
'phui-pinboard-view-css' => '2495140e',
|
||||
'phui-profile-menu-css' => '7e92a89a',
|
||||
'phui-property-list-view-css' => 'b12e801c',
|
||||
'phui-property-list-view-css' => '1d42ee7c',
|
||||
'phui-remarkup-preview-css' => '1a8f2591',
|
||||
'phui-segment-bar-view-css' => '46342871',
|
||||
'phui-spacing-css' => '042804d6',
|
||||
|
@ -846,7 +846,7 @@ return array(
|
|||
'phui-tag-view-css' => '6bbd83e2',
|
||||
'phui-theme-css' => '027ba77e',
|
||||
'phui-timeline-view-css' => 'a0173eba',
|
||||
'phui-two-column-view-css' => '61dd6d38',
|
||||
'phui-two-column-view-css' => 'c110d0c3',
|
||||
'phui-workboard-color-css' => 'ac6fe6a7',
|
||||
'phui-workboard-view-css' => 'e6d89647',
|
||||
'phui-workcard-view-css' => '3646fb96',
|
||||
|
|
|
@ -37,9 +37,11 @@ final class PhabricatorAuditCommitStatusConstants extends Phobject {
|
|||
$color = 'red';
|
||||
break;
|
||||
case self::NEEDS_AUDIT:
|
||||
case self::PARTIALLY_AUDITED:
|
||||
$color = 'orange';
|
||||
break;
|
||||
case self::PARTIALLY_AUDITED:
|
||||
$color = 'yellow';
|
||||
break;
|
||||
case self::FULLY_AUDITED:
|
||||
$color = 'green';
|
||||
break;
|
||||
|
@ -53,11 +55,11 @@ final class PhabricatorAuditCommitStatusConstants extends Phobject {
|
|||
public static function getStatusIcon($code) {
|
||||
switch ($code) {
|
||||
case self::CONCERN_RAISED:
|
||||
$icon = 'fa-exclamation-triangle';
|
||||
$icon = 'fa-exclamation-circle';
|
||||
break;
|
||||
case self::NEEDS_AUDIT:
|
||||
case self::PARTIALLY_AUDITED:
|
||||
$icon = 'fa-exclamation-triangle';
|
||||
$icon = 'fa-exclamation-circle';
|
||||
break;
|
||||
case self::FULLY_AUDITED:
|
||||
$icon = 'fa-check';
|
||||
|
|
|
@ -81,6 +81,21 @@ final class DifferentialChangeType extends Phobject {
|
|||
return idx($icons, $type, 'fa-file');
|
||||
}
|
||||
|
||||
public static function getIconColorForFileType($type) {
|
||||
static $icons = array(
|
||||
self::FILE_TEXT => 'black',
|
||||
self::FILE_IMAGE => 'black',
|
||||
self::FILE_BINARY => 'green',
|
||||
self::FILE_DIRECTORY => 'blue',
|
||||
self::FILE_SYMLINK => 'blue',
|
||||
self::FILE_DELETED => 'red',
|
||||
self::FILE_NORMAL => 'black',
|
||||
self::FILE_SUBMODULE => 'blue',
|
||||
);
|
||||
|
||||
return idx($icons, $type, 'black');
|
||||
}
|
||||
|
||||
public static function isOldLocationChangeType($type) {
|
||||
static $types = array(
|
||||
self::TYPE_MOVE_AWAY => true,
|
||||
|
|
|
@ -9,6 +9,7 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
private $renderURI = '/differential/changeset/';
|
||||
private $whitespace;
|
||||
private $background;
|
||||
private $header;
|
||||
|
||||
private $standaloneURI;
|
||||
private $leftRawFileURI;
|
||||
|
@ -118,6 +119,11 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setHeader($header) {
|
||||
$this->header = $header;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
|
@ -246,8 +252,12 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
));
|
||||
}
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($this->getTitle());
|
||||
if ($this->header) {
|
||||
$header = $this->header;
|
||||
} else {
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($this->getTitle());
|
||||
}
|
||||
|
||||
$content = phutil_tag(
|
||||
'div',
|
||||
|
@ -259,8 +269,8 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setCollapsed(true)
|
||||
->setBackground($this->background)
|
||||
->setCollapsed(true)
|
||||
->appendChild($content);
|
||||
|
||||
return $object_box;
|
||||
|
|
|
@ -48,26 +48,37 @@ final class DiffusionBranchTableController extends DiffusionController {
|
|||
->withRepository($repository)
|
||||
->execute();
|
||||
|
||||
$view = id(new DiffusionBranchTableView())
|
||||
$table = id(new DiffusionBranchTableView())
|
||||
->setUser($viewer)
|
||||
->setBranches($branches)
|
||||
->setCommits($commits)
|
||||
->setDiffusionRequest($drequest);
|
||||
|
||||
$panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Branches'))
|
||||
->setTable($view);
|
||||
|
||||
$content = $panel;
|
||||
$content = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($repository->getName())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
}
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
array(
|
||||
'branches' => true,
|
||||
));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$pager_box = $this->renderTablePagerBox($pager);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Branches'))
|
||||
->setHeaderIcon('fa-code-fork');
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$content,
|
||||
$pager_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
|
@ -77,8 +88,7 @@ final class DiffusionBranchTableController extends DiffusionController {
|
|||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
$content,
|
||||
$pager_box,
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -55,20 +55,17 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
}
|
||||
|
||||
private function browseSearch() {
|
||||
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$header = $this->buildHeaderView($drequest);
|
||||
|
||||
$actions = $this->buildActionView($drequest);
|
||||
$properties = $this->buildPropertyView($drequest, $actions);
|
||||
$search_form = $this->renderSearchForm();
|
||||
$search_results = $this->renderSearchResults();
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($this->buildHeaderView($drequest))
|
||||
->addPropertyList($properties);
|
||||
|
||||
$content = array();
|
||||
|
||||
$content[] = $object_box;
|
||||
$content[] = $this->renderSearchForm($collapsed = false);
|
||||
$content[] = $this->renderSearchResults();
|
||||
$search_form = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Search'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($search_form);
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
array(
|
||||
|
@ -76,6 +73,14 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
'path' => true,
|
||||
'view' => 'browse',
|
||||
));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$search_form,
|
||||
$search_results,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
|
@ -84,7 +89,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
$drequest->getRepository()->getDisplayName(),
|
||||
))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($content);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function browseFile() {
|
||||
|
@ -218,20 +223,18 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
require_celerity_resource('diffusion-source-css');
|
||||
|
||||
// Render the page.
|
||||
$view = $this->buildActionView($drequest);
|
||||
$action_list = $this->enrichActionView(
|
||||
$view = $this->buildCurtain($drequest);
|
||||
$curtain = $this->enrichCurtain(
|
||||
$view,
|
||||
$drequest,
|
||||
$show_blame,
|
||||
$show_color);
|
||||
|
||||
$properties = $this->buildPropertyView($drequest, $action_list);
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($this->buildHeaderView($drequest))
|
||||
->addPropertyList($properties);
|
||||
$properties = $this->buildPropertyView($drequest);
|
||||
$header = $this->buildHeaderView($drequest);
|
||||
$header->setHeaderIcon('fa-file-code-o');
|
||||
|
||||
$content = array();
|
||||
$content[] = $object_box;
|
||||
|
||||
$follow = $request->getStr('follow');
|
||||
if ($follow) {
|
||||
|
@ -277,17 +280,31 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
'path' => true,
|
||||
'view' => 'browse',
|
||||
));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$basename = basename($this->getDiffusionRequest()->getPath());
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setCurtain($curtain)
|
||||
->setMainColumn(array(
|
||||
$content,
|
||||
));
|
||||
|
||||
if ($properties) {
|
||||
$view->addPropertySection(pht('DETAILS'), $properties);
|
||||
}
|
||||
|
||||
$title = array($basename, $repository->getDisplayName());
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
$basename,
|
||||
$repository->getDisplayName(),
|
||||
))
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($content);
|
||||
->appendChild(
|
||||
array(
|
||||
$view,
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
public function browseDirectory(
|
||||
|
@ -300,23 +317,21 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
|
||||
$reason = $results->getReasonForEmptyResultSet();
|
||||
|
||||
$content = array();
|
||||
$actions = $this->buildActionView($drequest);
|
||||
$properties = $this->buildPropertyView($drequest, $actions);
|
||||
$curtain = $this->buildCurtain($drequest);
|
||||
$details = $this->buildPropertyView($drequest);
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($this->buildHeaderView($drequest))
|
||||
->addPropertyList($properties);
|
||||
$header = $this->buildHeaderView($drequest);
|
||||
$header->setHeaderIcon('fa-folder-open');
|
||||
|
||||
$content[] = $object_box;
|
||||
$content[] = $this->renderSearchForm($collapsed = true);
|
||||
$search_form = $this->renderSearchForm();
|
||||
|
||||
$empty_result = null;
|
||||
$browse_panel = null;
|
||||
if (!$results->isValidResults()) {
|
||||
$empty_result = new DiffusionEmptyResultView();
|
||||
$empty_result->setDiffusionRequest($drequest);
|
||||
$empty_result->setDiffusionBrowseResultSet($results);
|
||||
$empty_result->setView($request->getStr('view'));
|
||||
$content[] = $empty_result;
|
||||
} else {
|
||||
$phids = array();
|
||||
foreach ($results->getPaths() as $result) {
|
||||
|
@ -331,21 +346,30 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
$phids = array_keys($phids);
|
||||
$handles = $this->loadViewerHandles($phids);
|
||||
|
||||
$browse_table = new DiffusionBrowseTableView();
|
||||
$browse_table->setDiffusionRequest($drequest);
|
||||
$browse_table->setHandles($handles);
|
||||
$browse_table->setPaths($results->getPaths());
|
||||
$browse_table->setUser($request->getUser());
|
||||
$browse_table = id(new DiffusionBrowseTableView())
|
||||
->setDiffusionRequest($drequest)
|
||||
->setHandles($handles)
|
||||
->setPaths($results->getPaths())
|
||||
->setUser($request->getUser());
|
||||
|
||||
$browse_panel = new PHUIObjectBoxView();
|
||||
$browse_panel->setHeaderText($drequest->getPath(), '/');
|
||||
$browse_panel->setTable($browse_table);
|
||||
$browse_header = id(new PHUIHeaderView())
|
||||
->setHeader(nonempty(basename($drequest->getPath()), '/'))
|
||||
->setHeaderIcon('fa-folder-open');
|
||||
|
||||
$content[] = $browse_panel;
|
||||
$browse_panel = id(new PHUIObjectBoxView())
|
||||
->setHeader($browse_header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($browse_table);
|
||||
|
||||
$browse_panel->setShowHide(
|
||||
array(pht('Show Search')),
|
||||
pht('Hide Search'),
|
||||
$search_form,
|
||||
'#');
|
||||
}
|
||||
|
||||
$content[] = $this->buildOpenRevisions();
|
||||
$content[] = $this->renderDirectoryReadme($results);
|
||||
$open_revisions = $this->buildOpenRevisions();
|
||||
$readme = $this->renderDirectoryReadme($results);
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
array(
|
||||
|
@ -355,18 +379,34 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
));
|
||||
|
||||
$pager_box = $this->renderTablePagerBox($pager);
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setCurtain($curtain)
|
||||
->setMainColumn(array(
|
||||
$empty_result,
|
||||
$browse_panel,
|
||||
))
|
||||
->setFooter(array(
|
||||
$open_revisions,
|
||||
$readme,
|
||||
$pager_box,
|
||||
));
|
||||
|
||||
if ($details) {
|
||||
$view->addPropertySection(pht('DETAILS'), $details);
|
||||
}
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
->setTitle(array(
|
||||
nonempty(basename($drequest->getPath()), '/'),
|
||||
$repository->getDisplayName(),
|
||||
))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
$content,
|
||||
$pager_box,
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -431,6 +471,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
|
||||
$pager_box = $this->renderTablePagerBox($pager);
|
||||
|
@ -697,12 +738,14 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
$edit = $this->renderEditButton();
|
||||
$file = $this->renderFileButton();
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('File Contents'))
|
||||
->setHeader(basename($this->getDiffusionRequest()->getPath()))
|
||||
->setHeaderIcon('fa-file-code-o')
|
||||
->addActionLink($edit)
|
||||
->addActionLink($file);
|
||||
|
||||
$corpus = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($corpus)
|
||||
->setCollapsed(true);
|
||||
|
||||
|
@ -737,16 +780,16 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
return $corpus;
|
||||
}
|
||||
|
||||
private function enrichActionView(
|
||||
PhabricatorActionListView $view,
|
||||
private function enrichCurtain(
|
||||
PHUICurtainView $curtain,
|
||||
DiffusionRequest $drequest,
|
||||
$show_blame,
|
||||
$show_color) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
$base_uri = $this->getRequest()->getRequestURI();
|
||||
|
||||
$view->addAction(
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Show Last Change'))
|
||||
->setHref(
|
||||
|
@ -766,7 +809,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
$blame_value = 1;
|
||||
}
|
||||
|
||||
$view->addAction(
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName($blame_text)
|
||||
->setHref($base_uri->alter('blame', $blame_value))
|
||||
|
@ -784,7 +827,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
$highlight_value = 1;
|
||||
}
|
||||
|
||||
$view->addAction(
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName($highlight_text)
|
||||
->setHref($base_uri->alter('color', $highlight_value))
|
||||
|
@ -809,14 +852,57 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
))->alter('lint', '');
|
||||
}
|
||||
|
||||
$view->addAction(
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName($lint_text)
|
||||
->setHref($href)
|
||||
->setIcon('fa-exclamation-triangle')
|
||||
->setDisabled(!$href));
|
||||
|
||||
return $view;
|
||||
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
$owners = 'PhabricatorOwnersApplication';
|
||||
if (PhabricatorApplication::isClassInstalled($owners)) {
|
||||
$package_query = id(new PhabricatorOwnersPackageQuery())
|
||||
->setViewer($viewer)
|
||||
->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE))
|
||||
->withControl(
|
||||
$repository->getPHID(),
|
||||
array(
|
||||
$drequest->getPath(),
|
||||
));
|
||||
|
||||
$package_query->execute();
|
||||
|
||||
$packages = $package_query->getControllingPackagesForPath(
|
||||
$repository->getPHID(),
|
||||
$drequest->getPath());
|
||||
|
||||
if ($packages) {
|
||||
$ownership = id(new PHUIStatusListView())
|
||||
->setUser($viewer);
|
||||
|
||||
foreach ($packages as $package) {
|
||||
$icon = 'fa-list-alt';
|
||||
$color = 'grey';
|
||||
|
||||
$item = id(new PHUIStatusItemView())
|
||||
->setIcon($icon, $color)
|
||||
->setTarget($viewer->renderHandle($package->getPHID()));
|
||||
|
||||
$ownership->addItem($item);
|
||||
}
|
||||
} else {
|
||||
$ownership = phutil_tag('em', array(), pht('None'));
|
||||
}
|
||||
|
||||
$curtain->newPanel()
|
||||
->setHeaderText(pht('Owners'))
|
||||
->appendChild($ownership);
|
||||
}
|
||||
|
||||
return $curtain;
|
||||
}
|
||||
|
||||
private function renderEditButton() {
|
||||
|
@ -1265,11 +1351,13 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
|
||||
$file = $this->renderFileButton($file_uri);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Image'))
|
||||
->addActionLink($file);
|
||||
->setHeader(basename($this->getDiffusionRequest()->getPath()))
|
||||
->addActionLink($file)
|
||||
->setHeaderIcon('fa-file-image-o');
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($properties);
|
||||
}
|
||||
|
||||
|
@ -1282,11 +1370,12 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
|
||||
$file = $this->renderFileButton($file_uri);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Details'))
|
||||
->setHeader(pht('DETAILS'))
|
||||
->addActionLink($file);
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($text);
|
||||
|
||||
return $box;
|
||||
|
@ -1298,7 +1387,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
->appendChild($message);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Details'));
|
||||
->setHeader(pht('DETAILS'));
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
|
@ -1461,12 +1550,12 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
return "{$summary}\n{$date} \xC2\xB7 {$author}";
|
||||
}
|
||||
|
||||
protected function renderSearchForm($collapsed) {
|
||||
protected function renderSearchForm() {
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
|
||||
$forms = array();
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($this->getRequest()->getUser())
|
||||
->setUser($this->getViewer())
|
||||
->setMethod('GET');
|
||||
|
||||
switch ($drequest->getRepository()->getVersionControlSystem()) {
|
||||
|
@ -1492,22 +1581,10 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
break;
|
||||
}
|
||||
|
||||
$filter = new AphrontListFilterView();
|
||||
$filter->appendChild($forms);
|
||||
require_celerity_resource('diffusion-icons-css');
|
||||
$form_box = phutil_tag_div('diffusion-search-boxen', $forms);
|
||||
|
||||
if ($collapsed) {
|
||||
$filter->setCollapsed(
|
||||
pht('Show Search'),
|
||||
pht('Hide Search'),
|
||||
pht('Search for file names or content in this directory.'),
|
||||
'#');
|
||||
}
|
||||
|
||||
$filter = id(new PHUIBoxView())
|
||||
->addClass('mlt mlb')
|
||||
->appendChild($filter);
|
||||
|
||||
return $filter;
|
||||
return $form_box;
|
||||
}
|
||||
|
||||
protected function markupText($text) {
|
||||
|
@ -1526,28 +1603,29 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
}
|
||||
|
||||
protected function buildHeaderView(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$tag = $this->renderCommitHashTag($drequest);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setUser($viewer)
|
||||
->setHeader($this->renderPathLinks($drequest, $mode = 'browse'))
|
||||
->setPolicyObject($drequest->getRepository());
|
||||
->addTag($tag);
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
protected function buildActionView(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
protected function buildCurtain(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
$curtain = $this->newCurtainView($drequest);
|
||||
|
||||
$history_uri = $drequest->generateURI(
|
||||
array(
|
||||
'action' => 'history',
|
||||
));
|
||||
|
||||
$view->addAction(
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('View History'))
|
||||
->setHref($history_uri)
|
||||
|
@ -1559,40 +1637,22 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
'commit' => '',
|
||||
'action' => 'browse',
|
||||
));
|
||||
$view->addAction(
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Jump to HEAD'))
|
||||
->setHref($head_uri)
|
||||
->setIcon('fa-home')
|
||||
->setDisabled(!$behind_head));
|
||||
|
||||
return $view;
|
||||
return $curtain;
|
||||
}
|
||||
|
||||
protected function buildPropertyView(
|
||||
DiffusionRequest $drequest,
|
||||
PhabricatorActionListView $actions) {
|
||||
DiffusionRequest $drequest) {
|
||||
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
->setActionList($actions);
|
||||
|
||||
$stable_commit = $drequest->getStableCommit();
|
||||
|
||||
$view->addProperty(
|
||||
pht('Commit'),
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $drequest->generateURI(
|
||||
array(
|
||||
'action' => 'commit',
|
||||
'commit' => $stable_commit,
|
||||
)),
|
||||
),
|
||||
$drequest->getRepository()->formatCommitName($stable_commit)));
|
||||
->setUser($viewer);
|
||||
|
||||
if ($drequest->getSymbolicType() == 'tag') {
|
||||
$symbolic = $drequest->getSymbolicCommit();
|
||||
|
@ -1616,47 +1676,11 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
}
|
||||
}
|
||||
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
$owners = 'PhabricatorOwnersApplication';
|
||||
if (PhabricatorApplication::isClassInstalled($owners)) {
|
||||
$package_query = id(new PhabricatorOwnersPackageQuery())
|
||||
->setViewer($viewer)
|
||||
->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE))
|
||||
->withControl(
|
||||
$repository->getPHID(),
|
||||
array(
|
||||
$drequest->getPath(),
|
||||
));
|
||||
|
||||
$package_query->execute();
|
||||
|
||||
$packages = $package_query->getControllingPackagesForPath(
|
||||
$repository->getPHID(),
|
||||
$drequest->getPath());
|
||||
|
||||
if ($packages) {
|
||||
$ownership = id(new PHUIStatusListView())
|
||||
->setUser($viewer);
|
||||
|
||||
foreach ($packages as $package) {
|
||||
$icon = 'fa-list-alt';
|
||||
$color = 'grey';
|
||||
|
||||
$item = id(new PHUIStatusItemView())
|
||||
->setIcon($icon, $color)
|
||||
->setTarget($viewer->renderHandle($package->getPHID()));
|
||||
|
||||
$ownership->addItem($item);
|
||||
}
|
||||
} else {
|
||||
$ownership = phutil_tag('em', array(), pht('None'));
|
||||
}
|
||||
|
||||
$view->addProperty(pht('Packages'), $ownership);
|
||||
if ($view->hasAnyProperties()) {
|
||||
return $view;
|
||||
}
|
||||
|
||||
return $view;
|
||||
return null;
|
||||
}
|
||||
|
||||
private function buildOpenRevisions() {
|
||||
|
|
|
@ -15,8 +15,6 @@ final class DiffusionChangeController extends DiffusionController {
|
|||
$viewer = $this->getViewer();
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
|
||||
$content = array();
|
||||
|
||||
$data = $this->callConduitWithDiffusionRequest(
|
||||
'diffusion.diffquery',
|
||||
array(
|
||||
|
@ -42,9 +40,11 @@ final class DiffusionChangeController extends DiffusionController {
|
|||
0 => $changeset,
|
||||
);
|
||||
|
||||
$changeset_header = $this->buildChangesetHeader($drequest);
|
||||
|
||||
$changeset_view = new DifferentialChangesetListView();
|
||||
$changeset_view->setTitle(pht('Change'));
|
||||
$changeset_view->setChangesets($changesets);
|
||||
$changeset_view->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
$changeset_view->setVisibleChangesets($changesets);
|
||||
$changeset_view->setRenderingReferences(
|
||||
array(
|
||||
|
@ -68,11 +68,11 @@ final class DiffusionChangeController extends DiffusionController {
|
|||
$changeset_view->setWhitespace(
|
||||
DifferentialChangesetParser::WHITESPACE_SHOW_ALL);
|
||||
$changeset_view->setUser($viewer);
|
||||
$changeset_view->setHeader($changeset_header);
|
||||
|
||||
// TODO: This is pretty awkward, unify the CSS between Diffusion and
|
||||
// Differential better.
|
||||
require_celerity_resource('differential-core-view-css');
|
||||
$content[] = $changeset_view->render();
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
array(
|
||||
|
@ -80,19 +80,18 @@ final class DiffusionChangeController extends DiffusionController {
|
|||
'path' => true,
|
||||
'view' => 'change',
|
||||
));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$links = $this->renderPathLinks($drequest, $mode = 'browse');
|
||||
$header = $this->buildHeader($drequest, $links);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($links)
|
||||
->setUser($viewer)
|
||||
->setPolicyObject($drequest->getRepository());
|
||||
$actions = $this->buildActionView($drequest);
|
||||
$properties = $this->buildPropertyView($drequest, $actions);
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($properties);
|
||||
->setMainColumn(array(
|
||||
))
|
||||
->setFooter(array(
|
||||
$changeset_view,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
|
@ -103,25 +102,41 @@ final class DiffusionChangeController extends DiffusionController {
|
|||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
$object_box,
|
||||
$content,
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
private function buildActionView(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
private function buildHeader(
|
||||
DiffusionRequest $drequest,
|
||||
$links) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
$tag = $this->renderCommitHashTag($drequest);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($links)
|
||||
->setUser($viewer)
|
||||
->setPolicyObject($drequest->getRepository())
|
||||
->addTag($tag);
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
private function buildChangesetHeader(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Changes'));
|
||||
|
||||
$history_uri = $drequest->generateURI(
|
||||
array(
|
||||
'action' => 'history',
|
||||
));
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('View History'))
|
||||
$header->addActionLink(
|
||||
id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText(pht('View History'))
|
||||
->setHref($history_uri)
|
||||
->setIcon('fa-clock-o'));
|
||||
|
||||
|
@ -130,13 +145,14 @@ final class DiffusionChangeController extends DiffusionController {
|
|||
'action' => 'browse',
|
||||
));
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Browse Content'))
|
||||
$header->addActionLink(
|
||||
id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText(pht('Browse Content'))
|
||||
->setHref($browse_uri)
|
||||
->setIcon('fa-files-o'));
|
||||
|
||||
return $view;
|
||||
return $header;
|
||||
}
|
||||
|
||||
protected function buildPropertyView(
|
||||
|
|
|
@ -24,8 +24,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
}
|
||||
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
|
||||
$user = $request->getUser();
|
||||
$viewer = $request->getUser();
|
||||
|
||||
if ($request->getStr('diff')) {
|
||||
return $this->buildRawDiffResponse($drequest);
|
||||
|
@ -33,9 +32,8 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
$content = array();
|
||||
$commit = id(new DiffusionCommitQuery())
|
||||
->setViewer($request->getUser())
|
||||
->setViewer($viewer)
|
||||
->withRepository($repository)
|
||||
->withIdentifiers(array($drequest->getCommit()))
|
||||
->needCommitData(true)
|
||||
|
@ -45,6 +43,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$crumbs = $this->buildCrumbs(array(
|
||||
'commit' => true,
|
||||
));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
if (!$commit) {
|
||||
if (!$this->getCommitExists()) {
|
||||
|
@ -70,10 +69,11 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$audit_requests = $commit->getAudits();
|
||||
$this->auditAuthorityPHIDs =
|
||||
PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($user);
|
||||
PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($viewer);
|
||||
|
||||
$commit_data = $commit->getCommitData();
|
||||
$is_foreign = $commit_data->getCommitDetail('foreign-svn-stub');
|
||||
$error_panel = null;
|
||||
if ($is_foreign) {
|
||||
$subpath = $commit_data->getCommitDetail('svn-subpath');
|
||||
|
||||
|
@ -87,43 +87,41 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
"didn't affect the tracked subdirectory ('%s'), so no ".
|
||||
"information is available.",
|
||||
$subpath));
|
||||
$content[] = $error_panel;
|
||||
} else {
|
||||
$engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
|
||||
$engine->setConfig('viewer', $user);
|
||||
$engine->setConfig('viewer', $viewer);
|
||||
|
||||
$headsup_view = id(new PHUIHeaderView())
|
||||
$commit_tag = $this->renderCommitHashTag($drequest);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(nonempty($commit->getSummary(), pht('Commit Detail')))
|
||||
->setSubheader(pht('Commit: %s', $commit->getCommitIdentifier()));
|
||||
->setHeaderIcon('fa-code-fork')
|
||||
->addTag($commit_tag);
|
||||
|
||||
$headsup_actions = $this->renderHeadsupActionList($commit, $repository);
|
||||
if ($commit->getAuditStatus()) {
|
||||
$icon = PhabricatorAuditCommitStatusConstants::getStatusIcon(
|
||||
$commit->getAuditStatus());
|
||||
$color = PhabricatorAuditCommitStatusConstants::getStatusColor(
|
||||
$commit->getAuditStatus());
|
||||
$status = PhabricatorAuditCommitStatusConstants::getStatusName(
|
||||
$commit->getAuditStatus());
|
||||
|
||||
$commit_properties = $this->loadCommitProperties(
|
||||
$header->setStatus($icon, $color, $status);
|
||||
}
|
||||
|
||||
$curtain = $this->buildCurtain($commit, $repository);
|
||||
$subheader = $this->buildSubheaderView($commit, $commit_data);
|
||||
$details = $this->buildPropertyListView(
|
||||
$commit,
|
||||
$commit_data,
|
||||
$audit_requests);
|
||||
$property_list = id(new PHUIPropertyListView())
|
||||
->setHasKeyboardShortcuts(true)
|
||||
->setUser($user)
|
||||
->setObject($commit);
|
||||
foreach ($commit_properties as $key => $value) {
|
||||
$property_list->addProperty($key, $value);
|
||||
}
|
||||
|
||||
$message = $commit_data->getCommitMessage();
|
||||
|
||||
$revision = $commit->getCommitIdentifier();
|
||||
$message = $this->linkBugtraq($message);
|
||||
|
||||
$message = $engine->markupText($message);
|
||||
|
||||
$property_list->invokeWillRenderEvent();
|
||||
$property_list->setActionList($headsup_actions);
|
||||
|
||||
$detail_list = new PHUIPropertyListView();
|
||||
$detail_list->addSectionHeader(
|
||||
pht('Description'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
$detail_list->addTextContent(
|
||||
phutil_tag(
|
||||
'div',
|
||||
|
@ -132,19 +130,14 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
),
|
||||
$message));
|
||||
|
||||
$headsup_view->setTall(true);
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($headsup_view)
|
||||
->setFormErrors($this->getCommitErrors())
|
||||
->addPropertyList($property_list)
|
||||
->addPropertyList($detail_list);
|
||||
|
||||
$content[] = $object_box;
|
||||
if ($this->getCommitErrors()) {
|
||||
$error_panel = id(new PHUIInfoView())
|
||||
->appendChild($this->getCommitErrors())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
$content[] = $this->buildComments($commit);
|
||||
|
||||
$timeline = $this->buildComments($commit);
|
||||
$hard_limit = 1000;
|
||||
|
||||
if ($commit->isImported()) {
|
||||
|
@ -161,10 +154,10 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$changes = array_slice($changes, 0, $hard_limit);
|
||||
}
|
||||
|
||||
$content[] = $this->buildMergesTable($commit);
|
||||
$merge_table = $this->buildMergesTable($commit);
|
||||
|
||||
$highlighted_audits = $commit->getAuthorityAudits(
|
||||
$user,
|
||||
$viewer,
|
||||
$this->auditAuthorityPHIDs);
|
||||
|
||||
$count = count($changes);
|
||||
|
@ -179,32 +172,35 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
}
|
||||
|
||||
$show_changesets = false;
|
||||
$info_panel = null;
|
||||
$change_list = null;
|
||||
$change_table = null;
|
||||
if ($bad_commit) {
|
||||
$content[] = $this->renderStatusMessage(
|
||||
$info_panel = $this->renderStatusMessage(
|
||||
pht('Bad Commit'),
|
||||
$bad_commit['description']);
|
||||
} else if ($is_foreign) {
|
||||
// Don't render anything else.
|
||||
} else if (!$commit->isImported()) {
|
||||
$content[] = $this->renderStatusMessage(
|
||||
$info_panel = $this->renderStatusMessage(
|
||||
pht('Still Importing...'),
|
||||
pht(
|
||||
'This commit is still importing. Changes will be visible once '.
|
||||
'the import finishes.'));
|
||||
} else if (!count($changes)) {
|
||||
$content[] = $this->renderStatusMessage(
|
||||
$info_panel = $this->renderStatusMessage(
|
||||
pht('Empty Commit'),
|
||||
pht(
|
||||
'This commit is empty and does not affect any paths.'));
|
||||
} else if ($was_limited) {
|
||||
$content[] = $this->renderStatusMessage(
|
||||
$info_panel = $this->renderStatusMessage(
|
||||
pht('Enormous Commit'),
|
||||
pht(
|
||||
'This commit is enormous, and affects more than %d files. '.
|
||||
'Changes are not shown.',
|
||||
$hard_limit));
|
||||
} else if (!$this->getCommitExists()) {
|
||||
$content[] = $this->renderStatusMessage(
|
||||
$info_panel = $this->renderStatusMessage(
|
||||
pht('Commit No Longer Exists'),
|
||||
pht('This commit no longer exists in the repository.'));
|
||||
} else {
|
||||
|
@ -214,7 +210,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
// changes inline even if there are more than the soft limit.
|
||||
$show_all_details = $request->getBool('show_all');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
$change_header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Changes (%s)', new PhutilNumber($count)));
|
||||
|
||||
$warning_view = null;
|
||||
|
@ -228,24 +224,23 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$warning_view = id(new PHUIInfoView())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_WARNING)
|
||||
->setTitle(pht('Very Large Commit'))
|
||||
->addButton($button)
|
||||
->appendChild(
|
||||
pht('This commit is very large. Load each file individually.'));
|
||||
|
||||
$change_header->addActionLink($button);
|
||||
}
|
||||
|
||||
$changesets = DiffusionPathChange::convertToDifferentialChangesets(
|
||||
$user,
|
||||
$viewer,
|
||||
$changes);
|
||||
|
||||
// TODO: This table and panel shouldn't really be separate, but we need
|
||||
// to clean up the "Load All Files" interaction first.
|
||||
$change_table = $this->buildTableOfContents(
|
||||
$changesets,
|
||||
$header,
|
||||
$change_header,
|
||||
$warning_view);
|
||||
|
||||
$content[] = $change_table;
|
||||
|
||||
$vcs = $repository->getVersionControlSystem();
|
||||
switch ($vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
|
@ -291,7 +286,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
} else {
|
||||
$visible_changesets = array();
|
||||
$inlines = PhabricatorAuditInlineComment::loadDraftAndPublishedComments(
|
||||
$user,
|
||||
$viewer,
|
||||
$commit->getPHID());
|
||||
$path_ids = mpull($inlines, null, 'getPathID');
|
||||
foreach ($changesets as $key => $changeset) {
|
||||
|
@ -308,10 +303,10 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$change_list->setChangesets($changesets);
|
||||
$change_list->setVisibleChangesets($visible_changesets);
|
||||
$change_list->setRenderingReferences($references);
|
||||
$change_list->setRenderURI(
|
||||
$repository->getPathURI('diff/'));
|
||||
$change_list->setRenderURI($repository->getPathURI('diff/'));
|
||||
$change_list->setRepository($repository);
|
||||
$change_list->setUser($user);
|
||||
$change_list->setUser($viewer);
|
||||
$change_list->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
|
||||
// TODO: Try to setBranch() to something reasonable here?
|
||||
|
||||
|
@ -327,48 +322,74 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$change_list->setInlineCommentControllerURI(
|
||||
'/diffusion/inline/edit/'.phutil_escape_uri($commit->getPHID()).'/');
|
||||
|
||||
$content[] = $change_list->render();
|
||||
}
|
||||
|
||||
$content[] = $this->renderAddCommentPanel($commit, $audit_requests);
|
||||
$add_comment = $this->renderAddCommentPanel($commit, $audit_requests);
|
||||
|
||||
$prefs = $user->loadPreferences();
|
||||
$prefs = $viewer->loadPreferences();
|
||||
$pref_filetree = PhabricatorUserPreferences::PREFERENCE_DIFF_FILETREE;
|
||||
$pref_collapse = PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED;
|
||||
$show_filetree = $prefs->getPreference($pref_filetree);
|
||||
$collapsed = $prefs->getPreference($pref_collapse);
|
||||
|
||||
$nav = null;
|
||||
if ($show_changesets && $show_filetree) {
|
||||
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
||||
->setTitle($commit->getDisplayName())
|
||||
->setBaseURI(new PhutilURI($commit->getURI()))
|
||||
->build($changesets)
|
||||
->setCrumbs($crumbs)
|
||||
->setCollapsed((bool)$collapsed)
|
||||
->appendChild($content);
|
||||
$content = $nav;
|
||||
} else {
|
||||
$content = array($crumbs, $content);
|
||||
->setCollapsed((bool)$collapsed);
|
||||
}
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$content,
|
||||
array(
|
||||
'title' => $commit->getDisplayName(),
|
||||
'pageObjects' => array($commit->getPHID()),
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setSubheader($subheader)
|
||||
->setMainColumn(array(
|
||||
$error_panel,
|
||||
$timeline,
|
||||
$merge_table,
|
||||
$info_panel,
|
||||
))
|
||||
->setFooter(array(
|
||||
$change_table,
|
||||
$change_list,
|
||||
$add_comment,
|
||||
))
|
||||
->addPropertySection(pht('DESCRIPTION'), $detail_list)
|
||||
->addPropertySection(pht('DETAILS'), $details)
|
||||
->setCurtain($curtain);
|
||||
|
||||
$page = $this->newPage()
|
||||
->setTitle($commit->getDisplayName())
|
||||
->setCrumbs($crumbs)
|
||||
->setPageObjectPHIDS(array($commit->getPHID()))
|
||||
->appendChild(
|
||||
array(
|
||||
$view,
|
||||
));
|
||||
|
||||
if ($nav) {
|
||||
$page->setNavigation($nav);
|
||||
}
|
||||
|
||||
return $page;
|
||||
|
||||
}
|
||||
|
||||
private function loadCommitProperties(
|
||||
private function buildPropertyListView(
|
||||
PhabricatorRepositoryCommit $commit,
|
||||
PhabricatorRepositoryCommitData $data,
|
||||
array $audit_requests) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
$commit_phid = $commit->getPHID();
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($this->getRequest()->getUser());
|
||||
|
||||
$edge_query = id(new PhabricatorEdgeQuery())
|
||||
->withSourcePHIDs(array($commit_phid))
|
||||
->withEdgeTypes(array(
|
||||
|
@ -432,31 +453,6 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$props = array();
|
||||
|
||||
if ($commit->getAuditStatus()) {
|
||||
$status = PhabricatorAuditCommitStatusConstants::getStatusName(
|
||||
$commit->getAuditStatus());
|
||||
$tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_STATE)
|
||||
->setName($status);
|
||||
|
||||
switch ($commit->getAuditStatus()) {
|
||||
case PhabricatorAuditCommitStatusConstants::NEEDS_AUDIT:
|
||||
$tag->setBackgroundColor(PHUITagView::COLOR_ORANGE);
|
||||
break;
|
||||
case PhabricatorAuditCommitStatusConstants::CONCERN_RAISED:
|
||||
$tag->setBackgroundColor(PHUITagView::COLOR_RED);
|
||||
break;
|
||||
case PhabricatorAuditCommitStatusConstants::PARTIALLY_AUDITED:
|
||||
$tag->setBackgroundColor(PHUITagView::COLOR_BLUE);
|
||||
break;
|
||||
case PhabricatorAuditCommitStatusConstants::FULLY_AUDITED:
|
||||
$tag->setBackgroundColor(PHUITagView::COLOR_GREEN);
|
||||
break;
|
||||
}
|
||||
|
||||
$props['Status'] = $tag;
|
||||
}
|
||||
|
||||
if ($audit_requests) {
|
||||
$user_requests = array();
|
||||
$other_requests = array();
|
||||
|
@ -469,37 +465,21 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
}
|
||||
|
||||
if ($user_requests) {
|
||||
$props['Auditors'] = $this->renderAuditStatusView(
|
||||
$user_requests);
|
||||
$view->addProperty(
|
||||
pht('Auditors'),
|
||||
$this->renderAuditStatusView($user_requests));
|
||||
}
|
||||
|
||||
if ($other_requests) {
|
||||
$props['Project/Package Auditors'] = $this->renderAuditStatusView(
|
||||
$other_requests);
|
||||
$view->addProperty(
|
||||
pht('Project/Package Auditors'),
|
||||
$this->renderAuditStatusView($other_requests));
|
||||
}
|
||||
}
|
||||
|
||||
$author_phid = $data->getCommitDetail('authorPHID');
|
||||
$author_name = $data->getAuthorName();
|
||||
|
||||
if (!$repository->isSVN()) {
|
||||
$authored_info = id(new PHUIStatusItemView());
|
||||
|
||||
$author_epoch = $data->getCommitDetail('authorEpoch');
|
||||
if ($author_epoch !== null) {
|
||||
$authored_info->setNote(
|
||||
phabricator_datetime($author_epoch, $viewer));
|
||||
}
|
||||
|
||||
if ($author_phid) {
|
||||
$authored_info->setTarget($handles[$author_phid]->renderLink());
|
||||
} else if (strlen($author_name)) {
|
||||
$authored_info->setTarget($author_name);
|
||||
}
|
||||
|
||||
$props['Authored'] = id(new PHUIStatusListView())
|
||||
->addItem($authored_info);
|
||||
}
|
||||
$author_epoch = $data->getCommitDetail('authorEpoch');
|
||||
|
||||
$committed_info = id(new PHUIStatusItemView())
|
||||
->setNote(phabricator_datetime($commit->getEpoch(), $viewer));
|
||||
|
@ -516,8 +496,9 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$committed_info->setTarget($author_name);
|
||||
}
|
||||
|
||||
$props['Committed'] = id(new PHUIStatusListView())
|
||||
->addItem($committed_info);
|
||||
$view->addProperty(
|
||||
pht('Committed'),
|
||||
$committed_info);
|
||||
|
||||
if ($push_logs) {
|
||||
$pushed_list = new PHUIStatusListView();
|
||||
|
@ -529,36 +510,49 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$pushed_list->addItem($pushed_item);
|
||||
}
|
||||
|
||||
$props['Pushed'] = $pushed_list;
|
||||
$view->addProperty(
|
||||
pht('Pushed'),
|
||||
$pushed_list);
|
||||
}
|
||||
|
||||
$reviewer_phid = $data->getCommitDetail('reviewerPHID');
|
||||
if ($reviewer_phid) {
|
||||
$props['Reviewer'] = $handles[$reviewer_phid]->renderLink();
|
||||
$view->addProperty(
|
||||
pht('Reviewer'),
|
||||
$handles[$reviewer_phid]->renderLink());
|
||||
}
|
||||
|
||||
if ($revision_phid) {
|
||||
$props['Differential Revision'] = $handles[$revision_phid]->renderLink();
|
||||
$view->addProperty(
|
||||
pht('Differential Revision'),
|
||||
$handles[$revision_phid]->renderLink());
|
||||
}
|
||||
|
||||
$parents = $this->getCommitParents();
|
||||
if ($parents) {
|
||||
$props['Parents'] = $viewer->renderHandleList(mpull($parents, 'getPHID'));
|
||||
$view->addProperty(
|
||||
pht('Parents'),
|
||||
$viewer->renderHandleList(mpull($parents, 'getPHID')));
|
||||
}
|
||||
|
||||
if ($this->getCommitExists()) {
|
||||
$props['Branches'] = phutil_tag(
|
||||
$view->addProperty(
|
||||
pht('Branches'),
|
||||
phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'id' => 'commit-branches',
|
||||
),
|
||||
pht('Unknown'));
|
||||
$props['Tags'] = phutil_tag(
|
||||
pht('Unknown')));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Tags'),
|
||||
phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'id' => 'commit-tags',
|
||||
),
|
||||
pht('Unknown'));
|
||||
pht('Unknown')));
|
||||
|
||||
$identifier = $commit->getCommitIdentifier();
|
||||
$root = $repository->getPathURI("commit/{$identifier}");
|
||||
|
@ -581,16 +575,21 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
),
|
||||
$ref_data['ref']);
|
||||
}
|
||||
$props['References'] = phutil_implode_html(', ', $ref_links);
|
||||
$view->addProperty(
|
||||
pht('References'),
|
||||
phutil_implode_html(', ', $ref_links));
|
||||
}
|
||||
|
||||
if ($reverts_phids) {
|
||||
$props[pht('Reverts')] = $viewer->renderHandleList($reverts_phids);
|
||||
$view->addProperty(
|
||||
pht('Reverts'),
|
||||
$viewer->renderHandleList($reverts_phids));
|
||||
}
|
||||
|
||||
if ($reverted_by_phids) {
|
||||
$props[pht('Reverted By')] = $viewer->renderHandleList(
|
||||
$reverted_by_phids);
|
||||
$view->addProperty(
|
||||
pht('Reverted By'),
|
||||
$viewer->renderHandleList($reverted_by_phids));
|
||||
}
|
||||
|
||||
if ($task_phids) {
|
||||
|
@ -599,12 +598,60 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$task_list[] = $handles[$phid]->renderLink();
|
||||
}
|
||||
$task_list = phutil_implode_html(phutil_tag('br'), $task_list);
|
||||
$props['Tasks'] = $task_list;
|
||||
$view->addProperty(
|
||||
pht('Tasks'),
|
||||
$task_list);
|
||||
}
|
||||
|
||||
return $props;
|
||||
return $view;
|
||||
}
|
||||
|
||||
private function buildSubheaderView(
|
||||
PhabricatorRepositoryCommit $commit,
|
||||
PhabricatorRepositoryCommitData $data) {
|
||||
|
||||
$viewer = $this->getViewer();
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
if ($repository->isSVN()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$author_phid = $data->getCommitDetail('authorPHID');
|
||||
$author_name = $data->getAuthorName();
|
||||
$author_epoch = $data->getCommitDetail('authorEpoch');
|
||||
$date = null;
|
||||
if ($author_epoch !== null) {
|
||||
$date = phabricator_datetime($author_epoch, $viewer);
|
||||
}
|
||||
|
||||
if ($author_phid) {
|
||||
$handles = $viewer->loadHandles(array($author_phid));
|
||||
$image_uri = $handles[$author_phid]->getImageURI();
|
||||
$image_href = $handles[$author_phid]->getURI();
|
||||
$author = $handles[$author_phid]->renderLink();
|
||||
} else if (strlen($author_name)) {
|
||||
$author = $author_name;
|
||||
$image_uri = null;
|
||||
$image_href = null;
|
||||
}
|
||||
|
||||
$author = phutil_tag('strong', array(), $author);
|
||||
if ($date) {
|
||||
$content = pht('Authored by %s on %s.', $author, $date);
|
||||
} else {
|
||||
$content = pht('Authored by %s.', $author);
|
||||
}
|
||||
|
||||
return id(new PHUIHeadThingView())
|
||||
->setImage($image_uri)
|
||||
->setImageHref($image_href)
|
||||
->setContent($content);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function buildComments(PhabricatorRepositoryCommit $commit) {
|
||||
$timeline = $this->buildTransactionTimeline(
|
||||
$commit,
|
||||
|
@ -619,11 +666,11 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest');
|
||||
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
$viewer = $request->getUser();
|
||||
|
||||
if (!$user->isLoggedIn()) {
|
||||
if (!$viewer->isLoggedIn()) {
|
||||
return id(new PhabricatorApplicationTransactionCommentView())
|
||||
->setUser($user)
|
||||
->setUser($viewer)
|
||||
->setRequestURI($request->getRequestURI());
|
||||
}
|
||||
|
||||
|
@ -638,7 +685,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$draft = id(new PhabricatorDraft())->loadOneWhere(
|
||||
'authorPHID = %s AND draftKey = %s',
|
||||
$user->getPHID(),
|
||||
$viewer->getPHID(),
|
||||
'diffusion-audit-'.$commit->getID());
|
||||
if ($draft) {
|
||||
$draft = $draft->getDraft();
|
||||
|
@ -652,7 +699,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$auditor_source = new DiffusionAuditorDatasource();
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
->setUser($viewer)
|
||||
->setAction('/audit/addcomment/')
|
||||
->addHiddenInput('commit', $commit->getPHID())
|
||||
->appendChild(
|
||||
|
@ -685,7 +732,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
->setName('content')
|
||||
->setValue($draft)
|
||||
->setID('audit-content')
|
||||
->setUser($user))
|
||||
->setUser($viewer))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Submit')));
|
||||
|
@ -771,13 +818,13 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
PhabricatorRepositoryCommit $commit,
|
||||
array $audit_requests) {
|
||||
assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest');
|
||||
$user = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$user_is_author = ($commit->getAuthorPHID() == $user->getPHID());
|
||||
$user_is_author = ($commit->getAuthorPHID() == $viewer->getPHID());
|
||||
|
||||
$user_request = null;
|
||||
foreach ($audit_requests as $audit_request) {
|
||||
if ($audit_request->getAuditorPHID() == $user->getPHID()) {
|
||||
if ($audit_request->getAuditorPHID() == $viewer->getPHID()) {
|
||||
$user_request = $audit_request;
|
||||
break;
|
||||
}
|
||||
|
@ -871,9 +918,10 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$history_table->loadRevisions();
|
||||
|
||||
$panel = new PHUIObjectBoxView();
|
||||
$panel->setHeaderText(pht('Merged Changes'));
|
||||
$panel->setTable($history_table);
|
||||
$panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Merged Changes'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($history_table);
|
||||
if ($caption) {
|
||||
$panel->setInfoView($caption);
|
||||
}
|
||||
|
@ -881,19 +929,16 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
return $panel;
|
||||
}
|
||||
|
||||
private function renderHeadsupActionList(
|
||||
private function buildCurtain(
|
||||
PhabricatorRepositoryCommit $commit,
|
||||
PhabricatorRepository $repository) {
|
||||
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$actions = id(new PhabricatorActionListView())
|
||||
->setUser($user)
|
||||
->setObject($commit);
|
||||
$viewer = $this->getViewer();
|
||||
$curtain = $this->newCurtainView($commit);
|
||||
|
||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||
$user,
|
||||
$viewer,
|
||||
$commit,
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
|
@ -906,7 +951,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
->setIcon('fa-pencil')
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit);
|
||||
$actions->addAction($action);
|
||||
$curtain->addAction($action);
|
||||
|
||||
require_celerity_resource('phabricator-object-selector-css');
|
||||
require_celerity_resource('javelin-behavior-phabricator-object-selector');
|
||||
|
@ -919,16 +964,16 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
->setHref('/search/attach/'.$commit->getPHID().'/TASK/edge/')
|
||||
->setWorkflow(true)
|
||||
->setDisabled(!$can_edit);
|
||||
$actions->addAction($action);
|
||||
$curtain->addAction($action);
|
||||
}
|
||||
|
||||
$action = id(new PhabricatorActionView())
|
||||
->setName(pht('Download Raw Diff'))
|
||||
->setHref($request->getRequestURI()->alter('diff', true))
|
||||
->setIcon('fa-download');
|
||||
$actions->addAction($action);
|
||||
$curtain->addAction($action);
|
||||
|
||||
return $actions;
|
||||
return $curtain;
|
||||
}
|
||||
|
||||
private function buildRawDiffResponse(DiffusionRequest $drequest) {
|
||||
|
@ -1022,7 +1067,8 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$toc_view = id(new PHUIDiffTableOfContentsListView())
|
||||
->setUser($viewer)
|
||||
->setHeader($header);
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
|
||||
if ($info_view) {
|
||||
$toc_view->setInfoView($info_view);
|
||||
|
|
|
@ -291,6 +291,7 @@ abstract class DiffusionController extends PhabricatorController {
|
|||
return id(new PHUIInfoView())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_WARNING)
|
||||
->setTitle($title)
|
||||
->setFlush(true)
|
||||
->appendChild($body);
|
||||
}
|
||||
|
||||
|
@ -300,6 +301,27 @@ abstract class DiffusionController extends PhabricatorController {
|
|||
->appendChild($pager);
|
||||
}
|
||||
|
||||
protected function renderCommitHashTag(DiffusionRequest $drequest) {
|
||||
$stable_commit = $drequest->getStableCommit();
|
||||
$commit = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $drequest->generateURI(
|
||||
array(
|
||||
'action' => 'commit',
|
||||
'commit' => $stable_commit,
|
||||
)),
|
||||
),
|
||||
$drequest->getRepository()->formatCommitName($stable_commit, true));
|
||||
|
||||
$tag = id(new PHUITagView())
|
||||
->setName($commit)
|
||||
->setShade('indigo')
|
||||
->setType(PHUITagView::TYPE_SHADE);
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
||||
protected function renderDirectoryReadme(DiffusionBrowseResultSet $browse) {
|
||||
$readme_path = $browse->getReadmePath();
|
||||
if ($readme_path === null) {
|
||||
|
|
|
@ -40,8 +40,6 @@ final class DiffusionHistoryController extends DiffusionController {
|
|||
$history = $pager->sliceResults($history);
|
||||
|
||||
$show_graph = !strlen($drequest->getPath());
|
||||
$content = array();
|
||||
|
||||
$history_table = id(new DiffusionHistoryTableView())
|
||||
->setUser($request->getUser())
|
||||
->setDiffusionRequest($drequest)
|
||||
|
@ -55,23 +53,13 @@ final class DiffusionHistoryController extends DiffusionController {
|
|||
$history_table->setIsTail(!$pager->getHasMorePages());
|
||||
}
|
||||
|
||||
$history_panel = new PHUIObjectBoxView();
|
||||
$history_panel->setHeaderText(pht('History'));
|
||||
$history_panel->setTable($history_table);
|
||||
$history_header = $this->buildHistoryHeader($drequest);
|
||||
$history_panel = id(new PHUIObjectBoxView())
|
||||
->setHeader($history_header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($history_table);
|
||||
|
||||
$content[] = $history_panel;
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setUser($viewer)
|
||||
->setPolicyObject($repository)
|
||||
->setHeader($this->renderPathLinks($drequest, $mode = 'history'));
|
||||
|
||||
$actions = $this->buildActionView($drequest);
|
||||
$properties = $this->buildPropertyView($drequest, $actions);
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($properties);
|
||||
$header = $this->buildHeader($drequest, $repository);
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
array(
|
||||
|
@ -79,9 +67,17 @@ final class DiffusionHistoryController extends DiffusionController {
|
|||
'path' => true,
|
||||
'view' => 'history',
|
||||
));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$pager_box = $this->renderTablePagerBox($pager);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$history_panel,
|
||||
$pager_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
|
@ -91,28 +87,39 @@ final class DiffusionHistoryController extends DiffusionController {
|
|||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
$object_box,
|
||||
$content,
|
||||
$pager_box,
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
private function buildActionView(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
private function buildHeader(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
$tag = $this->renderCommitHashTag($drequest);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setUser($viewer)
|
||||
->setPolicyObject($drequest->getRepository())
|
||||
->addTag($tag)
|
||||
->setHeader($this->renderPathLinks($drequest, $mode = 'history'))
|
||||
->setHeaderIcon('fa-clock-o');
|
||||
|
||||
return $header;
|
||||
|
||||
}
|
||||
|
||||
private function buildHistoryHeader(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$browse_uri = $drequest->generateURI(
|
||||
array(
|
||||
'action' => 'browse',
|
||||
));
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Browse Content'))
|
||||
->setHref($browse_uri)
|
||||
->setIcon('fa-files-o'));
|
||||
$browse_button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText(pht('Browse'))
|
||||
->setHref($browse_uri)
|
||||
->setIcon('fa-files-o');
|
||||
|
||||
// TODO: Sometimes we do have a change view, we need to look at the most
|
||||
// recent history entry to figure it out.
|
||||
|
@ -130,41 +137,18 @@ final class DiffusionHistoryController extends DiffusionController {
|
|||
->alter('copies', true);
|
||||
}
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName($branch_name)
|
||||
->setIcon('fa-code-fork')
|
||||
->setHref($branch_uri));
|
||||
$branch_button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText($branch_name)
|
||||
->setIcon('fa-code-fork')
|
||||
->setHref($branch_uri);
|
||||
|
||||
return $view;
|
||||
}
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('History'))
|
||||
->addActionLink($browse_button)
|
||||
->addActionLink($branch_button);
|
||||
|
||||
protected function buildPropertyView(
|
||||
DiffusionRequest $drequest,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
->setActionList($actions);
|
||||
|
||||
$stable_commit = $drequest->getStableCommit();
|
||||
|
||||
$view->addProperty(
|
||||
pht('Commit'),
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $drequest->generateURI(
|
||||
array(
|
||||
'action' => 'commit',
|
||||
'commit' => $stable_commit,
|
||||
)),
|
||||
),
|
||||
$drequest->getRepository()->formatCommitName($stable_commit)));
|
||||
|
||||
return $view;
|
||||
return $header;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ final class DiffusionLintController extends DiffusionController {
|
|||
|
||||
$content[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Lint'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
|
||||
$title = array('Lint');
|
||||
|
@ -179,7 +180,7 @@ final class DiffusionLintController extends DiffusionController {
|
|||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($this->renderPathLinks($drequest, 'lint'))
|
||||
->setUser($viewer)
|
||||
->setPolicyObject($drequest->getRepository());
|
||||
->setHeaderIcon('fa-code');
|
||||
$actions = $this->buildActionView($drequest);
|
||||
$properties = $this->buildPropertyView(
|
||||
$drequest,
|
||||
|
@ -189,18 +190,28 @@ final class DiffusionLintController extends DiffusionController {
|
|||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($properties);
|
||||
} else {
|
||||
$object_box = null;
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('All Lint'))
|
||||
->setHeaderIcon('fa-code');
|
||||
}
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$object_box,
|
||||
$content,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
$object_box,
|
||||
$content,
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -444,6 +455,7 @@ final class DiffusionLintController extends DiffusionController {
|
|||
|
||||
$content[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Lint Details'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
|
@ -454,6 +466,16 @@ final class DiffusionLintController extends DiffusionController {
|
|||
));
|
||||
|
||||
$pager_box = $this->renderTablePagerBox($pager);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Lint: %s', $drequest->getRepository()->getDisplayName()))
|
||||
->setHeaderIcon('fa-code');
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$content,
|
||||
$pager_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
|
@ -464,8 +486,7 @@ final class DiffusionLintController extends DiffusionController {
|
|||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
$content,
|
||||
$pager_box,
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -16,11 +16,14 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
$drequest = $this->getDiffusionRequest();
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
$content = array();
|
||||
|
||||
$crumbs = $this->buildCrumbs();
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$content[] = $this->buildPropertiesTable($drequest->getRepository());
|
||||
$header = $this->buildHeaderView($repository);
|
||||
$curtain = $this->buildCurtain($repository);
|
||||
$property_table = $this->buildPropertiesTable($repository);
|
||||
$description = $this->buildDescriptionView($repository);
|
||||
$locate_file = $this->buildLocateFile();
|
||||
|
||||
// Before we do any work, make sure we're looking at a some content: we're
|
||||
// on a valid branch, and the repository is not empty.
|
||||
|
@ -68,14 +71,24 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
}
|
||||
|
||||
if ($page_has_content) {
|
||||
$content[] = $this->buildNormalContent($drequest);
|
||||
$content = $this->buildNormalContent($drequest);
|
||||
} else {
|
||||
$content[] = id(new PHUIInfoView())
|
||||
$content = id(new PHUIInfoView())
|
||||
->setTitle($empty_title)
|
||||
->setSeverity(PHUIInfoView::SEVERITY_WARNING)
|
||||
->setErrors(array($empty_message));
|
||||
}
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setCurtain($curtain)
|
||||
->setMainColumn(array(
|
||||
$property_table,
|
||||
$description,
|
||||
$locate_file,
|
||||
))
|
||||
->setFooter($content);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
|
@ -83,7 +96,9 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
$repository->getDisplayName(),
|
||||
))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($content);
|
||||
->appendChild(array(
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
@ -206,13 +221,13 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
return $content;
|
||||
}
|
||||
|
||||
private function buildPropertiesTable(PhabricatorRepository $repository) {
|
||||
$user = $this->getRequest()->getUser();
|
||||
|
||||
private function buildHeaderView(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getViewer();
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($repository->getName())
|
||||
->setUser($user)
|
||||
->setPolicyObject($repository);
|
||||
->setUser($viewer)
|
||||
->setPolicyObject($repository)
|
||||
->setHeaderIcon('fa-code');
|
||||
|
||||
if (!$repository->isTracked()) {
|
||||
$header->setStatus('fa-ban', 'dark', pht('Inactive'));
|
||||
|
@ -227,12 +242,64 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
$header->setStatus('fa-check', 'bluegrey', pht('Active'));
|
||||
}
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
$actions = $this->buildActionList($repository);
|
||||
private function buildCurtain(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$edit_uri = $repository->getPathURI('edit/');
|
||||
$curtain = $this->newCurtainView($repository);
|
||||
|
||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||
$viewer,
|
||||
$repository,
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Repository'))
|
||||
->setIcon('fa-pencil')
|
||||
->setHref($edit_uri)
|
||||
->setWorkflow(!$can_edit)
|
||||
->setDisabled(!$can_edit));
|
||||
|
||||
if ($repository->isHosted()) {
|
||||
$push_uri = $this->getApplicationURI(
|
||||
'pushlog/?repositories='.$repository->getMonogram());
|
||||
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('View Push Logs'))
|
||||
->setIcon('fa-list-alt')
|
||||
->setHref($push_uri));
|
||||
}
|
||||
|
||||
return $curtain;
|
||||
}
|
||||
|
||||
private function buildDescriptionView(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getViewer();
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer);
|
||||
|
||||
$description = $repository->getDetail('description');
|
||||
if (strlen($description)) {
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$view->addTextContent($description);
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('DESCRIPTION'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($view);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private function buildPropertiesTable(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setObject($repository)
|
||||
->setUser($user);
|
||||
->setUser($viewer);
|
||||
|
||||
if ($repository->isHosted()) {
|
||||
$ssh_uri = $repository->getSSHCloneURIObject();
|
||||
|
@ -286,21 +353,10 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
}
|
||||
}
|
||||
|
||||
$view->invokeWillRenderEvent();
|
||||
|
||||
$description = $repository->getDetail('description');
|
||||
if (strlen($description)) {
|
||||
$description = new PHUIRemarkupView($user, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$view->addTextContent($description);
|
||||
}
|
||||
|
||||
$view->setActionList($actions);
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($view);
|
||||
->setHeaderText(pht('DETAILS'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($view);
|
||||
|
||||
$info = null;
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
|
@ -344,7 +400,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
}
|
||||
|
||||
private function buildBranchListTable(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
if ($drequest->getBranch() === null) {
|
||||
return null;
|
||||
|
@ -379,7 +435,8 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
->setBranches($branches)
|
||||
->setCommits($commits);
|
||||
|
||||
$panel = new PHUIObjectBoxView();
|
||||
$panel = id(new PHUIObjectBoxView())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
$header = new PHUIHeaderView();
|
||||
$header->setHeader(pht('Branches'));
|
||||
|
||||
|
@ -388,7 +445,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
}
|
||||
|
||||
$button = new PHUIButtonView();
|
||||
$button->setText(pht('Show All Branches'));
|
||||
$button->setText(pht('Show All'));
|
||||
$button->setTag('a');
|
||||
$button->setIcon('fa-code-fork');
|
||||
$button->setHref($drequest->generateURI(
|
||||
|
@ -404,7 +461,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
}
|
||||
|
||||
private function buildTagListTable(DiffusionRequest $drequest) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
switch ($repository->getVersionControlSystem()) {
|
||||
|
@ -469,46 +526,11 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
|
||||
$panel->setHeader($header);
|
||||
$panel->setTable($view);
|
||||
$panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
|
||||
return $panel;
|
||||
}
|
||||
|
||||
private function buildActionList(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
|
||||
$edit_uri = $repository->getPathURI('edit/');
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer)
|
||||
->setObject($repository);
|
||||
|
||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||
$viewer,
|
||||
$repository,
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Repository'))
|
||||
->setIcon('fa-pencil')
|
||||
->setHref($edit_uri)
|
||||
->setWorkflow(!$can_edit)
|
||||
->setDisabled(!$can_edit));
|
||||
|
||||
if ($repository->isHosted()) {
|
||||
$push_uri = $this->getApplicationURI(
|
||||
'pushlog/?repositories='.$repository->getMonogram());
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('View Push Logs'))
|
||||
->setIcon('fa-list-alt')
|
||||
->setHref($push_uri));
|
||||
}
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
private function buildHistoryTable(
|
||||
$history_results,
|
||||
$history,
|
||||
|
@ -551,7 +573,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
->setIcon('fa-list-alt');
|
||||
|
||||
$button = id(new PHUIButtonView())
|
||||
->setText(pht('View Full History'))
|
||||
->setText(pht('View History'))
|
||||
->setHref($drequest->generateURI(
|
||||
array(
|
||||
'action' => 'history',
|
||||
|
@ -559,7 +581,8 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
->setTag('a')
|
||||
->setIcon($icon);
|
||||
|
||||
$panel = new PHUIObjectBoxView();
|
||||
$panel = id(new PHUIObjectBoxView())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Recent Commits'))
|
||||
->addActionLink($button);
|
||||
|
@ -569,6 +592,46 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
return $panel;
|
||||
}
|
||||
|
||||
private function buildLocateFile() {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$repository = $drequest->getRepository();
|
||||
|
||||
$locate_panel = null;
|
||||
if ($repository->canUsePathTree()) {
|
||||
Javelin::initBehavior(
|
||||
'diffusion-locate-file',
|
||||
array(
|
||||
'controlID' => 'locate-control',
|
||||
'inputID' => 'locate-input',
|
||||
'browseBaseURI' => (string)$drequest->generateURI(
|
||||
array(
|
||||
'action' => 'browse',
|
||||
)),
|
||||
'uri' => (string)$drequest->generateURI(
|
||||
array(
|
||||
'action' => 'pathtree',
|
||||
)),
|
||||
));
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
->appendChild(
|
||||
id(new AphrontFormTypeaheadControl())
|
||||
->setHardpointID('locate-control')
|
||||
->setID('locate-input')
|
||||
->setLabel(pht('Locate File')));
|
||||
$form_box = id(new PHUIBoxView())
|
||||
->appendChild($form->buildLayoutView());
|
||||
$locate_panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Locate File'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($form_box);
|
||||
}
|
||||
return $locate_panel;
|
||||
}
|
||||
|
||||
private function buildBrowseTable(
|
||||
$browse_results,
|
||||
$browse_paths,
|
||||
|
@ -606,9 +669,10 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
|
||||
$browse_uri = $drequest->generateURI(array('action' => 'browse'));
|
||||
|
||||
$browse_panel = new PHUIObjectBoxView();
|
||||
$browse_panel = id(new PHUIObjectBoxView())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Repository'));
|
||||
->setHeader($repository->getName());
|
||||
|
||||
$icon = id(new PHUIIconView())
|
||||
->setIcon('fa-folder-open');
|
||||
|
@ -621,38 +685,6 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
|
||||
$header->addActionLink($button);
|
||||
$browse_panel->setHeader($header);
|
||||
|
||||
$locate_panel = null;
|
||||
if ($repository->canUsePathTree()) {
|
||||
Javelin::initBehavior(
|
||||
'diffusion-locate-file',
|
||||
array(
|
||||
'controlID' => 'locate-control',
|
||||
'inputID' => 'locate-input',
|
||||
'browseBaseURI' => (string)$drequest->generateURI(
|
||||
array(
|
||||
'action' => 'browse',
|
||||
)),
|
||||
'uri' => (string)$drequest->generateURI(
|
||||
array(
|
||||
'action' => 'pathtree',
|
||||
)),
|
||||
));
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
->appendChild(
|
||||
id(new AphrontFormTypeaheadControl())
|
||||
->setHardpointID('locate-control')
|
||||
->setID('locate-input')
|
||||
->setLabel(pht('Locate File')));
|
||||
$form_box = id(new PHUIBoxView())
|
||||
->appendChild($form->buildLayoutView());
|
||||
$locate_panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText('Locate File')
|
||||
->appendChild($form_box);
|
||||
}
|
||||
|
||||
$browse_panel->setTable($browse_table);
|
||||
|
||||
$pager->setURI($browse_uri, 'offset');
|
||||
|
@ -664,7 +696,6 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
}
|
||||
|
||||
return array(
|
||||
$locate_panel,
|
||||
$browse_panel,
|
||||
$pager_box,
|
||||
);
|
||||
|
|
|
@ -262,10 +262,26 @@ final class DiffusionRepositoryCreateController
|
|||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb($title);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($form);
|
||||
->appendChild($view);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,6 +53,10 @@ final class DiffusionRepositoryEditActionsController
|
|||
|
||||
$title = pht('Edit Actions (%s)', $repository->getName());
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$policies = id(new PhabricatorPolicyQuery())
|
||||
->setViewer($viewer)
|
||||
->setObject($repository)
|
||||
|
@ -97,13 +101,21 @@ final class DiffusionRepositoryEditActionsController
|
|||
->addCancelButton($edit_uri));
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setHeaderText(pht('Actions'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($form_box);
|
||||
->appendChild($view);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,10 @@ final class DiffusionRepositoryEditAutomationController
|
|||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
->appendRemarkupInstructions(
|
||||
|
@ -69,14 +73,21 @@ final class DiffusionRepositoryEditAutomationController
|
|||
->setValue(pht('Save'))
|
||||
->addCancelButton($edit_uri));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Automation'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -105,6 +105,10 @@ final class DiffusionRepositoryEditBasicController
|
|||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
->appendChild(
|
||||
|
@ -144,16 +148,23 @@ final class DiffusionRepositoryEditBasicController
|
|||
->appendChild(id(new PHUIFormDividerControl()))
|
||||
->appendRemarkupInstructions($this->getReadmeInstructions());
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Basic Information'))
|
||||
->setValidationException($validation_exception)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form)
|
||||
->setFormErrors($errors);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function getReadmeInstructions() {
|
||||
|
|
|
@ -98,6 +98,9 @@ final class DiffusionRepositoryEditBranchesController
|
|||
$crumbs->addTextCrumb(pht('Edit Branches'));
|
||||
|
||||
$title = pht('Edit Branches (%s)', $repository->getName());
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$policies = id(new PhabricatorPolicyQuery())
|
||||
->setViewer($viewer)
|
||||
|
@ -213,14 +216,21 @@ final class DiffusionRepositoryEditBranchesController
|
|||
->addCancelButton($edit_uri));
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Branches'))
|
||||
->setValidationException($validation_exception)
|
||||
->setHeaderText($title)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($form_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function processBranches($string) {
|
||||
|
|
|
@ -20,6 +20,7 @@ abstract class DiffusionRepositoryEditController
|
|||
$crumbs->addTextCrumb(pht('Edit'), $edit_uri);
|
||||
}
|
||||
}
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
return $crumbs;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,9 @@ final class DiffusionRepositoryEditEncodingController
|
|||
$crumbs->addTextCrumb(pht('Edit Encoding'));
|
||||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
|
@ -65,15 +68,22 @@ final class DiffusionRepositoryEditEncodingController
|
|||
->setValue(pht('Save Encoding'))
|
||||
->addCancelButton($edit_uri));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Encoding'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form)
|
||||
->setFormErrors($errors);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function getEncodingInstructions() {
|
||||
|
|
|
@ -57,6 +57,9 @@ final class DiffusionRepositoryEditHostingController
|
|||
$crumbs->addTextCrumb(pht('Edit Hosting'));
|
||||
|
||||
$title = pht('Edit Hosting (%s)', $repository->getName());
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$hosted_control = id(new AphrontFormRadioButtonControl())
|
||||
->setName('hosting')
|
||||
|
@ -95,14 +98,21 @@ final class DiffusionRepositoryEditHostingController
|
|||
->setValue(pht('Save and Continue'))
|
||||
->addCancelButton($edit_uri));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Hosting'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
public function handleProtocols(PhabricatorRepository $repository) {
|
||||
|
@ -155,7 +165,9 @@ final class DiffusionRepositoryEditHostingController
|
|||
$crumbs->addTextCrumb(pht('Edit Protocols'));
|
||||
|
||||
$title = pht('Edit Protocols (%s)', $repository->getName());
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$rw_message = pht(
|
||||
'Phabricator will serve a read-write copy of this repository.');
|
||||
|
@ -256,14 +268,21 @@ final class DiffusionRepositoryEditHostingController
|
|||
->setValue(pht('Save Changes'))
|
||||
->addCancelButton($prev_uri, pht('Back')));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Protocols'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,16 +38,16 @@ final class DiffusionRepositoryEditMainController
|
|||
$title = pht('Edit %s', $repository->getName());
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title);
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
if ($repository->isTracked()) {
|
||||
$header->setStatus('fa-check', 'bluegrey', pht('Active'));
|
||||
} else {
|
||||
$header->setStatus('fa-ban', 'dark', pht('Inactive'));
|
||||
}
|
||||
|
||||
$basic_actions = $this->buildBasicActions($repository);
|
||||
$basic_properties =
|
||||
$this->buildBasicProperties($repository, $basic_actions);
|
||||
$curtain = $this->buildCurtain($repository);
|
||||
$basic_properties = $this->buildBasicProperties($repository);
|
||||
|
||||
$policy_actions = $this->buildPolicyActions($repository);
|
||||
$policy_properties =
|
||||
|
@ -119,16 +119,14 @@ final class DiffusionRepositoryEditMainController
|
|||
|
||||
$boxes = array();
|
||||
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($basic_properties);
|
||||
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Policies'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($policy_properties);
|
||||
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Hosting'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($hosting_properties);
|
||||
|
||||
if ($repository->canMirror()) {
|
||||
|
@ -156,6 +154,7 @@ final class DiffusionRepositoryEditMainController
|
|||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setFormErrors($mirror_info)
|
||||
->setHeaderText(pht('Mirrors'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($mirror_properties);
|
||||
|
||||
$boxes[] = $mirror_list;
|
||||
|
@ -164,73 +163,88 @@ final class DiffusionRepositoryEditMainController
|
|||
if ($remote_properties) {
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Remote'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($remote_properties);
|
||||
}
|
||||
|
||||
if ($storage_properties) {
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Storage'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($storage_properties);
|
||||
}
|
||||
|
||||
if ($staging_properties) {
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Staging'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($staging_properties);
|
||||
}
|
||||
|
||||
if ($automation_properties) {
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Automation'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($automation_properties);
|
||||
}
|
||||
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Text Encoding'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($encoding_properties);
|
||||
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Symbols'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($symbols_properties);
|
||||
|
||||
if ($branches_properties) {
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Branches'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($branches_properties);
|
||||
}
|
||||
|
||||
if ($subversion_properties) {
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Subversion'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($subversion_properties);
|
||||
}
|
||||
|
||||
$boxes[] = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Actions'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($actions_properties);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setCurtain($curtain)
|
||||
->addPropertySection(pht('Properties'), $basic_properties)
|
||||
->setMainColumn(array(
|
||||
$boxes,
|
||||
$timeline,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($view);
|
||||
|
||||
}
|
||||
|
||||
private function buildBasicActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
private function buildCurtain(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
$curtain = $this->newCurtainView($repository);
|
||||
|
||||
$edit = id(new PhabricatorActionView())
|
||||
->setIcon('fa-pencil')
|
||||
->setName(pht('Edit Basic Information'))
|
||||
->setHref($this->getRepositoryControllerURI($repository, 'edit/basic/'));
|
||||
$view->addAction($edit);
|
||||
$curtain->addAction($edit);
|
||||
|
||||
$edit = id(new PhabricatorActionView())
|
||||
->setIcon('fa-refresh')
|
||||
|
@ -238,7 +252,7 @@ final class DiffusionRepositoryEditMainController
|
|||
->setWorkflow(true)
|
||||
->setHref(
|
||||
$this->getRepositoryControllerURI($repository, 'edit/update/'));
|
||||
$view->addAction($edit);
|
||||
$curtain->addAction($edit);
|
||||
|
||||
$activate = id(new PhabricatorActionView())
|
||||
->setHref(
|
||||
|
@ -255,9 +269,9 @@ final class DiffusionRepositoryEditMainController
|
|||
->setName(pht('Activate Repository'));
|
||||
}
|
||||
|
||||
$view->addAction($activate);
|
||||
$curtain->addAction($activate);
|
||||
|
||||
$view->addAction(
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Delete Repository'))
|
||||
->setIcon('fa-times')
|
||||
|
@ -266,19 +280,16 @@ final class DiffusionRepositoryEditMainController
|
|||
->setDisabled(true)
|
||||
->setWorkflow(true));
|
||||
|
||||
return $view;
|
||||
return $curtain;
|
||||
}
|
||||
|
||||
private function buildBasicProperties(
|
||||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
PhabricatorRepository $repository) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
->setObject($repository)
|
||||
->setActionList($actions);
|
||||
->setUser($viewer);
|
||||
|
||||
$type = PhabricatorRepositoryType::getNameForRepositoryType(
|
||||
$repository->getVersionControlSystem());
|
||||
|
@ -322,7 +333,7 @@ final class DiffusionRepositoryEditMainController
|
|||
}
|
||||
|
||||
private function buildEncodingActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -341,7 +352,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -358,7 +369,7 @@ final class DiffusionRepositoryEditMainController
|
|||
}
|
||||
|
||||
private function buildPolicyActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -377,7 +388,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -412,7 +423,7 @@ final class DiffusionRepositoryEditMainController
|
|||
}
|
||||
|
||||
private function buildBranchesActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -431,7 +442,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -461,7 +472,7 @@ final class DiffusionRepositoryEditMainController
|
|||
}
|
||||
|
||||
private function buildSubversionActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -480,7 +491,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -500,7 +511,7 @@ final class DiffusionRepositoryEditMainController
|
|||
}
|
||||
|
||||
private function buildActionsActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -519,7 +530,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -541,7 +552,7 @@ final class DiffusionRepositoryEditMainController
|
|||
}
|
||||
|
||||
private function buildRemoteActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -560,7 +571,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -581,7 +592,7 @@ final class DiffusionRepositoryEditMainController
|
|||
}
|
||||
|
||||
private function buildStorageActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -600,7 +611,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -801,7 +812,7 @@ final class DiffusionRepositoryEditMainController
|
|||
private function buildRepositoryStatus(
|
||||
PhabricatorRepository $repository) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
$is_cluster = $repository->getAlmanacServicePHID();
|
||||
|
||||
$view = new PHUIStatusListView();
|
||||
|
@ -1188,7 +1199,7 @@ final class DiffusionRepositoryEditMainController
|
|||
private function buildMirrorActions(
|
||||
PhabricatorRepository $repository) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$mirror_actions = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -1211,7 +1222,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$mirror_properties = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
@ -1262,11 +1273,14 @@ final class DiffusionRepositoryEditMainController
|
|||
$mirror_list->addItem($item);
|
||||
}
|
||||
|
||||
return $mirror_list;
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Configured Mirrors'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setObjectList($mirror_list);
|
||||
}
|
||||
|
||||
private function buildSymbolsActions(PhabricatorRepository $repository) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
@ -1285,7 +1299,7 @@ final class DiffusionRepositoryEditMainController
|
|||
PhabricatorRepository $repository,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
|
|
|
@ -45,7 +45,10 @@ final class DiffusionRepositoryEditStagingController
|
|||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Edit Staging'));
|
||||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
$title = pht('Edit Staging (%s)', $repository->getName());
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
|
@ -68,14 +71,21 @@ final class DiffusionRepositoryEditStagingController
|
|||
->setValue(pht('Save'))
|
||||
->addCancelButton($edit_uri));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Staging'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,9 @@ final class DiffusionRepositoryEditStorageController
|
|||
$crumbs->addTextCrumb(pht('Edit Storage'));
|
||||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$service_phid = $repository->getAlmanacServicePHID();
|
||||
if ($service_phid) {
|
||||
|
@ -57,15 +60,21 @@ final class DiffusionRepositoryEditStorageController
|
|||
id(new AphrontFormSubmitControl())
|
||||
->addCancelButton($edit_uri, pht('Done')));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setForm($form)
|
||||
->setFormErrors($errors);
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Storage'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,6 +63,9 @@ final class DiffusionRepositoryEditSubversionController
|
|||
$crumbs->addTextCrumb(pht('Edit Subversion Info'));
|
||||
|
||||
$title = pht('Edit Subversion Info (%s)', $repository->getName());
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$policies = id(new PhabricatorPolicyQuery())
|
||||
->setViewer($viewer)
|
||||
|
@ -96,13 +99,20 @@ final class DiffusionRepositoryEditSubversionController
|
|||
->addCancelButton($edit_uri));
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setHeaderText(pht('Subversion'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($form_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -59,7 +59,10 @@ final class DiffusionRepositorySymbolsController
|
|||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Edit Symbols'));
|
||||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
$title = pht('Edit Symbols (%s)', $repository->getName());
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
|
@ -85,15 +88,22 @@ final class DiffusionRepositorySymbolsController
|
|||
->setValue(pht('Save'))
|
||||
->addCancelButton($edit_uri));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Symbols'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form)
|
||||
->setFormErrors($errors);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$form_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($object_box);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function getInstructions() {
|
||||
|
|
|
@ -134,17 +134,24 @@ final class DiffusionSymbolController extends DiffusionController {
|
|||
$table->setNoDataString(
|
||||
pht('No matching symbol could be found in any indexed repository.'));
|
||||
|
||||
$panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Similar Symbols'))
|
||||
->setTable($table);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Similar Symbols'))
|
||||
->setHeaderIcon('fa-bullseye');
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Find Symbol'));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$table,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(pht('Find Symbol'))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($panel);
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,6 +45,11 @@ final class DiffusionTagListController extends DiffusionController {
|
|||
$tags = $pager->sliceResults($tags);
|
||||
|
||||
$content = null;
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Tags'))
|
||||
->setHeaderIcon('fa-tags');
|
||||
|
||||
if (!$tags) {
|
||||
$content = $this->renderStatusMessage(
|
||||
pht('No Tags'),
|
||||
|
@ -69,11 +74,7 @@ final class DiffusionTagListController extends DiffusionController {
|
|||
$handles = $this->loadViewerHandles($phids);
|
||||
$view->setHandles($handles);
|
||||
|
||||
$panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Tags'))
|
||||
->appendChild($view);
|
||||
|
||||
$content = $panel;
|
||||
$content = $view;
|
||||
}
|
||||
|
||||
$crumbs = $this->buildCrumbs(
|
||||
|
@ -81,9 +82,22 @@ final class DiffusionTagListController extends DiffusionController {
|
|||
'tags' => true,
|
||||
'commit' => $drequest->getSymbolicCommit(),
|
||||
));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($repository->getDisplayName())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($view);
|
||||
|
||||
$pager_box = $this->renderTablePagerBox($pager);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$box,
|
||||
$pager_box,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
|
@ -91,11 +105,7 @@ final class DiffusionTagListController extends DiffusionController {
|
|||
$repository->getDisplayName(),
|
||||
))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
$content,
|
||||
$pager_box,
|
||||
));
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -90,7 +90,6 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
|||
$browse_link,
|
||||
idx($dict, 'lint'),
|
||||
$dict['commit'],
|
||||
$dict['author'],
|
||||
$dict['details'],
|
||||
$dict['date'],
|
||||
);
|
||||
|
@ -120,7 +119,6 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
|||
pht('Path'),
|
||||
($lint ? $lint : pht('Lint')),
|
||||
pht('Modified'),
|
||||
pht('Author/Committer'),
|
||||
pht('Details'),
|
||||
pht('Committed'),
|
||||
));
|
||||
|
@ -130,7 +128,6 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
|||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'wide',
|
||||
'',
|
||||
));
|
||||
|
@ -142,7 +139,6 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
|||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
));
|
||||
|
||||
$view->setDeviceVisibility(
|
||||
|
@ -150,7 +146,6 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
|||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
|
|
|
@ -95,7 +95,9 @@ abstract class DiffusionView extends AphrontView {
|
|||
}
|
||||
|
||||
$icon = DifferentialChangeType::getIconForFileType($file_type);
|
||||
$icon_view = id(new PHUIIconView())->setIcon($icon);
|
||||
$color = DifferentialChangeType::getIconColorForFileType($file_type);
|
||||
$icon_view = id(new PHUIIconView())
|
||||
->setIcon($icon.' '.$color);
|
||||
|
||||
// If we're rendering a file or directory name, don't show the tooltip.
|
||||
if ($display_name !== null) {
|
||||
|
|
|
@ -14,6 +14,7 @@ final class PHUIInfoView extends AphrontView {
|
|||
private $id;
|
||||
private $buttons = array();
|
||||
private $isHidden;
|
||||
private $flush;
|
||||
|
||||
public function setTitle($title) {
|
||||
$this->title = $title;
|
||||
|
@ -40,6 +41,11 @@ final class PHUIInfoView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setFlush($flush) {
|
||||
$this->flush = $flush;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addButton(PHUIButtonView $button) {
|
||||
$this->buttons[] = $button;
|
||||
return $this;
|
||||
|
@ -87,6 +93,9 @@ final class PHUIInfoView extends AphrontView {
|
|||
$classes[] = 'phui-info-view';
|
||||
$classes[] = 'phui-info-severity-'.$this->severity;
|
||||
$classes[] = 'grouped';
|
||||
if ($this->flush) {
|
||||
$classes[] = 'phui-info-view-flush';
|
||||
}
|
||||
$classes = implode(' ', $classes);
|
||||
|
||||
$children = $this->renderChildren();
|
||||
|
|
|
@ -263,6 +263,7 @@ final class PHUIPagedFormView extends AphrontView {
|
|||
$form->appendChild($submit);
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setFormErrors($errors)
|
||||
->setForm($form);
|
||||
|
||||
|
|
|
@ -35,6 +35,9 @@ final class PHUIHeadThingView extends AphrontTagView {
|
|||
|
||||
$classes = array();
|
||||
$classes[] = 'phui-head-thing-view';
|
||||
if ($this->image) {
|
||||
$classes[] = 'phui-head-has-image';
|
||||
}
|
||||
|
||||
if ($this->size) {
|
||||
$classes[] = $this->size;
|
||||
|
@ -57,8 +60,11 @@ final class PHUIHeadThingView extends AphrontTagView {
|
|||
'href' => $this->imageHref,
|
||||
));
|
||||
|
||||
return array($image, $this->content);
|
||||
|
||||
if ($this->image) {
|
||||
return array($image, $this->content);
|
||||
} else {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -20,3 +20,11 @@ input.diffusion-clone-uri {
|
|||
.diffusion-link-icon + .diffusion-link-icon {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.diffusion-search-boxen {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.diffusion-search-boxen .phui-form-view {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
.diffusion-source {
|
||||
width: 100%;
|
||||
font: 10px/13px "Menlo", "Consolas", "Monaco", monospace;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
@ -21,13 +20,12 @@
|
|||
}
|
||||
|
||||
.diffusion-source td {
|
||||
letter-spacing: 0.0083334px;
|
||||
vertical-align: top;
|
||||
white-space: pre-wrap;
|
||||
padding-bottom: 1px;
|
||||
padding-left: 8px;
|
||||
line-height: 16px;
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
white-space: pre-wrap;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
padding-left: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.diffusion-browse-type-form {
|
||||
|
|
|
@ -86,8 +86,10 @@
|
|||
padding: 6px 16px;
|
||||
}
|
||||
|
||||
.device .phui-box.phui-box-blue-property .phui-header-shell {
|
||||
padding: 6px 12px;
|
||||
.device .phui-box.phui-box-blue-property .phui-header-shell,
|
||||
.device .phui-box-blue-property.phui-object-box.phui-object-box-collapsed
|
||||
.phui-header-shell {
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
.phui-box.phui-box-blue-property .phui-header-header {
|
||||
|
@ -98,3 +100,16 @@
|
|||
.phui-box-blue-property .phui-object-item-list-view.phui-object-list-flush {
|
||||
padding: 2px 8px;
|
||||
}
|
||||
|
||||
body .phui-box-blue-property.phui-object-box.phui-object-box-collapsed {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body .phui-box-blue-property .phui-header-shell + .phui-object-box {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.phui-box-blue-property .phui-header-shell + .phui-object-box
|
||||
.phui-header-shell {
|
||||
background: #fff;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
height: 24px;
|
||||
line-height: 22px;
|
||||
color: {$greytext};
|
||||
}
|
||||
|
||||
.phui-head-thing-view.phui-head-has-image {
|
||||
position: relative;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
|
|
@ -324,3 +324,7 @@ body .phui-header-shell.phui-bleed-header
|
|||
.phui-profile-header .phui-header-col3 {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.phui-header-view .phui-tag-shade-indigo a {
|
||||
color: {$sh-indigotext};
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.phui-info-view.phui-info-view-flush {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
.device .phui-info-view {
|
||||
margin: 8px;
|
||||
}
|
||||
|
|
|
@ -199,7 +199,6 @@
|
|||
.phui-property-list-image-content img {
|
||||
margin: 20px auto;
|
||||
background: url('/rsrc/image/checker_light.png');
|
||||
border: 1px solid {$lightblueborder};
|
||||
}
|
||||
|
||||
.device-desktop .phui-property-list-image-content img:hover {
|
||||
|
|
|
@ -79,10 +79,6 @@
|
|||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
.phui-two-column-view .phui-object-box.phui-object-box-collapsed {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Timeline */
|
||||
|
||||
.phui-two-column-view .phui-timeline-view {
|
||||
|
@ -115,12 +111,12 @@
|
|||
|
||||
.device-desktop .phui-main-column .phui-property-list-key {
|
||||
margin-left: 0;
|
||||
width: 140px;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.device-desktop .phui-main-column .phui-property-list-value {
|
||||
margin-left: 8px;
|
||||
width: calc(100% - 180px);
|
||||
width: calc(100% - 200px);
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,13 +128,18 @@
|
|||
}
|
||||
|
||||
.device-desktop .phui-two-column-view .phui-property-list-container {
|
||||
padding: 12px 16px;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.device .phui-two-column-view .phui-property-list-container {
|
||||
padding: 12px 8px;
|
||||
}
|
||||
|
||||
.phui-two-column-view .phui-property-list-container
|
||||
.keyboard-shortcuts-available {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.phui-two-column-properties.phui-object-box {
|
||||
border: 1px solid rgba({$alphablue}, .2);
|
||||
}
|
||||
|
@ -191,3 +192,7 @@
|
|||
.phui-info-view {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.phui-two-column-view .phui-object-box .phui-header-shell + .phui-info-view {
|
||||
margin: 16px 16px 0 16px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue