Skip to content

Commit

Permalink
POC-3
Browse files Browse the repository at this point in the history
  • Loading branch information
mohigup committed Mar 11, 2016
1 parent 2d10c65 commit 6c82af0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion public/project/views/details/details.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.module("GitApp")
.controller("DetailsController", DetailsController);

function DetailsController($scope, $http, $routeParams, GitIntService) {
function DetailsController($scope, $http, $routeParams,$rootScope, GitIntService) {

var vm = this;

Expand All @@ -19,6 +19,7 @@

function fetchRepStats(repo_name) {
GitIntService.findRepoStatistics(repo_name, renderDetails);
$rootScope.repo_url = repo_name
}

function renderDetails(response) {
Expand Down
2 changes: 1 addition & 1 deletion public/project/views/details/details.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1> Last year of commit activity grouped by Week.</h1>
</tr>

<tr ng-repeat="details in model.details">
<td><mydate>{{details.week *1000 | date:'yyyy-MM-dd HH:mm:ss Z'}}</mydate></td>
<td><mydate>{{details.week *1000 | date:'medium'}}</mydate></td>

<td>
{{details.days[0]}}
Expand Down
3 changes: 2 additions & 1 deletion public/project/views/sidebar/sidebar.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
.module("GitApp")
.controller("SidebarController", SidebarController)

function SidebarController($scope, $location) {
function SidebarController($scope, $location,$rootScope) {
console.log("siderbar called");
console.log("sidebar rootescope"+$rootScope.repo_url);
/// console.log("logout use statusr sidebar "+$rootScope.user.logged);
}

Expand Down
2 changes: 2 additions & 0 deletions public/project/views/sidebar/sidebar.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<li ng-if="user.logged" ng-class="{'active' : $location.url().indexOf('profile') != -1}"><a href="#/profile">Profile</a></li>
<li ng-if="user.logged" ng-class="{'active' : $location.url().indexOf('forms') != -1}"><a href="#/forms">User Issues</a></li>
<li ng-class="{'active' : $location.url().indexOf('search') != -1}"><a href="#/search">Search Repo</a></li>
<li ng-if="repo_url" ng-class="{'active' : $location.url().indexOf('statistics') != -1}">
<a ng-href="#/statistics/{{repo_url}}">Commit Activity</a></li>
<!-- <li ng-class="{'active' : $location.url().indexOf('details') != -1}"><a href="#/slidebuilder">Build Rep Commits Slides</a></li>
--> </ul>
</div>

0 comments on commit 6c82af0

Please sign in to comment.