Skip to content

Commit

Permalink
Add legal link to configuration data (hyperledger-archives#2890)
Browse files Browse the repository at this point in the history
Also includes improvement to doc website navigation

Contributes to #2882

Signed-off-by: James Taylor <[email protected]>
  • Loading branch information
jt-nti authored Nov 30, 2017
1 parent 8140845 commit ae0cc29
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="footer-main">
<div class="footer-left">
<div class="footer-item">
<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Legal</a>
<div *ngIf='config.links.legal.trim() !== ""' class="footer-item">
<a href="{{ config.links.legal }}" target="_blank">Legal</a>
</div>
<div *ngIf='config.links.github.trim() !== ""' class="footer-item">
<a href="{{ config.links.github }}" target="_blank">GitHub</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const mockResponseConfigService = {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
}
};

Expand Down Expand Up @@ -89,7 +90,8 @@ describe('FooterComponent', () => {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
};

configService['configLoaded'] = true;
Expand Down Expand Up @@ -132,7 +134,8 @@ describe('FooterComponent', () => {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
};

mockBackend.connections.subscribe((connection) => {
Expand All @@ -158,7 +161,8 @@ describe('FooterComponent', () => {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
};

configService['configLoaded'] = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ describe('ConfigService', () => {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
};

// setup a mocked response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('Config', () => {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
},
analyticsID: 'My ID'
};
Expand All @@ -38,7 +39,8 @@ describe('Config', () => {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
});
service.analyticsID.should.deep.equal('My ID');
});
Expand All @@ -65,7 +67,8 @@ describe('Config', () => {
tutorial: 'https://hyperledger.github.io/composer/tutorials/playground-tutorial.html',
community: 'https://hyperledger.github.io/composer/support/support-index.html',
github: 'https://github.com/hyperledger/composer',
install: 'https://hyperledger.github.io/composer/installing/installing-index.html'
install: 'https://hyperledger.github.io/composer/installing/installing-index.html',
legal: 'https://www.apache.org/licenses/LICENSE-2.0'
};

service.setValuesFromObject(object);
Expand All @@ -75,7 +78,8 @@ describe('Config', () => {
tutorial: 'https://hyperledger.github.io/composer/tutorials/playground-tutorial.html',
community: 'https://hyperledger.github.io/composer/support/support-index.html',
github: 'https://github.com/hyperledger/composer',
install: 'https://hyperledger.github.io/composer/installing/installing-index.html'
install: 'https://hyperledger.github.io/composer/installing/installing-index.html',
legal: 'https://www.apache.org/licenses/LICENSE-2.0'
});
});
});
Expand All @@ -90,7 +94,8 @@ describe('Config', () => {
tutorial: 'My Tutorial',
community: 'My Community',
github: 'My Github',
install: 'My Install'
install: 'My Install',
legal: 'My License'
};
service.analyticsID = 'My ID';

Expand All @@ -104,7 +109,8 @@ describe('Config', () => {
tutorial: 'https://hyperledger.github.io/composer/tutorials/playground-tutorial.html',
community: 'https://hyperledger.github.io/composer/support/support-index.html',
github: 'https://github.com/hyperledger/composer',
install: 'https://hyperledger.github.io/composer/installing/installing-index.html'
install: 'https://hyperledger.github.io/composer/installing/installing-index.html',
legal: 'https://www.apache.org/licenses/LICENSE-2.0'
});

should.not.exist(service.analyticsID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export class Config {
tutorial: <string> '',
community: <string> '',
github: <string> '',
install: <string> ''
install: <string> '',
legal: <string> ''
};
public analyticsID: string = null;

Expand All @@ -24,7 +25,8 @@ export class Config {
tutorial: <string> 'https://hyperledger.github.io/composer/tutorials/playground-tutorial.html',
community: <string> 'https://hyperledger.github.io/composer/support/support-index.html',
github: <string> 'https://github.com/hyperledger/composer',
install: <string> 'https://hyperledger.github.io/composer/installing/installing-index.html'
install: <string> 'https://hyperledger.github.io/composer/installing/installing-index.html',
legal: <string> 'https://www.apache.org/licenses/LICENSE-2.0'
};
this.analyticsID = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
{% if page.index-order %}
{% capture mods %}{{ page.index-order | modulo:100 }}{% endcapture %}
{% if mods == "0" and page.exception == nil %}
- [<b>{{ page.title }}</b><img src="{{site.baseurl}}/assets/img/Caret_SW_2.svg" class="caret">](..{{page.url}}.html)
- [<b>{{ page.title }}</b><img src="{{site.baseurl}}/assets/img/Caret_SW_2.svg" class="caret">]({{site.baseurl}}{{page.url}})
{% elsif mods != "0" and page.exception == nil %}
- [{{page.title}}](..{{page.url}}.html)
- [{{page.title}}]({{site.baseurl}}{{page.url}})
{% endif %}
{% endif %}
{% endfor %}

0 comments on commit ae0cc29

Please sign in to comment.