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

Commit 8736549

Browse files
author
Victor George
committed
Merge branch 'dev' of github.com:appirio-tech/topcoder-app into forms-refactor
# By vikasrohit (14) and others # Via vikasrohit (7) and others * 'dev' of github.com:appirio-tech/topcoder-app: (30 commits) Revert "SUP-2257, Problem Archive link under SRM section should go to https://arena.topcoder.com/#/u/practiceProblemList." SUP-2160, Displayed color for Handle/Rating should be yellow SUP-2250, Grey color for handle should be more darker than current one. SUP-2209, User has past challenges but not able to access the past challenges from dashboard as user do not have any active challenges. SUP-2231, New Empty States for Dashboard and Profile attempting to clean up community app, moving data to a service SUP-2231, New Empty States for Dashboard and Profile refactoring controller & adding default view for /community reading link domain from config, refactoring api to skipAuthorization Added link for recent SRM color changes Fixed some labels members / statistic page updates, read top ranks from API SUP-2231, New Empty States for Dashboard and Profile, SUP-2209, User has past challenges but not able to access the past challenges from dashboard as user do not have any active challenges. SUP-2231, New Empty States for Dashboard and Profile, SUP-2209, User has past challenges but not able to access the past challenges from dashboard as user do not have any active challenges. SUP-2231, New Empty States for Dashboard and Profile, SUP-2231, User has past challenges but not able to access the past challenges from dashboard as user do not have any active challenges. SUP-2231, New Empty States for Dashboard and Profile, SUP-2231, User has past challenges but not able to access the past challenges from dashboard as user do not have any active challenges. SUP-2231, New Empty States for Dashboard and Profile SUP-1889, Dashboard UI Polish, SUP-2232, Directive for page state header SUP-2231, New Empty States for Dashboard and Profile SUP-2231, New Empty States for Dashboard and Profile Added sitemap links ...
2 parents 9fc6e80 + f155320 commit 8736549

File tree

90 files changed

+2297
-549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2297
-549
lines changed

app/community/community.controller.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(function() {
2+
'use strict';
3+
angular.module('tc.community').controller('BaseCommunityController', BaseCommunityController);
4+
5+
BaseCommunityController.$inject = ['$state'];
6+
7+
function BaseCommunityController($state) {
8+
9+
// provide default redirect to a child state
10+
if ($state.$current.name === 'community') {
11+
$state.go('community.members');
12+
}
13+
}
14+
})();
15+
16+

app/community/community.module.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(function() {
2+
'use strict';
3+
4+
var dependencies = [
5+
'ui.router',
6+
'tc.services',
7+
'tcUIComponents',
8+
'toaster'
9+
];
10+
11+
angular.module('tc.community', dependencies);
12+
13+
})();

app/community/community.routes.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
(function() {
2+
'use strict';
3+
4+
angular.module('tc.community').config([
5+
'$stateProvider',
6+
'$urlRouterProvider',
7+
'$locationProvider',
8+
routes
9+
]);
10+
11+
function routes($stateProvider, $urlRouterProvider, $locationProvider) {
12+
$locationProvider.html5Mode(true);
13+
var states = {
14+
'community': {
15+
parent: 'root',
16+
url: '/community/',
17+
data: {
18+
authRequired: false,
19+
},
20+
controller: 'BaseCommunityController'
21+
},
22+
'community.members': {
23+
parent: 'root',
24+
url: '/community/members/',
25+
templateUrl: 'community/members.html',
26+
controller: 'MembersController',
27+
controllerAs: 'ctrl',
28+
data: {
29+
authRequired: false,
30+
title: 'Community Members'
31+
}
32+
},
33+
34+
'community.statistics': {
35+
parent: 'root',
36+
url: '/community/statistics/',
37+
templateUrl: 'community/statistics.html',
38+
controller: 'StatisticsController',
39+
controllerAs: 'ctrl',
40+
data: {
41+
title: 'Community Statistics'
42+
}
43+
}
44+
};
45+
46+
angular.forEach(states, function(state, name) {
47+
$stateProvider.state(name, state);
48+
});
49+
};
50+
})();

