Permalink
Browse files

changed shops display to li

  • Loading branch information...
iLimas committed Feb 14, 2020
1 parent 140da03 commit 25fcc8935179c15b5ea4bb44382b72a87981b5ad
Showing with 11 additions and 5 deletions.
  1. +1 −1 controllers/shop.js
  2. +1 −1 models/shop.js
  3. +5 −1 views/shops/shop.hbs
  4. +4 −2 views/shops/shops.hbs
@@ -55,7 +55,7 @@ shopRouter.post('/', function(req,res){
})

shopRouter.put('/:index', function(req,res){
shopsApi.updateShop(req.params.index, req.body);
shopsApi.update(req.params.index, req.body);
res.redirect('/shops')
})

@@ -4,7 +4,7 @@
*/
global.shops = [
{
'name':'rondas shop',
'name':'ashleys coffee shop',
'employees':15,
'currentlyOpen':false
},
@@ -1,5 +1,5 @@
{{!-- update --}}
<form method="POST" action="/shops{{index}}?_method=PUT">
<form method="POST" action="/shops/{{index}}?_method=PUT">

<!--
Template for creating input form for a string object key called stringMember
@@ -10,4 +10,8 @@
Currently Open: <input type="checkbox" name="currentlyOpen" {{#if shop.currentlyOpen}}checked{{/if}}/>

<input type="submit" value="Update Shop" />
</form>

<form action="/shops/{{index}}?_method=delete">
<input type="text">
</form>
@@ -1,9 +1,11 @@
<ul>
{{#each shops}}
<a href="/shops/{{@index}}">
<li>
<a href="/shops/{{@index}}">
{{!-- we want the name of the shop here --}}
{{name}}
{{!-- <li>{{ shops }}</li> --}}
</a>
</a>
</li>
{{/each}}
</ul>

0 comments on commit 25fcc89

Please sign in to comment.