Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
Signed-off-by: Levi Tan Ong <levi@byimplication.com>
  • Loading branch information
livtanong committed Jan 15, 2014
1 parent 6261a77 commit 409a6c1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/views/explore.scala.html
Expand Up @@ -28,8 +28,9 @@
<h1>
{{focus.value.fpapDsc}} ({{focus.value.year}})
</h1>
<star-rating item="focus.value"></star-rating>

<bi-req-login>
<star-rating item="focus.value"></star-rating>
</bi-req-login>
<h2>Locate</h2>
<!--{{focus.value.clicks}} people have marked this location.-->
<div class="map-controls">
Expand Down
10 changes: 10 additions & 0 deletions public/javascripts/main.js
Expand Up @@ -49,6 +49,16 @@ app
}
}
})
.directive('biRequireLogin', function(){
return {
restrict: 'E',
templateUrl: '/assets/templates/biReqLogin.html',
transclude: true,
controller: function($scope){

}
}
})
.directive('biCurtain', function(){
return {
link: function(scope, elm, attrs){
Expand Down
6 changes: 6 additions & 0 deletions public/templates/biReqLogin.html
@@ -0,0 +1,6 @@
<div ng-if="loggedIn" ng-transclude>
<!-- Sign up / Log in to rate! -->
</div>
<!-- <div ng-if="!loggedIn">
<a href="/login" target="_self">Login to rate!</a>
</div> -->
4 changes: 2 additions & 2 deletions public/templates/rateStub.html
Expand Up @@ -4,8 +4,8 @@
<i ng-repeat="star in stars" ng-class="starClass(item, star)"></i>
</span>
<span class="apply-rating">
<i ng-if="loggedIn" ng-repeat="star in stars" class="fa fa-star" ng-click="rateProject(item, star)"></i>
<a ng-if="!loggedIn" target="_self" href="/login">Sign up / Log in to rate!</a>
<i ng-repeat="star in stars" class="fa fa-star" ng-click="rateProject(item, star)"></i>
<!-- <a ng-if="!loggedIn" target="_self" href="/login">Sign up / Log in to rate!</a> -->
</span>
</span>
<span class="num-rates">({{item.ratings}} rating<span ng-if="item.ratings != 1">s</span>)</span>
Expand Down

0 comments on commit 409a6c1

Please sign in to comment.