Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15430706
D18432.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D18432.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -9,7 +9,7 @@
'names' => array(
'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => 'b5b51108',
- 'core.pkg.css' => '03047373',
+ 'core.pkg.css' => 'dd8bcea0',
'core.pkg.js' => '5d80e0db',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e',
@@ -75,7 +75,7 @@
'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6',
'rsrc/css/application/diffusion/diffusion-repository.css' => 'ee6f20ec',
'rsrc/css/application/diffusion/diffusion-source.css' => '750add59',
- 'rsrc/css/application/diffusion/diffusion.css' => 'dc8d51d0',
+ 'rsrc/css/application/diffusion/diffusion.css' => '34d507b9',
'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
'rsrc/css/application/files/global-drag-and-drop.css' => 'b556a948',
'rsrc/css/application/flag/flag.css' => 'bba8f811',
@@ -178,7 +178,7 @@
'rsrc/css/phui/phui-status.css' => 'd5263e49',
'rsrc/css/phui/phui-tag-view.css' => 'b4719c50',
'rsrc/css/phui/phui-timeline-view.css' => 'f21db7ca',
- 'rsrc/css/phui/phui-two-column-view.css' => 'ae38a939',
+ 'rsrc/css/phui/phui-two-column-view.css' => '81b0f3ce',
'rsrc/css/phui/workboards/phui-workboard-color.css' => '783cdff5',
'rsrc/css/phui/workboards/phui-workboard.css' => '3bc85455',
'rsrc/css/phui/workboards/phui-workcard.css' => 'cca5fa92',
@@ -570,7 +570,7 @@
'differential-revision-history-css' => '0e8eb855',
'differential-revision-list-css' => 'f3c47d33',
'differential-table-of-contents-css' => 'ae4b7a55',
- 'diffusion-css' => 'dc8d51d0',
+ 'diffusion-css' => '34d507b9',
'diffusion-icons-css' => '0c15255e',
'diffusion-readme-css' => '419dd5b6',
'diffusion-repository-css' => 'ee6f20ec',
@@ -874,7 +874,7 @@
'phui-tag-view-css' => 'b4719c50',
'phui-theme-css' => '9f261c6b',
'phui-timeline-view-css' => 'f21db7ca',
- 'phui-two-column-view-css' => 'ae38a939',
+ 'phui-two-column-view-css' => '81b0f3ce',
'phui-workboard-color-css' => '783cdff5',
'phui-workboard-view-css' => '3bc85455',
'phui-workcard-view-css' => 'cca5fa92',
diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseController.php
@@ -56,9 +56,10 @@
private function browseSearch() {
$drequest = $this->getDiffusionRequest();
$header = $this->buildHeaderView($drequest);
+ $path = nonempty(basename($drequest->getPath()), '/');
$search_results = $this->renderSearchResults();
- $search_form = $this->renderSearchForm();
+ $search_form = $this->renderSearchForm($path);
$search_form = phutil_tag(
'div',
@@ -1473,52 +1474,6 @@
return "{$summary}\n{$date} \xC2\xB7 {$author}";
}
- protected function renderSearchForm() {
- $drequest = $this->getDiffusionRequest();
- $viewer = $this->getViewer();
- switch ($drequest->getRepository()->getVersionControlSystem()) {
- case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
- return null;
- }
-
- $search_term = $this->getRequest()->getStr('grep');
- require_celerity_resource('diffusion-icons-css');
- require_celerity_resource('diffusion-css');
-
- $bar = javelin_tag(
- 'input',
- array(
- 'type' => 'text',
- 'id' => 'diffusion-search-input',
- 'name' => 'grep',
- 'class' => 'diffusion-search-input',
- 'sigil' => 'diffusion-search-input',
- 'placeholder' => pht('Pattern Search'),
- 'value' => $search_term,
- ));
-
- $form = phabricator_form(
- $viewer,
- array(
- 'method' => 'GET',
- 'sigil' => 'diffusion-search-form',
- 'class' => 'diffusion-search-form',
- 'id' => 'diffusion-search-form',
- ),
- array(
- $bar,
- ));
-
- $form_view = phutil_tag(
- 'div',
- array(
- 'class' => 'diffusion-search-form-view',
- ),
- $form);
-
- return $form_view;
- }
-
protected function markupText($text) {
$engine = PhabricatorMarkupEngine::newDiffusionMarkupEngine();
$engine->setConfig('viewer', $this->getRequest()->getUser());
@@ -1538,7 +1493,8 @@
$viewer = $this->getViewer();
$tag = $this->renderCommitHashTag($drequest);
- $search = $this->renderSearchForm();
+ $path = nonempty(basename($drequest->getPath()), '/');
+ $search = $this->renderSearchForm($path);
$header = id(new PHUIHeaderView())
->setUser($viewer)
diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php
--- a/src/applications/diffusion/controller/DiffusionController.php
+++ b/src/applications/diffusion/controller/DiffusionController.php
@@ -410,6 +410,58 @@
->setContent($readme_corpus);
}
+ protected function renderSearchForm($path = '/') {
+ $drequest = $this->getDiffusionRequest();
+ $viewer = $this->getViewer();
+ switch ($drequest->getRepository()->getVersionControlSystem()) {
+ case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
+ return null;
+ }
+
+ $search_term = $this->getRequest()->getStr('grep');
+ require_celerity_resource('diffusion-icons-css');
+ require_celerity_resource('diffusion-css');
+
+ $href = $drequest->generateURI(array(
+ 'action' => 'browse',
+ 'path' => $path,
+ ));
+
+ $bar = javelin_tag(
+ 'input',
+ array(
+ 'type' => 'text',
+ 'id' => 'diffusion-search-input',
+ 'name' => 'grep',
+ 'class' => 'diffusion-search-input',
+ 'sigil' => 'diffusion-search-input',
+ 'placeholder' => pht('Pattern Search'),
+ 'value' => $search_term,
+ ));
+
+ $form = phabricator_form(
+ $viewer,
+ array(
+ 'method' => 'GET',
+ 'action' => $href,
+ 'sigil' => 'diffusion-search-form',
+ 'class' => 'diffusion-search-form',
+ 'id' => 'diffusion-search-form',
+ ),
+ array(
+ $bar,
+ ));
+
+ $form_view = phutil_tag(
+ 'div',
+ array(
+ 'class' => 'diffusion-search-form-view',
+ ),
+ $form);
+
+ return $form_view;
+ }
+
protected function buildTabsView($key) {
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -300,6 +300,8 @@
private function buildHeaderView(PhabricatorRepository $repository) {
$viewer = $this->getViewer();
+ $search = $this->renderSearchForm();
+
$header = id(new PHUIHeaderView())
->setHeader($repository->getName())
->setUser($viewer)
@@ -307,6 +309,7 @@
->setProfileHeader(true)
->setImage($repository->getProfileImageURI())
->setImageEditURL('/diffusion/picture/'.$repository->getID().'/')
+ ->addActionItem($search)
->addClass('diffusion-profile-header');
if (!$repository->isTracked()) {
diff --git a/webroot/rsrc/css/application/diffusion/diffusion.css b/webroot/rsrc/css/application/diffusion/diffusion.css
--- a/webroot/rsrc/css/application/diffusion/diffusion.css
+++ b/webroot/rsrc/css/application/diffusion/diffusion.css
@@ -12,6 +12,10 @@
display: block;
}
+.device-phone .diffusion-profile-header .phui-header-col1 {
+ display: none;
+}
+
.diffusion-action-bar {
margin-bottom: 16px;
}
@@ -145,7 +149,8 @@
padding-left: 12px;
}
-.device-phone .diffusion-browse-header .diffusion-search-form-view {
+.device-phone .diffusion-browse-header .diffusion-search-form-view,
+.device-phone .diffusion-profile-header .diffusion-search-form-view {
display: none;
}
diff --git a/webroot/rsrc/css/phui/phui-two-column-view.css b/webroot/rsrc/css/phui/phui-two-column-view.css
--- a/webroot/rsrc/css/phui/phui-two-column-view.css
+++ b/webroot/rsrc/css/phui/phui-two-column-view.css
@@ -185,6 +185,15 @@
padding: 0 12px;
}
+.device-phone .phui-two-column-tabs .phui-list-view.phui-list-tabbar {
+ text-align: center;
+}
+
+.device-phone .phui-two-column-tabs .phui-list-view.phui-list-tabbar > li {
+ float: none;
+ display: inline-block;
+}
+
/* Info View */
.phui-two-column-view .phui-info-view {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 8:37 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7407551
Default Alt Text
D18432.diff (8 KB)
Attached To
Mode
D18432: Add pattern search to diffusion home
Attached
Detach File
Event Timeline
Log In to Comment