app/community/members.controller.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
(function() {
2+
'use strict';
3+
4+
angular.module('tc.community').controller('MembersController', MembersController);
5+
6+
MembersController.$inject = ['CommunityDataService', 'CONSTANTS'];
7+
8+
function MembersController(CommunityDataService, CONSTANTS) {
9+
var ctrl = this;
10+
ctrl.notSearch = true;
11+
ctrl.showing = 'list';
12+
ctrl.domain = CONSTANTS.domain;
13+
ctrl.currentMonth = 'October 2015';
14+
ctrl.memberLeaderboard = [];
15+
ctrl.copilots = [];
16+
CommunityDataService.getMembersData()
17+
.then(function(data) {
18+
ctrl.memberLeaderboard = data.memberLeaderboard;
19+
ctrl.copilots = data.copilots;
20+
});
21+
22+
ctrl.search = function() {
23+
if (ctrl.keywords) {
24+
window.location.replace('/search?s=' + ctrl.keywords + '&scope=member');
25+
} else {
26+
ctrl.notSearch = true;
27+
}
28+
};
29+
}
30+
31+
})();

app/community/members.jade

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
.community-view
2+
.header-community
3+
header
4+
h1 Members
5+
6+
.members-container
7+
.search-container
8+
form(name="searchForm", role="form", ng-submit="ctrl.search()", novalidate)
9+
input(ng-model="ctrl.keywords", name="keywords", placeholder="find people", type="text", required)
10+
input(type="submit" name="search-btn" value="").search-ico
11+
12+
.default-show-container(ng-show="ctrl.notSearch")
13+
.members-of-month-container
14+
h2 Members of the Month
15+
small {{ctrl.currentMonth}}
16+
.members-wrapper
17+
.user-tile(ng-repeat="item in ctrl.memberLeaderboard")
18+
.avatar-wrapper: img(ng-src="{{item.avatar}}")
19+
.user-name {{item.name}}
20+
.user-tag(class="{{item.class}}") {{item.contestType}}
21+
p.user-desc {{item.description}}
22+
a(ng-href="//www.{{ctrl.domain}}/community/member-programs/topcoder-member-of-the-month/", target="_blank").user-more Read the story
23+
p.member-congratulation Congratulations to all the members of the month!
24+
25+
.reviewboard-container
26+
h2 Review Boards
27+
.content-wrapper
28+
.col
29+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=23", target="_blank") Conceptualization
30+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=6", target="_blank") Specification
31+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=7", target="_blank") Architecture
32+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=1", target="_blank") Component Design
33+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=2", target="_blank") Component Development
34+
.col
35+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=14", target="_blank") Assembly
36+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=38", target="_blank") First2Finish
37+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=39", target="_blank") Code
38+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=13", target="_blank") Test Suites
39+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=36", target="_blank") Report
40+
.col
41+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=19", target="_blank") UI prototype
42+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=24", target="_blank") RIA Build
43+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=35", target="_blank") Content Creation
44+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=26", target="_blank") Test Scenarios
45+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=ReviewBoard&pt=9", target="_blank") Bug Hunt
46+
47+
48+
.copilots-container
49+
h2 Copilots
50+
.copilots-wrapper
51+
.user-tile(ng-repeat="item in ctrl.copilots")
52+
.avatar-wrapper: img(ng-src="{{item.avatar}}")
53+
.user-name {{item.name}}
54+
.user-country {{item.country}}
55+
.btn-wrapper
56+
a(ng-href="//community.{{ctrl.domain}}/tc?module=ViewCopilotPool&size=20&view=0&sort=12", target="_blank").blue-btn View all copilots
57+
58+
59+
.search-result-container(ng-hide="ctrl.notSearch")
60+
h2 Search Result For:
61+
span "{{ctrl.keywords}}"
62+
.showing-controll-wrapper
63+
ul
64+
li
65+
input(type="radio" ng-model="ctrl.showing" value="grid" name="showing")#member-showing-grid
66+
label(for="member-showing-grid").grid-lbl grid
67+
li
68+
input(type="radio" ng-model="ctrl.showing" value="list" name="showing")#member-showing-list
69+
label(for="member-showing-list").list-lbl list
70+
.results-wrapper(ng-class="{'show-grid': ctrl.showing=='grid'}")
71+
.user-tile(ng-repeat="item in ctrl.searchResult")
72+
.avatar-wrapper: img(ng-src="{{item.avatar}}")
73+
.text-content
74+
.user-name {{item.name}}
75+
.user-country {{item.country}}
76+
a.user-more View Profile
77+
.btn-wrapper
78+
a.gray-btn Load More
79+
80+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
(function() {
2+
'use strict';
3+
4+
angular.module('tc.community').controller('StatisticsController', StatisticsController);
5+
6+
StatisticsController.$inject = ['CommunityDataService', 'StatisticsService', 'CONSTANTS'];
7+
8+
function StatisticsController(CommunityDataService, StatisticsService, CONSTANTS) {
9+
var statsData = this;
10+
statsData.domain = CONSTANTS.domain;
11+
statsData.SRMWinners = [];
12+
statsData.MarathonWinner = [];
13+
statsData.TopPerformers = [];
14+
15+
CommunityDataService.getStatisticsData()
16+
.then(function(data) {
17+
statsData.SRMWinners = data.SRMWinners;
18+
statsData.MarathonWinner = data.MarathonWinner;
19+
});
20+
21+
StatisticsService.getDesignTop(10).then(function(data) {
22+
statsData.TopPerformers.push({
23+
"contestType": "Design",
24+
"class": "design",
25+
"dataType": "Wins",
26+
"performers": data.plain().data
27+
});
28+
});
29+
30+
StatisticsService.getDevTop(10).then(function(data) {
31+
statsData.TopPerformers.push({
32+
"contestType": "Development",
33+
"class": "develop",
34+
"dataType": "Rating",
35+
"performers": data.plain().data
36+
});
37+
});
38+
39+
StatisticsService.getDataTop(10).then(function(data) {
40+
statsData.TopPerformers.push({
41+
"contestType": "Competitive Programming",
42+
"class": "data-science",
43+
"dataType": "Rating",
44+
"performers": data.plain().data
45+
});
46+
});
47+
}
48+
})();

