Skip to content

Commit 6b0e6ea

Browse files
author
Paul Bulai
committed
fixed typos in documentation, updated copyright information, fixed contributors links and now displaying the 20 most active ones
1 parent a98e4d4 commit 6b0e6ea

File tree

3 files changed

+36
-34
lines changed

3 files changed

+36
-34
lines changed

app/scripts/controllers/footer.js

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
angular.module('angularGoogleMapsApp').controller('FooterCtrl', [
44
'$scope', '$log', '$q', '$github',
5-
function($scope, $log, $q, $github) {
5+
function ($scope, $log, $q, $github) {
66

77
var githubCalled = false;
88

99
if (!githubCalled) {
1010
// GitHub api calls
1111
$q.all([$github.getAllCommits(), $github.getContributors(), $github.getIssues(), $github.getEvents()])
12-
.then(function(results) {
12+
.then(function (results) {
1313

1414
var commits = results[0],
1515
contributors = results[1],
@@ -29,7 +29,7 @@ angular.module('angularGoogleMapsApp').controller('FooterCtrl', [
2929
events: events
3030
}
3131
});
32-
}, function(err) {
32+
}, function (err) {
3333
$log.error(err);
3434
$scope.github = null;
3535
});
@@ -41,49 +41,51 @@ angular.module('angularGoogleMapsApp').controller('FooterCtrl', [
4141
return '<a href="' + actor.url + '" rel="external">' + actor.login + '</a>';
4242
}
4343

44-
$scope.eventLabel = function(event) {
44+
$scope.thisYear = new Date().getFullYear();
45+
46+
$scope.eventLabel = function (event) {
4547

4648
var pl = event.payload;
4749

4850
switch (event.type) {
49-
case 'WatchEvent':
50-
return 'starred this repository';
51+
case 'WatchEvent':
52+
return 'starred this repository';
5153

52-
case 'CreateEvent':
53-
return 'created ' + pl.ref_type + ' ' + pl.ref;
54+
case 'CreateEvent':
55+
return 'created ' + pl.ref_type + ' ' + pl.ref;
5456

55-
case 'ForkEvent':
56-
return 'forked this repository';
57+
case 'ForkEvent':
58+
return 'forked this repository';
5759

58-
case 'PushEvent':
59-
return 'pushed ' + pl.size + ' commit(s) to ' + pl.ref.replace('refs/heads/', '');
60+
case 'PushEvent':
61+
return 'pushed ' + pl.size + ' commit(s) to ' + pl.ref.replace('refs/heads/', '');
6062

61-
case 'IssueCommentEvent':
62-
return 'commented on issue ' + pl.issue.number;
63+
case 'IssueCommentEvent':
64+
return 'commented on issue ' + pl.issue.number;
6365

64-
case 'DeleteEvent':
65-
return 'deleted ' + pl.ref_type + ' ' + pl.ref;
66+
case 'DeleteEvent':
67+
return 'deleted ' + pl.ref_type + ' ' + pl.ref;
6668

67-
case 'PullRequestEvent':
68-
return pl.action + ' pull request ' + pl.pull_request.number;
69+
case 'PullRequestEvent':
70+
return pl.action + ' pull request ' + pl.pull_request.number;
6971

70-
case 'IssuesEvent':
71-
return pl.action + ' issue ' + pl.issue.number;
72+
case 'IssuesEvent':
73+
return pl.action + ' issue ' + pl.issue.number;
7274

73-
case 'PullRequestReviewCommentEvent':
74-
return 'commented on a <a href="' + pl.comment.html_url + '" rel="external">pull request</a>';
75+
case 'PullRequestReviewCommentEvent':
76+
return 'commented on a <a href="' + pl.comment.html_url + '" rel="external">pull request</a>';
7577

76-
case 'GollumEvent':
77-
var page = pl.pages && pl.pages.length ? pl.pages[0] : null;
78+
case 'GollumEvent':
79+
var page = pl.pages && pl.pages.length ? pl.pages[0] : null;
7880

79-
if (page) {
80-
return page.action + ' page <a href="' + page.html_url + '" rel="external">' + page.title + '</a> on the wiki';
81-
}
81+
if (page) {
82+
return page.action + ' page <a href="' + page.html_url + '" rel="external">' + page.title + '</a> on the wiki';
83+
}
8284

83-
return '[api data error]';
85+
return '[api data error]';
8486

85-
case 'CommitCommentEvent':
86-
return 'commented on commit ' + pl.comment.commit_id.substring(0, 8);
87+
case 'CommitCommentEvent':
88+
return 'commented on commit ' + pl.comment.commit_id.substring(0, 8);
8789
}
8890

8991
return "TODO (" + event.type + ")";

app/views/footer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<div class="col-md-3">
88
<h3>Collaborators</h3>
99
<ul class="list-inline">
10-
<li class="thumbnail collaborator" ng-repeat="c in github.contributors track by c.login">
11-
<a ng-href="{{ c.url }}" rel="external nofollow">
10+
<li class="thumbnail collaborator" ng-repeat="c in github.contributors | limitTo:20 track by c.login">
11+
<a ng-href="{{ c.html_url }}" rel="external nofollow">
1212
<img ng-src="{{ c.avatar_url }}" alt="{{ c.login }}" title="{{ c.login }}">
1313
</a>
1414
</li>
@@ -64,7 +64,7 @@ <h4>Uh oh...</h4>
6464

6565
<div class="row">
6666
<p class="text-center text-tiny copyright">
67-
&copy; 2013, 2014 <a href="https://github.com/angular-ui/angular-google-maps" rel="external">angular-google-maps</a>
67+
&copy; 2013 - {{thisYear}} <a href="https://github.com/angular-ui/angular-google-maps" rel="external">angular-google-maps</a>
6868
&mdash;
6969
released under <a href="http://opensource.org/licenses/MIT" rel="external">the MIT license</a>
7070
</p>

app/views/use.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <h1 class="page-header">Quickstart</h1>
5656
<div hljs language="js">
5757
angular.module('myApplicationModule', ['uiGmapgoogle-maps']).config(
5858
['uiGmapGoogleMapApiProvider', function(GoogleMapApiProviders) {
59-
GoogleMapApiProvider.configure({
59+
GoogleMapApiProviders.configure({
6060
china: true
6161
});
6262
}]

0 commit comments

Comments
 (0)