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

Tom add design thumbnails #159

Merged
merged 3 commits into from
Sep 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/directives/challenge-tiles/challenge-tile.directive.jade
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@
a(ng-href="http://apps.{{DOMAIN}}/forums//?module=Category&categoryID={{challenge.forumId}}")
i.fa.fa-comment

div.thumbnail(ng-if="challenge.track === 'DESIGN'")
img(ng-src="http://studio.topcoder.com/studio.jpg?module=DownloadSubmission&sbmid={{challenge.thumbnailId}}&sbt=thumb", fallback-src="/images/lock-icon-small.png")

p.roles Roles: {{challenge.userDetails.roles | listRoles}}

.challenge-status
5 changes: 4 additions & 1 deletion app/directives/challenge-tiles/challenge-tile.directive.js
Original file line number Diff line number Diff line change
@@ -38,7 +38,10 @@
challenge.registrationTimeLeft = (registrationDate - now)/(24*60*60*1000);
challenge.submissionTimeLeft = (submissionDate - now)/(24*60*60*1000);
// temporary...right now many challenges have a `null` track
challenge.track = challenge.track ? challenge.track.trim() : 'DEVELOP';
challenge.track = challenge.track ? challenge.track.trim() : 'DESIGN';
if (challenge.track == 'DESIGN' && challenge.userDetails.submissions && challenge.userDetails.submissions.length > 0) {
challenge.thumbnailId = challenge.userDetails.submissions[0].id;
}

// challenge.phaseMsg = preparePhaseMessage(challenge);

2 changes: 1 addition & 1 deletion app/directives/tcui-components.module.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function() {
'use strict';
angular.module('tcUIComponents', []);
angular.module('tcUIComponents', ['dcbImgFallback']);
})();
10 changes: 10 additions & 0 deletions assets/css/directives/challenge-tiles.scss
Original file line number Diff line number Diff line change
@@ -38,6 +38,16 @@
line-height: 25px;
}
}

.thumbnail {
display: flex;
flex-direction: row;
justify-content: center;
margin: 20px 0;
img {
}
}

.roles {
margin-top: 10px;
margin-bottom: 20px;
Binary file added assets/images/lock-icon-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/lock-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.