Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
more infos on shop in main and shops
Browse files Browse the repository at this point in the history
  • Loading branch information
Kageetai committed Nov 10, 2014
1 parent 7e25863 commit 3b8c10f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 44 deletions.
4 changes: 3 additions & 1 deletion client/app/main/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
<div class="row">
<div class="col-md-12">
<div class="selShop" ng-show="selShop">
<h2>{{selShop.name}}</h2>
<img class="pull-right" ng-src="{{selShop.image}}" alt="{{selShop.name}}"/>
<a ng-href="{{selShop.link}}"><h2>{{selShop.name}}</h2></a>
<p>{{selShop.address}}</p>
<p>{{selShop.description}}</p>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions client/app/shops/shops.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ <h1 class="page-header">Shops:</h1>
<tr>
<th>Name</th>
<th>Address</th>
<th>Stock</th>
<th>In Stock?</th>
<th>&nbsp;</th>
</tr>
</thead>
<thead>
<tr ng-repeat="shop in shops" ng-class="{selected: shop == selShop}">
<td><a href="#">{{shop.name}}</a></td>
<td><a ng-href="{{shop.link}}">{{shop.name}}</a></td>
<td>{{shop.address}}</td>
<td>{{shop.stock}}</td>
<td>{{shop.stock ? "yes" : "no"}}</td>
<td><a ng-if="isAdmin()" ng-click="deleteShop(shop)" class="trash"><span class="glyphicon glyphicon-trash pull-right"></span></a></td>
</tr>
</thead>
Expand Down
96 changes: 56 additions & 40 deletions server/config/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,65 @@ var Shop = require('../api/shop/shop.model');

Shop.find({}).remove(function () {
Shop.create({
name: "Kunstspätkauf",
address: "Schlesische Str. 19, 10997 Berlin",
stock: 100,
latitude: 52.49861,
longitude: 13.446149999999989,
createdAt: "2013-10-22T09:34:23.519Z",
updatedAt: "2013-10-31T13:24:23.236Z"
},
{
name: "Fulda Getränke",
address: "Fuldastr. 53, 12043 Berlin-Neukölln",
stock: 100,
latitude: 52.48369,
longitude: 13.435249999999996,
createdAt: "2013-10-22T09:30:15.516Z",
updatedAt: "2013-10-30T15:20:53.392Z"
},
{
name: "Fachschaft Charité im Hexenhaus",
address: "Philippstraße 12 10115 Berlin",
description: "Lorem Ipsum",
stock: 100,
latitude: 52.5250862,
longitude: 13.38128329999995,
createdAt: "2013-11-04T08:55:04.063Z",
updatedAt: "2013-11-04T08:55:04.715Z"
});
name: "Kunstspätkauf",
address: "Schlesische Str. 19, 10997 Berlin",
stock: 100,
latitude: 52.49861,
longitude: 13.446149999999989,
image: "assets/images/yeoman.png",
link: "http://www.google.de/",
createdAt: "2013-10-22T09:34:23.519Z",
updatedAt: "2013-10-31T13:24:23.236Z"
},
{
name: "Fulda Getränke",
address: "Fuldastr. 53, 12043 Berlin-Neukölln",
stock: 100,
latitude: 52.48369,
longitude: 13.435249999999996,
image: "assets/images/yeoman.png",
link: "http://www.google.de/",
createdAt: "2013-10-22T09:30:15.516Z",
updatedAt: "2013-10-30T15:20:53.392Z"
},
{
name: "Fachschaft Charité im Hexenhaus",
address: "Philippstraße 12 10115 Berlin",
description: "Lorem Ipsum",
stock: 100,
latitude: 52.5250862,
longitude: 13.38128329999995,
image: "assets/images/yeoman.png",
link: "http://www.google.de/",
createdAt: "2013-11-04T08:55:04.063Z",
updatedAt: "2013-11-04T08:55:04.715Z"
},
{
"name": "KIKISOL",
"address": "Lindowertsr. 12 13347 Berlin",
"description": "im alten und im neuen KIKI SOL",
"stock": 0,
"image": "assets/images/yeoman.png",
"link": "http://www.google.de/",
"latitude": 52.54416209999999,
"longitude": 13.36886949999996
});
});

User.find({}).remove(function() {
User.find({}).remove(function () {
User.create({
provider: 'local',
name: 'Test User',
email: '[email protected]',
password: 'test'
}, {
provider: 'local',
role: 'admin',
name: 'Admin',
email: '[email protected]',
password: 'admin'
}, function() {
provider: 'local',
name: 'Test User',
email: '[email protected]',
password: 'test'
}, {
provider: 'local',
role: 'admin',
name: 'Admin',
email: '[email protected]',
password: 'admin'
}, function () {
console.log('finished populating users');
}
);
});
});

0 comments on commit 3b8c10f

Please sign in to comment.