1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 06:50:55 +01:00

Use ObjectItemListView in Diviner

Summary: Ref T988. Nuke the old directory CSS.

Test Plan: {F44796}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6093
This commit is contained in:
epriestley 2013-05-31 10:51:53 -07:00
parent 59cea9bfc3
commit 87bc6eb28c
5 changed files with 96 additions and 136 deletions

View file

@ -77,7 +77,6 @@ $package_spec = array(
'aphront-typeahead-control-css',
'aphront-list-filter-view-css',
'phabricator-directory-css',
'phabricator-jump-nav',
'phabricator-remarkup-css',

View file

@ -2974,15 +2974,6 @@ celerity_register_resource_map(array(
),
'disk' => '/rsrc/css/layout/phabricator-crumbs-view.css',
),
'phabricator-directory-css' =>
array(
'uri' => '/res/61afca2b/rsrc/css/application/directory/phabricator-directory.css',
'type' => 'css',
'requires' =>
array(
),
'disk' => '/rsrc/css/application/directory/phabricator-directory.css',
),
'phabricator-drag-and-drop-file-upload' =>
array(
'uri' => '/res/396d3b3b/rsrc/js/core/DragAndDropFileUpload.js',
@ -3988,7 +3979,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'504b6760' =>
'8e459ff2' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -4004,40 +3995,39 @@ celerity_register_resource_map(array(
8 => 'aphront-tokenizer-control-css',
9 => 'aphront-typeahead-control-css',
10 => 'aphront-list-filter-view-css',
11 => 'phabricator-directory-css',
12 => 'phabricator-jump-nav',
13 => 'phabricator-remarkup-css',
14 => 'syntax-highlighting-css',
15 => 'aphront-pager-view-css',
16 => 'phabricator-transaction-view-css',
17 => 'aphront-tooltip-css',
18 => 'phabricator-flag-css',
19 => 'aphront-error-view-css',
20 => 'sprite-icons-css',
21 => 'sprite-gradient-css',
22 => 'sprite-menu-css',
23 => 'sprite-apps-large-css',
24 => 'phabricator-main-menu-view',
25 => 'phabricator-notification-css',
26 => 'phabricator-notification-menu-css',
27 => 'lightbox-attachment-css',
28 => 'phabricator-header-view-css',
29 => 'phabricator-form-view-css',
30 => 'phabricator-filetree-view-css',
31 => 'phabricator-nav-view-css',
32 => 'phabricator-side-menu-view-css',
33 => 'phabricator-crumbs-view-css',
34 => 'phabricator-object-item-list-view-css',
35 => 'global-drag-and-drop-css',
36 => 'spacing-css',
37 => 'phui-form-css',
38 => 'phui-icon-view-css',
39 => 'phabricator-application-launch-view-css',
40 => 'phabricator-action-list-view-css',
41 => 'phabricator-property-list-view-css',
42 => 'phabricator-tag-view-css',
11 => 'phabricator-jump-nav',
12 => 'phabricator-remarkup-css',
13 => 'syntax-highlighting-css',
14 => 'aphront-pager-view-css',
15 => 'phabricator-transaction-view-css',
16 => 'aphront-tooltip-css',
17 => 'phabricator-flag-css',
18 => 'aphront-error-view-css',
19 => 'sprite-icons-css',
20 => 'sprite-gradient-css',
21 => 'sprite-menu-css',
22 => 'sprite-apps-large-css',
23 => 'phabricator-main-menu-view',
24 => 'phabricator-notification-css',
25 => 'phabricator-notification-menu-css',
26 => 'lightbox-attachment-css',
27 => 'phabricator-header-view-css',
28 => 'phabricator-form-view-css',
29 => 'phabricator-filetree-view-css',
30 => 'phabricator-nav-view-css',
31 => 'phabricator-side-menu-view-css',
32 => 'phabricator-crumbs-view-css',
33 => 'phabricator-object-item-list-view-css',
34 => 'global-drag-and-drop-css',
35 => 'spacing-css',
36 => 'phui-form-css',
37 => 'phui-icon-view-css',
38 => 'phabricator-application-launch-view-css',
39 => 'phabricator-action-list-view-css',
40 => 'phabricator-property-list-view-css',
41 => 'phabricator-tag-view-css',
),
'uri' => '/res/pkg/504b6760/core.pkg.css',
'uri' => '/res/pkg/8e459ff2/core.pkg.css',
'type' => 'css',
),
'98f60e3f' =>
@ -4231,16 +4221,16 @@ celerity_register_resource_map(array(
'reverse' =>
array(
'aphront-attached-file-view-css' => '6b1fccc6',
'aphront-dialog-view-css' => '504b6760',
'aphront-error-view-css' => '504b6760',
'aphront-form-view-css' => '504b6760',
'aphront-list-filter-view-css' => '504b6760',
'aphront-pager-view-css' => '504b6760',
'aphront-panel-view-css' => '504b6760',
'aphront-table-view-css' => '504b6760',
'aphront-tokenizer-control-css' => '504b6760',
'aphront-tooltip-css' => '504b6760',
'aphront-typeahead-control-css' => '504b6760',
'aphront-dialog-view-css' => '8e459ff2',
'aphront-error-view-css' => '8e459ff2',
'aphront-form-view-css' => '8e459ff2',
'aphront-list-filter-view-css' => '8e459ff2',
'aphront-pager-view-css' => '8e459ff2',
'aphront-panel-view-css' => '8e459ff2',
'aphront-table-view-css' => '8e459ff2',
'aphront-tokenizer-control-css' => '8e459ff2',
'aphront-tooltip-css' => '8e459ff2',
'aphront-typeahead-control-css' => '8e459ff2',
'differential-changeset-view-css' => 'dd27a69b',
'differential-core-view-css' => 'dd27a69b',
'differential-inline-comment-editor' => '9488bb69',
@ -4254,7 +4244,7 @@ celerity_register_resource_map(array(
'differential-table-of-contents-css' => 'dd27a69b',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => '504b6760',
'global-drag-and-drop-css' => '8e459ff2',
'inline-comment-summary-css' => 'dd27a69b',
'javelin-aphlict' => '98f60e3f',
'javelin-behavior' => 'a9f14d76',
@ -4328,56 +4318,55 @@ celerity_register_resource_map(array(
'javelin-util' => 'a9f14d76',
'javelin-vector' => 'a9f14d76',
'javelin-workflow' => 'a9f14d76',
'lightbox-attachment-css' => '504b6760',
'lightbox-attachment-css' => '8e459ff2',
'maniphest-task-summary-css' => '6b1fccc6',
'maniphest-transaction-detail-css' => '6b1fccc6',
'phabricator-action-list-view-css' => '504b6760',
'phabricator-application-launch-view-css' => '504b6760',
'phabricator-action-list-view-css' => '8e459ff2',
'phabricator-application-launch-view-css' => '8e459ff2',
'phabricator-busy' => '98f60e3f',
'phabricator-content-source-view-css' => 'dd27a69b',
'phabricator-core-buttons-css' => '504b6760',
'phabricator-core-css' => '504b6760',
'phabricator-crumbs-view-css' => '504b6760',
'phabricator-directory-css' => '504b6760',
'phabricator-core-buttons-css' => '8e459ff2',
'phabricator-core-css' => '8e459ff2',
'phabricator-crumbs-view-css' => '8e459ff2',
'phabricator-drag-and-drop-file-upload' => '9488bb69',
'phabricator-dropdown-menu' => '98f60e3f',
'phabricator-file-upload' => '98f60e3f',
'phabricator-filetree-view-css' => '504b6760',
'phabricator-flag-css' => '504b6760',
'phabricator-form-view-css' => '504b6760',
'phabricator-header-view-css' => '504b6760',
'phabricator-filetree-view-css' => '8e459ff2',
'phabricator-flag-css' => '8e459ff2',
'phabricator-form-view-css' => '8e459ff2',
'phabricator-header-view-css' => '8e459ff2',
'phabricator-hovercard' => '98f60e3f',
'phabricator-jump-nav' => '504b6760',
'phabricator-jump-nav' => '8e459ff2',
'phabricator-keyboard-shortcut' => '98f60e3f',
'phabricator-keyboard-shortcut-manager' => '98f60e3f',
'phabricator-main-menu-view' => '504b6760',
'phabricator-main-menu-view' => '8e459ff2',
'phabricator-menu-item' => '98f60e3f',
'phabricator-nav-view-css' => '504b6760',
'phabricator-nav-view-css' => '8e459ff2',
'phabricator-notification' => '98f60e3f',
'phabricator-notification-css' => '504b6760',
'phabricator-notification-menu-css' => '504b6760',
'phabricator-object-item-list-view-css' => '504b6760',
'phabricator-notification-css' => '8e459ff2',
'phabricator-notification-menu-css' => '8e459ff2',
'phabricator-object-item-list-view-css' => '8e459ff2',
'phabricator-object-selector-css' => 'dd27a69b',
'phabricator-phtize' => '98f60e3f',
'phabricator-prefab' => '98f60e3f',
'phabricator-project-tag-css' => '6b1fccc6',
'phabricator-property-list-view-css' => '504b6760',
'phabricator-remarkup-css' => '504b6760',
'phabricator-property-list-view-css' => '8e459ff2',
'phabricator-remarkup-css' => '8e459ff2',
'phabricator-shaped-request' => '9488bb69',
'phabricator-side-menu-view-css' => '504b6760',
'phabricator-standard-page-view' => '504b6760',
'phabricator-tag-view-css' => '504b6760',
'phabricator-side-menu-view-css' => '8e459ff2',
'phabricator-standard-page-view' => '8e459ff2',
'phabricator-tag-view-css' => '8e459ff2',
'phabricator-textareautils' => '98f60e3f',
'phabricator-tooltip' => '98f60e3f',
'phabricator-transaction-view-css' => '504b6760',
'phabricator-zindex-css' => '504b6760',
'phui-form-css' => '504b6760',
'phui-icon-view-css' => '504b6760',
'spacing-css' => '504b6760',
'sprite-apps-large-css' => '504b6760',
'sprite-gradient-css' => '504b6760',
'sprite-icons-css' => '504b6760',
'sprite-menu-css' => '504b6760',
'syntax-highlighting-css' => '504b6760',
'phabricator-transaction-view-css' => '8e459ff2',
'phabricator-zindex-css' => '8e459ff2',
'phui-form-css' => '8e459ff2',
'phui-icon-view-css' => '8e459ff2',
'spacing-css' => '8e459ff2',
'sprite-apps-large-css' => '8e459ff2',
'sprite-gradient-css' => '8e459ff2',
'sprite-icons-css' => '8e459ff2',
'sprite-menu-css' => '8e459ff2',
'syntax-highlighting-css' => '8e459ff2',
),
));

View file

@ -3060,7 +3060,7 @@ phutil_register_library_map(array(
),
'PhabricatorPeopleLogsController' => 'PhabricatorPeopleController',
'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController',
'PhabricatorPeopleQuery' => 'PhabricatorPolicyAwareCursorPagedQuery',
'PhabricatorPeopleQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorPeopleSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorPeopleTestDataGenerator' => 'PhabricatorTestDataGenerator',
'PhabricatorPhabricatorOAuthConfigOptions' => 'PhabricatorApplicationConfigOptions',

View file

@ -26,37 +26,35 @@ final class DivinerListController extends PhabricatorController {
),
);
require_celerity_resource('phabricator-directory-css');
$request = $this->getRequest();
$viewer = $request->getUser();
$list = id(new PhabricatorObjectItemListView())
->setUser($viewer);
$out = array();
foreach ($links as $href => $link) {
$name = $link['name'];
$flavor = $link['flavor'];
$item = id(new PhabricatorObjectItemView())
->setHref($href)
->setHeader($link['name'])
->addAttribute($link['flavor']);
$link = phutil_tag(
'a',
array(
'href' => $href,
'target' => '_blank',
),
$name);
$out[] = hsprintf(
'<div class="aphront-directory-item">'.
'<h1>%s</h1>'.
'<p>%s</p>'.
'</div>',
$link,
$flavor);
$list->addItem($item);
}
$out = phutil_tag('div', array('class' => 'aphront-directory-list'), $out);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Documentation')));
return $this->buildApplicationPage(
$out,
array(
$crumbs,
$list,
),
array(
'title' => pht('Documentation'),
'dust' => true,
'device' => true,
'title' => 'Documentation',
));
}
}

View file

@ -1,26 +0,0 @@
/**
* @provides phabricator-directory-css
*/
.aphront-directory-list {
margin: 2em;
}
.aphront-directory-list h1 {
font-size: 16px;
font-weight: bold;
padding: 0;
margin: 0;
}
.aphront-directory-list p {
color: #444444;
font-size: 12px;
padding: .05em .5em .5em;
}
.aphront-directory-item {
margin: 1em 0;
}