app/community/statistics.jade

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.community-view
2+
.header-community
3+
header
4+
h1 Statistics
5+
6+
.statistics-container
7+
.winner-container
8+
.SRM-winner-container
9+
h2 Recent SRM Winners
10+
.tile-wrapper
11+
.winner-tile(ng-repeat="item in ctrl.SRMWinners")
12+
.avatar-wrapper: img(ng-src="{{item.avatar}}")
13+
.text-content
14+
p
15+
span.winner-name {{item.name}}
16+
span.winning-date {{item.date | date: 'dd MMM yyyy'}}
17+
p.winner-country {{item.country}}
18+
.contests
19+
p(ng-repeat="contest in item.contests") {{contest}}
20+
.btn-wrapper: a(ng-href="//community.{{ctrl.domain}}/tc?module=SrmDivisionWins", target="_blank").outlined-btn View All
21+
22+
23+
.MM-winner-container
24+
h2 Recent Marathon Match Winners
25+
.tile-wrapper
26+
.winner-tile(ng-repeat="item in ctrl.MarathonWinner")
27+
.avatar-wrapper: img(ng-src="{{item.avatar}}")
28+
.text-content
29+
p
30+
span.winner-name {{item.name}}
31+
span.winning-date {{item.date | date: 'dd MMM yyyy'}}
32+
p.winner-country {{item.country}}
33+
.contests
34+
p(ng-repeat="contest in item.contests") {{contest}}
35+
.btn-wrapper: a(ng-href="//community.{{ctrl.domain}}/longcontest/stats/?module=MatchWinners", target="_blank").outlined-btn View All
36+
37+
.top-performers-container
38+
h2 Top Performers
39+
.performers-container
40+
.performer-wrapper(ng-repeat="item in ctrl.TopPerformers")
41+
h3 {{item.contestType}}
42+
table
43+
thead(class="{{item.class}}")
44+
tr
45+
th #
46+
th Handle
47+
th {{item.dataType}}
48+
tbody
49+
tr(ng-repeat="user in item.performers track by $index", ng-class="{even: $even}")
50+
td {{$index + 1}}
51+
td {{user.handle}}
52+
td {{user.rating}}
53+
54+
.tops-container
55+
h2 Top Ranked
56+
.content-wrapper
57+
.col
58+
.link: a(ng-href="//community.{{ctrl.domain}}/tc?module=AlgoRank", target="_blank") Algorithm
59+
.link: a(ng-href="//www.{{ctrl.domain}}/longcontest/stats/?module=CoderRank", target="_blank") Marathon
60+
.link: a(ng-href="//www.{{ctrl.domain}}/stat?c=top_conceptors", target="_blank") Conceptualization
61+
.col
62+
.link: a(ng-href="//www.{{ctrl.domain}}/stat?c=top_specificators", target="_blank") Specification
63+
.link: a(ng-href="//www.{{ctrl.domain}}/stat?c=top_architects", target="_blank") Architecture
64+
.link: a(ng-href="//www.{{ctrl.domain}}/stat?c=top_designers", target="_blank") Component Design
65+
.col
66+
.link: a(ng-href="//www.{{ctrl.domain}}/stat?c=top_developers", target="_blank") Component Development
67+
.link: a(ng-href="//www.{{ctrl.domain}}/stat?c=top_assemblers", target="_blank") Assembly
68+
.link: a(ng-href="//www.{{ctrl.domain}}/stat?c=top_testers", target="_blank") Test Suites
69+
70+
.record-books-container
71+
h2 Record Books
72+
.content-wrapper
73+
.col
74+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=Static&d1=statistics&d2=recordbook_home", target="_blank") Algorithm
75+
.link: a(ng-href="//community.{{ctrl.domain}}/tc?module=ColorChange&ratid=1", target="_blank") Recent SRM Color Changes
76+
.col
77+
.link: a(ng-href="//www.{{ctrl.domain}}/longcontest/?module=Static&d1=stats&d2=recordbook_home", target="_blank") Marathon
78+
79+
.col
80+
.link: a(ng-href="//www.{{ctrl.domain}}/tc?module=Static&d1=compstats&d2=comp_recordbook_home", target="_blank") Component
81+

