-
Notifications
You must be signed in to change notification settings - Fork 0
/
search-repository.php
93 lines (68 loc) · 3.31 KB
/
search-repository.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
require_once dirname(__FILE__) .'/config/config.php';
require_once dirname(__FILE__) . '/Model/SearchBuilder.php';
require_once dirname(__FILE__) . '/Model/AutoCorrection.php';
require_once dirname(__FILE__) . '/Model/ConstructSearchRepoView.php';
require_once dirname(__FILE__) . '/views/search_repository/filters.php';
require_once dirname(__FILE__) . '/views/feedback.php';
require_once dirname(__FILE__) . '/views/search_panel.php';
require_once dirname(__FILE__) . '/views/search/repositories.php';
require_once dirname(__FILE__) . '/views/search/pagination.php';
require_once dirname(__FILE__) . '/views/search/result_status.php';
require_once dirname(__FILE__) . '/views/feedback.php';
require_once dirname(__FILE__) . '/views/share.php';
require_once dirname(__FILE__) . '/views/search/switch_view.php';
require_once dirname(__FILE__) . '/views/search_repository/breadcrumb.php'; // Should be combined with the on under search folder
require_once dirname(__FILE__) . '/views/search_repository/filters.php';
require_once dirname(__FILE__) . '/views/search_repository/sorting.php';
require_once dirname(__FILE__) . '/views/search_repository/results.php';
require_once dirname(__FILE__) . '/views/search_repository/pilot_projects.php';
$searchBuilder = new SearchBuilder();
$searchBuilder->searchSingleRepo();
$searchRepoView = new ConstructSearchRepoView($searchBuilder);
$searchBuilderAll = new SearchBuilder();
$searchBuilderAll->searchAllRepo();
$searchRepoFilterView = new ConstructSearchRepoView($searchBuilderAll);
$repo = $_GET['repository'];
$repoName = getRepositoryIDNameMapping()[$repo];
$pageTitle = $searchBuilder->getQuery()." - ".$repoName;
?>
<?php include dirname(__FILE__) . '/views/header.php'; ?>
<div class="container">
<?php /* Search Panel */ ?>
<?php echo partialSearchPanel($searchBuilder); ?>
<!--breadcrumb-->
<?php echo breadcrumb($searchBuilder); ?>
<div class="row">
<?php /* ###### Filter Panel ###### */ ?>
<div class="col-sm-4 col-md-3">
<?php partialRepositories($searchRepoFilterView); ?>
<?php partialFilters($searchRepoView);
partialFeedback();
?>
</div>
<?php /* ###### Search Result Panel ###### */ ?>
<div class="col-sm-8 col-md-9">
<?php /* ==== Pagination Panel ==== */ ?>
<?php if ($searchBuilder->getSelectedTotalRows() > 0): ?>
<?php partialResultsStatus($searchBuilder,$searchRepoView); ?>
<?php partialPilotProjects($searchBuilder); ?>
<div class="clearfix"></div>
<?php partialPagination($searchBuilder,$searchRepoView); ?>
<div class="pull-right" style="margin: 10px 0 0 5px;">
<?php partialShare($_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); ?>
</div>
<?php partialSwitch($searchRepoView); ?>
<?php partialSorting($searchBuilder, $searchRepoView); ?>
<?php endif; ?>
<div class="clearfix"></div>
<?php /* ==== Search Result List ==== */ ?>
<?php partialResults($searchBuilder,$searchRepoView); ?>
</div>
</div>
</div>
<?php
/* Page Custom Scripts. */
$scripts = ["./js/page.scripts/searchrepo.js"];
?>
<?php include dirname(__FILE__) . '/views/footer.php'; ?>