mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-03 12:10:42 -06:00
Smaller travis file. Try to fix the search.
This commit is contained in:
parent
1ee72a6ce5
commit
b90c7c09b6
@ -7,8 +7,6 @@ php:
|
||||
|
||||
install:
|
||||
- composer selfupdate
|
||||
- composer --version
|
||||
- composer install --no-dev
|
||||
- composer update
|
||||
- php artisan env
|
||||
- mv -v .env.testing .env
|
||||
|
@ -28,26 +28,26 @@ class SearchController extends Controller
|
||||
public function index(SearchInterface $searcher)
|
||||
{
|
||||
|
||||
$subTitle = null;
|
||||
$rawQuery = null;
|
||||
$result = [];
|
||||
$subTitle = null;
|
||||
$query = null;
|
||||
$result = [];
|
||||
$title = trans('firefly.search');
|
||||
$mainTitleIcon = 'fa-search';
|
||||
if (!is_null(Input::get('q')) && strlen(Input::get('q')) > 0) {
|
||||
$rawQuery = trim(Input::get('q'));
|
||||
$words = explode(' ', $rawQuery);
|
||||
$subTitle = trans('firefly.search_results_for', ['query' => $rawQuery]);
|
||||
$query = trim(Input::get('q'));
|
||||
$words = explode(' ', $query);
|
||||
$subTitle = trans('firefly.search_results_for', ['query' => $query]);
|
||||
|
||||
$transactions = $searcher->searchTransactions($words);
|
||||
$accounts = $searcher->searchAccounts($words);
|
||||
$categories = $searcher->searchCategories($words);
|
||||
$budgets = $searcher->searchBudgets($words);
|
||||
$tags = $searcher->searchTags($words);
|
||||
$transactions = [];//$searcher->searchTransactions($words);
|
||||
$accounts = [];//$searcher->searchAccounts($words);
|
||||
$categories = [];//$searcher->searchCategories($words);
|
||||
$budgets = [];//$searcher->searchBudgets($words);
|
||||
$tags = [];//$searcher->searchTags($words);
|
||||
$result = ['transactions' => $transactions, 'accounts' => $accounts, 'categories' => $categories, 'budgets' => $budgets, 'tags' => $tags];
|
||||
|
||||
}
|
||||
|
||||
return view('search.index')->with('title', 'Search')->with('subTitle', $subTitle)->with(
|
||||
'mainTitleIcon', 'fa-search'
|
||||
)->with('query', $rawQuery)->with('result', $result);
|
||||
return view('search.index', compact('title', 'subTitle', 'mainTitleIcon', 'query', 'result'));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ return [
|
||||
'showEverything' => 'Show everything',
|
||||
'never' => 'Never',
|
||||
'search_results_for' => 'Search results for ":query"',
|
||||
'search' => 'Search',
|
||||
'bounced_error' => 'The message sent to :email bounced, so no access for you.',
|
||||
'deleted_error' => 'These credentials do not match our records.',
|
||||
'general_blocked_error' => 'Your account has been disabled, so you cannot login.',
|
||||
|
Loading…
Reference in New Issue
Block a user