Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sowmya authored and sowmya committed Dec 23, 2014
2 parents 9a2e6af + eb6421b commit 1e42a7e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 18 deletions.
2 changes: 2 additions & 0 deletions app/controllers/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public static Result getProductsOfMerchant(int merchant_id, int page_num) {
}
return ok(productlist.render(prods,recos));
}

public static Result getProductsOfMerchantWithUname(int merchant_id,String uname, int page_num) {
List<Product> prods = new ArrayList<Product>();
List<Product> recos = new ArrayList<Product>();
Expand All @@ -189,6 +190,7 @@ public static Result getProductsOfMerchantWithUname(int merchant_id,String uname
} catch (Exception e) {
e.printStackTrace();
}

return ok(userproductlist.render(uname,prods,recos));
}

Expand Down
6 changes: 2 additions & 4 deletions app/views/product.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@
<body>
@header()
@navigation()
@recom(finallist)
@recom(null, finallist)
<div class="container-fluid" style="margin:0px;margin-left:50px">
<div class="row" style="width:1600px">
<div class="col-xs-6">
<img src="data:image/jpg;base64,@p.photo" hspace=20px vspace=20px>
</div>
<div class="col-xs-3" align=right vspace=20px hspace=20px>
<div class="jumbotron" style="margin-top: 200px;
border: 1px solid #ccc;
background-color: lightgrey;margin-bottom: 0px;margin-left: 250px;width: 520px;text-align: center">
<div class="jumbotron" style="margin-top: 200px;border: 1px solid #ccc;background-color: lightgrey;margin-bottom: 0px;text-align: center">
<label style="text-transform: uppercase;font-size: x-large;">@p.merchant</label>
<input class="rating" data-size="xxs" data-disabled="true" value=@p.rating>
<label style="font-size: large;">[email protected]</label>
Expand Down
16 changes: 13 additions & 3 deletions app/views/recom.scala.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@(products : List[Product])
@(username:String, products : List[Product])
<script type="text/javascript" src="@routes.Assets.at("javascripts/slider/jquery-1.9.1.min.js")"></script>
<!-- use jssor.slider.mini.js (40KB) instead for release -->
<!-- jssor.slider.mini.js = (jssor.js + jssor.slider.js) -->
Expand Down Expand Up @@ -105,12 +105,22 @@
<input class="rating" data-size="xxs" data-disabled="true" value=@product1.rating>
<label>[email protected]</label>
</div>
<script>

@if(username != null) {
<script>
$("#@product1.prod_id").click(function() {
var url = window.location.href.split("/")[0];
window.location.href = url + "/uproduct?u=@username&p=" + @product1.prod_id;
});
</script>
} else {
<script>
$("#@product1.prod_id").click(function() {
var url = window.location.href.split("/")[0];
window.location.href = url + "/product?p=" + @product1.prod_id;
});
</script>
</script>
}
}

</div>
Expand Down
21 changes: 10 additions & 11 deletions app/views/userproduct.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
<body>
@userheader(u, "FALSE", "FALSE", null)
@usernav(u)
@recom(finallist)
<div class="container">
<div class="row">
<div class="col-sm-6" style="width: 400px;">
<img src="data:image/jpg;base64,@p.photo">
</div>
@recom(u, finallist)
<div class="container-fluid" style="margin:0px;margin-left:50px;padding-top:20px;">
<div class="row" style="width:1600px">
<div class="col-sm-6">
<div class="jumbotron" style="margin-bottom: 0px;margin-left: 250px;width: 520px;text-align: center">
<img src="data:image/jpg;base64,@p.photo" hspace=20px vspace=20px>
</div>
<div class="col-sm-3" align=right vspace=20px hspace=20px>
<div class="jumbotron" style="margin-top: 200px;border: 1px solid #ccc;background-color: lightgrey;margin-bottom: 0px;text-align: center">
<label style="text-transform: uppercase;font-size: x-large;">@p.merchant</label>
<input class="rating" data-size="xxs" data-disabled="true" value=@p.rating>
<label style="font-size: large;">[email protected]</label>
<!-- <p>Quantity Available</p> -->
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="col-sm-4 col-sm-offset-1">
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false" style="padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; height: 32px; line-height:16px; margin-right: 0px;">Size Selection <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
Expand All @@ -48,9 +48,8 @@
</ul>
</div>
</div>
<div class="col-sm-4">
<a class="btn btn-primary btn-md" href="#" role="button" style="
margin-left: 40px;" data-toggle="modal" data-target="#loginmodal">Buy Now!</a>
<div class="col-sm-4 col-sm-offset-1">
<a class="btn btn-primary btn-md" href="#" role="button" style="margin-left: 40px;">Buy Now!</a>
</div>
</div>
</div>
Expand Down

0 comments on commit 1e42a7e

Please sign in to comment.