app/directives/distribution-graph/distribution-graph.directive.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,35 @@
2323
// grey
2424
{
2525
'color': '#9D9FA0',
26-
'darkerColor': '#848687',
26+
'darkerColor': '#9D9FA0',
2727
'start': 0,
2828
'end': 899
2929
},
3030
// green
3131
{
3232
'color': '#69C329',
33-
'darkerColor': '#50AA10',
33+
'darkerColor': '#69C329',
3434
'start': 900,
3535
'end': 1199
3636
},
3737
// blue
3838
{
3939
'color': '#616BD5',
40-
'darkerColor': '#4852BC',
40+
'darkerColor': '#616BD5',
4141
'start': 1200,
4242
'end': 1499
4343
},
4444
// yellow
4545
{
46-
'color': '#FCB816',
47-
'darkerColor': '#E39F00',
46+
'color': '#FCD617',
47+
'darkerColor': '#FCD617',
4848
'start': 1500,
4949
'end': 2199
5050
},
5151
// red
5252
{
5353
'color': '#EF3A3A',
54-
'darkerColor': '#D62121',
54+
'darkerColor': '#EF3A3A',
5555
'start': 2200,
5656
'end': Infinity
5757
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.empty-state-placeholder(ng-show="vm.show", class="{{vm.theme}}")
2+
.title(ng-bind="vm.title")
3+
.content(ng-transclude, ng-show="transcluded")
4+
.description(ng-bind="vm.description")
5+
.help-links
6+
.help-link(ng-repeat="link in vm.helpLinks")
7+
a(class="{{link.cssClass}}", title="{{link.title}}", ng-href="{{link.url}}", ng-if="link.url") {{link.title}}
8+
a(class="{{link.cssClass}}", title="{{link.title}}", ui-sref="{{link.state}}", ng-if="link.state") {{link.title}}
9+
a(class="{{link.cssClass}}", title="{{link.title}}", ng-click="link.onClick", ng-if="link.onClick") {{link.title}}

0 commit comments

Comments
 (0)