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

Commit 6d00aea

Browse files
committed
Rendering DE domain organizational logo, too
1 parent 02fb6e3 commit 6d00aea

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

app/components/transcript/transcript.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
</div>
1313

1414
<div class="transcript-header">
15-
<img ng-src="{{domain_logo_secondary}}" class="logo"/>
15+
<img ng-src="{{domain_logo_secondary}}"
16+
class="logo"
17+
ng-if="!!domain_logo_secondary" />
1618
<div class="right">
1719
<div class="user-name">{{transcript.user.givenName}} {{transcript.user.familyName}}</div>
1820
<div class="rop-time">Status as of: {{transcript.created_at}}</div>

app/components/transcript/transcript.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import request from 'superagent';
33

44
import template from './transcript.html';
5-
import domain_logo from '../../images/Atlas.png';
5+
import atlas_logo from '../../images/Atlas.png';
66
import moment from "moment";
77
import _ from 'lodash';
88

@@ -13,17 +13,32 @@ export default ['$http', 'transcriptService', '$stateParams', function($http, tr
1313
templateUrl:template,
1414
link: function(scope, element){
1515

16-
scope.domain_logo_secondary = domain_logo;
16+
scope.domain_logo_secondary = atlas_logo;
1717

1818
scope.transcriptLoading = true;
1919

20+
function logo(transcript, url) {
21+
22+
if (!url) {
23+
// TODO: hack for demo
24+
const isAtlas = transcript.user.givenName === 'Olivia';
25+
return isAtlas ? atlas_logo : null;
26+
} else if (!url.startsWith("http")) {
27+
const host = window.lo_api_config && window.lo_api_config.root
28+
return host ? host + url : null;
29+
} else {
30+
return url;
31+
}
32+
33+
scope.domain_logo_secondary = transcript.organization.logo;
34+
}
35+
2036
transcriptService.getTranscriptForUser($stateParams.userId)
2137
.then(transcript => {
2238

23-
// TODO: parameterize the logo
24-
const isAtlas = transcript.user.givenName === 'Olivia';
39+
scope.domain_logo_secondary = logo(transcript, transcript.organization.logo);
2540

26-
scope.domain_logo_secondary = isAtlas ? domain_logo : transcript.organization.logo;
41+
console.log("Logo: "+scope.domain_logo_secondary);
2742

2843
scope.transcriptLoading = false;
2944
console.log('got:', transcript)

0 commit comments

Comments
 (0)