Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 39d2c50

Browse files
author
vikasrohit
committed
Merge branch 'dev' into feature/quick-fixes-pre-first-ga-release
* dev: lower cased Added image count and 'x' Renamed the page header to Overview platform stats in members page Conflicts: app/community/members.jade
2 parents e488d27 + cd2e5c7 commit 39d2c50

File tree

8 files changed

+76
-8
lines changed

8 files changed

+76
-8
lines changed

app/community/members.controller.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
angular.module('tc.community').controller('MembersController', MembersController);
55

6-
MembersController.$inject = ['CommunityDataService', 'CONSTANTS'];
6+
MembersController.$inject = ['CommunityDataService', 'StatisticsService', 'CONSTANTS'];
77

8-
function MembersController(CommunityDataService, CONSTANTS) {
8+
function MembersController(CommunityDataService, StatisticsService, CONSTANTS) {
99
var ctrl = this;
1010
ctrl.notSearch = true;
1111
ctrl.showing = 'list';
@@ -26,6 +26,10 @@
2626
ctrl.notSearch = true;
2727
}
2828
};
29+
30+
StatisticsService.getPlatformStats().then(function(data) {
31+
ctrl.platformStats = data;
32+
})
2933
}
3034

3135
})();

app/community/members.jade

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@
1010
input(type="submit" name="search-btn" value="").search-ico
1111

1212
.default-show-container(ng-show="ctrl.notSearch")
13+
.platform-stats-container
14+
.stat
15+
p.statVal {{ctrl.platformStats.memberCount | number : 0}}
16+
p.statLabel ACTIVE MEMBER
17+
.stat
18+
p.statVal {{ctrl.platformStats.activeMembersCount | number : 0}}
19+
p.statLabel COMPETING TODAY
20+
.stat
21+
p.statVal {{ctrl.platformStats.prizePurse | currency:undefined:0}}
22+
p.statLabel AVAILABLE PRIZE
23+
.stat
24+
p.statVal {{ctrl.platformStats.activeContestsCount | number : 0}}
25+
p.statLabel ACTIVE CHALLENGES
1326
.members-of-month-container
1427
h2 Members of the Month
1528
small {{ctrl.currentMonth}}

app/directives/challenge-user-place/challenge-user-place.directive.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@
4343
activate();
4444

4545
function activate() {
46+
$scope.numImages = 0;
4647
if (!$scope.challenge.isPrivate && $scope.challenge.userDetails.submissions && $scope.challenge.userDetails.submissions.length > 0) {
48+
$scope.numImages = $scope.challenge.userDetails.submissions.filter(function(submission) {
49+
return submission && submission.submissionImage;
50+
}).length;
4751
$scope.selectedIndex = 0;
4852
$scope.challenge.thumbnailId = $scope.challenge.userDetails.submissions[0].id;
4953
$scope.imageURL = $scope.challenge.userDetails.submissions[0].submissionImage && $scope.challenge.userDetails.submissions[0].submissionImage.full;

app/directives/challenge-user-place/design-challenge-user-place.directive.jade

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
img(ng-show="!challenge.isPrivate", ng-src="{{imageURL || '/images/card-bg-no-image.svg'}}", fallback-src="/images/card-bg-no-image.svg")
99
img(ng-show="challenge.isPrivate", src="/images/card-bg-private-project.svg")
1010

11+
.thumbnail-gallery(ng-show="numImages", ng-click="!challenge.isPrivate && imageURL && openLightbox()")
12+
.gallery-icon
13+
14+
.num-images {{numImages}} IMAGES
15+
1116
.list-view(ng-show="view === 'list'")
1217
.place-date
1318
p.place(ng-class="{ 'first-place': challenge.wonFirst }", ng-show="challenge.highestPlacement") {{challenge.highestPlacement}}#[span {{challenge.highestPlacement | ordinal:true}}] Place
@@ -22,3 +27,8 @@
2227
.thumbnail(ng-click="!challenge.isPrivate && imageURL && openLightbox()", ng-class="{hidden: challenge.userStatus !== 'PASSED_REVIEW'}")
2328
img(ng-show="!challenge.isPrivate", ng-src="{{imageURL || '/images/card-bg-no-image.svg'}}", fallback-src="/images/ico-picture.svg")
2429
img(ng-show="challenge.isPrivate", src="/images/card-bg-private-project.svg")
30+
31+
.thumbnail-gallery(ng-show="numImages", ng-click="!challenge.isPrivate && imageURL && openLightbox()")
32+
.gallery-icon
33+
34+
.num-images {{numImages}} IMAGES

app/filters/challengeLinks.filter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
} else {
2424
var data = {
2525
domain: CONSTANTS.domain,
26-
track: challenge.track,
26+
track: challenge.track.toLowerCase(),
2727
forumId: challenge.forumId,
2828
id: challenge.id
2929
};
3030
switch (type) {
3131
case 'forums':
3232
switch (challenge.track) {
33-
case 'DEVELOP':
33+
case 'develop':
3434
return String.supplant('https://apps.{domain}/forums/?module=Category&categoryID={forumId}', data);
35-
case 'DATA':
35+
case 'data':
3636
return String.supplant('https://apps.{domain}/forums/?module=Category&categoryID={forumId}', data);
37-
case 'DESIGN':
37+
case 'design':
3838
return String.supplant('https://apps.{domain}/forums/?module=ThreadList&forumId={forumId}', data);
3939
}
4040

app/services/statistics.service.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@
1010
var service = {
1111
getDevTop: getDevTop,
1212
getDesignTop: getDesignTop,
13-
getDataTop: getDataTop
13+
getDataTop: getDataTop,
14+
getPlatformStats: getPlatformStats
1415
};
1516
return service;
1617

1718
///////////////
1819

20+
21+
function getPlatformStats() {
22+
return ApiService.restangularV2.all('platform')
23+
.withHttpConfig({skipAuthorization: true})
24+
.customGET('statistics');
25+
}
26+
1927
function getDevTop(size) {
2028
var url = CONSTANTS.API_URL_V2 + '/users/tops/develop?pageSize=' + size;
2129
return ApiService.restangularV2.all('users')

assets/css/community/members.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,30 @@
3737
}
3838
}
3939
}
40+
.platform-stats-container {
41+
background: $white;
42+
padding: 10px;
43+
margin-bottom: 6px;
44+
height: 70px;
45+
font-family: "Sofia Pro",Arial,Helvetica,sans-serif;
46+
.stat {
47+
float: left;
48+
width: 25% ;
49+
text-align: center;
50+
}
51+
.statVal {
52+
color: #3d3d3d;
53+
font-size: 32px;
54+
margin-bottom: 7px;
55+
position: relative;
56+
}
57+
58+
.statLabel {
59+
color: #a3a3ae;
60+
font-size: 12px;
61+
font-weight: 400;
62+
}
63+
}
4064
.search-container {
4165
@include module-full-width;
4266
background: $white;

assets/css/directives/design-lightbox.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@
6767
justify-content: center;
6868
z-index: 10000;
6969
.ngdialog-content {
70-
.ngdialog-close { display: none; }
70+
.ngdialog-close {
71+
position: absolute;
72+
top: 5px;
73+
right: 15px;
74+
font-size: 30px;
75+
}
7176
opacity: .95;
7277
height: 742px;
7378
width: 768px;

0 commit comments

Comments
 (0)