mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-07-06 13:22:12 +00:00
Only display ad if content exists
This commit is contained in:
parent
75439b5af3
commit
11a621fd50
@ -95,6 +95,10 @@ export default Ember.Component.extend({
|
|||||||
|
|
||||||
displayTopicListTop: function() {
|
displayTopicListTop: function() {
|
||||||
return this.get('placement') === 'topic-list-top';
|
return this.get('placement') === 'topic-list-top';
|
||||||
}.property('placement')
|
}.property('placement'),
|
||||||
|
|
||||||
|
hasAd: function() {
|
||||||
|
return ((this.get('adDetails.description') || '').length > 0);
|
||||||
|
}.property('adDetails')
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{{#if showAd}}
|
{{#if showAd}}
|
||||||
|
{{#if hasAd}}
|
||||||
{{#if site.mobileView}}
|
{{#if site.mobileView}}
|
||||||
{{#if displayPostBottom}}
|
{{#if displayPostBottom}}
|
||||||
{{partial "components/codefund/post-bottom"}}
|
{{partial "components/codefund/post-bottom"}}
|
||||||
@ -26,4 +27,5 @@
|
|||||||
{{partial "components/codefund/topic-list-top"}}
|
{{partial "components/codefund/topic-list-top"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
Loading…
x
Reference in New Issue
Block a user