Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-locator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ajay Barthwal
store-locator
Commits
728070f7
Commit
728070f7
authored
Jul 24, 2019
by
Arpit Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completed project review point and also add 404 and 405 page
parent
cb29aec7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
16 deletions
+24
-16
SearchController.php
application/app/Http/Controllers/SearchController.php
+2
-1
index.blade.php
application/resources/views/frontend/searchs/index.blade.php
+9
-11
location_element.blade.php
application/resources/views/frontend/searchs/location_element.blade.php
+13
-4
No files found.
application/app/Http/Controllers/SearchController.php
View file @
728070f7
...
@@ -100,8 +100,9 @@ class SearchController extends Controller
...
@@ -100,8 +100,9 @@ class SearchController extends Controller
}
}
$locality
=
$request
->
locality
;
$locality
=
$request
->
locality
;
$ratingOrder
=
$request
->
ratingOrder
;
$html
=
view
(
'frontend.searchs.location_element'
,
compact
(
'finalData'
,
'links'
,
'meta'
,
'locality'
))
->
render
();
$html
=
view
(
'frontend.searchs.location_element'
,
compact
(
'finalData'
,
'links'
,
'meta'
,
'locality'
,
'ratingOrder'
))
->
render
();
return
[
'status'
=>
'success'
,
'data'
=>
$html
];
return
[
'status'
=>
'success'
,
'data'
=>
$html
];
}
}
...
...
application/resources/views/frontend/searchs/index.blade.php
View file @
728070f7
...
@@ -99,21 +99,17 @@
...
@@ -99,21 +99,17 @@
var
location
=
$
(
'.location'
).
val
();
var
location
=
$
(
'.location'
).
val
();
var
state
=
$
(
'.getStateValue option:selected'
).
attr
(
'state'
);
var
state
=
$
(
'.getStateValue option:selected'
).
attr
(
'state'
);
var
city
=
$
(
'.getCityValue'
).
val
();
var
city
=
$
(
'.getCityValue'
).
val
();
var
ratingOrder
=
$
(
this
).
data
(
'rating'
);
var
ratingOrder
=
$
(
'.ratingDropDown'
).
val
(
);
e
.
preventDefault
();
e
.
preventDefault
();
$
.
ajax
({
$
.
ajax
({
type
:
'post'
,
type
:
'post'
,
url
:
"{{route('searchlocater')}}"
,
url
:
"{{route('searchlocater')}}"
,
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
locality
:
locality
,
location
:
location
,
state
:
state
,
city
:
city
,
ratingOrder
:
ratingOrder
},
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
locality
:
locality
,
location
:
location
,
state
:
state
,
city
:
city
,
ratingOrder
:
ratingOrder
},
success
:
function
(
datanew
)
{
success
:
function
(
datanew
)
{
if
(
datanew
.
status
==
'success'
)
{
//PRELOADER
loader
();
loader
();
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
}
else
{
$
(
".locality"
).
val
(
locality
);
loader
();
$
(
".ratingDropDown"
).
val
(
ratingOrder
).
attr
(
"selected"
,
"selected"
);
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
}
}
}
});
});
});
});
...
@@ -126,18 +122,18 @@
...
@@ -126,18 +122,18 @@
var
state
=
$
(
'.getStateValue option:selected'
).
attr
(
'state'
);
var
state
=
$
(
'.getStateValue option:selected'
).
attr
(
'state'
);
var
city
=
$
(
'.getCityValue'
).
val
();
var
city
=
$
(
'.getCityValue'
).
val
();
var
location
=
$
(
'.location'
).
val
();
var
location
=
$
(
'.location'
).
val
();
var
ratingOrder
=
$
(
this
).
data
(
'rating'
);
var
ratingOrder
=
$
(
'.ratingDropDown'
).
val
(
);
paginate
(
page
,
locality
,
state
,
city
,
location
);
paginate
(
page
,
locality
,
state
,
city
,
location
,
ratingOrder
);
});
});
$
(
"#searchlocaterid"
).
on
(
'c
lick'
,
'.ratingDropDown a
'
,
function
()
{
$
(
"#searchlocaterid"
).
on
(
'c
hange'
,
'.ratingDropDown
'
,
function
()
{
var
page
=
$
(
this
).
data
(
'page'
);
var
page
=
$
(
this
).
data
(
'page'
);
var
locality
=
$
(
'.locality'
).
val
();
var
locality
=
$
(
'.locality'
).
val
();
var
state
=
$
(
'.getStateValue option:selected'
).
attr
(
'state'
);
var
state
=
$
(
'.getStateValue option:selected'
).
attr
(
'state'
);
var
city
=
$
(
'.getCityValue'
).
val
();
var
city
=
$
(
'.getCityValue'
).
val
();
var
location
=
$
(
'.location'
).
val
();
var
location
=
$
(
'.location'
).
val
();
var
ratingOrder
=
$
(
this
).
data
(
'rating'
);
var
ratingOrder
=
$
(
'.ratingDropDown'
).
val
(
);
paginate
(
page
,
locality
,
state
,
city
,
location
,
ratingOrder
);
paginate
(
page
,
locality
,
state
,
city
,
location
,
ratingOrder
);
});
});
...
@@ -150,6 +146,8 @@
...
@@ -150,6 +146,8 @@
loader
();
loader
();
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
$
(
".locality"
).
val
(
locality
);
$
(
".locality"
).
val
(
locality
);
$
(
".ratingDropDown"
).
val
(
ratingOrder
).
attr
(
"selected"
,
"selected"
);
}
}
});
});
}
}
...
...
application/resources/views/frontend/searchs/location_element.blade.php
View file @
728070f7
...
@@ -17,15 +17,24 @@
...
@@ -17,15 +17,24 @@
{{ $meta['total'] }} locations found
</span>
{{ $meta['total'] }} locations found
</span>
</div>
</div>
<div
class=
"col-6 text-right"
>
<div
class=
"col-6 text-right"
>
<div
class=
"dropdown"
>
<div
class=
"select"
>
<select
name=
"state"
class=
"form-control ratingDropDown"
>
<option
value=
""
>
Sort By
</option>
<?php
$rating
=
array
(
'desc'
=>
'Highest rating'
,
'asc'
=>
'Lowest rating'
)
?>
@foreach($rating as $key => $option)
<option
data-rating=
"
<?php
echo
$key
;
?>
"
value=
"
<?php
echo
$key
;
?>
"
>
<?php
echo
$option
;
?>
</option>
@endforeach
</select>
</div>
<!--<div class="dropdown">
<div class="btn btn-secondary dropdown-toggle custom-dropdown" id="reviewbyfilter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<div class="btn btn-secondary dropdown-toggle custom-dropdown" id="reviewbyfilter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Sort By
Sort By
</div>
</div>
<div class="dropdown-menu ratingDropDown" aria-labelledby="reviewbyfilter">
<div class="dropdown-menu ratingDropDown" aria-labelledby="reviewbyfilter">
<a
class=
"dropdown-item"
href=
"javascript:void(0);"
data-rating=
"desc"
>
Highest rating
</a>
<a class="dropdown-item
ratingHigest
" href="javascript:void(0);" data-rating="desc">Highest rating</a>
<a
class=
"dropdown-item"
href=
"javascript:void(0);"
data-rating=
"asc"
>
Lowest rating
</a>
<a class="dropdown-item
ratingLowest
" href="javascript:void(0);" data-rating="asc">Lowest rating</a>
</div>
</div>
</div>
</div>
-->
</div>
</div>
</div>
</div>
<!--location listing start-->
<!--location listing start-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment