Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<label for={{name}}>{{title}}</label>
<label for={{this.name}}>{{this.title}}</label>
{{house-ads-chooser
settingValue=adValue
choices=adNames
onChange=(action (mut adValue))
settingValue=this.adValue
choices=this.adNames
onChange=(action (mut this.adValue))
}}
<div class="setting-controls">
{{#if changed}}
{{#if this.changed}}
<DButton class="ok" @action={{action "save"}} @icon="check" />
<DButton class="cancel" @action={{action "cancel"}} @icon="times" />
{{/if}}
</div>
<p class="help">{{help}}</p>
<p class="help">{{this.help}}</p>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<label for={{name}}>{{title}}</label>
<TextField @value={{adValue}} @classNames="house-ads-text-input" />
<label for={{this.name}}>{{this.title}}</label>
<TextField @value={{this.adValue}} @classNames="house-ads-text-input" />
<div class="setting-controls">
{{#if changed}}
{{#if this.changed}}
<DButton class="ok" @action={{action "save"}} @icon="check" />
<DButton class="cancel" @action={{action "cancel"}} @icon="times" />
{{/if}}
</div>
<p class="help">{{help}}</p>
<p class="help">{{this.help}}</p>
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<section class="house-ads-settings content-body">
<div>{{i18n "admin.adplugin.house_ads.description"}}</div>

{{#if houseAds.length}}
{{#if this.houseAds.length}}
<form class="form-horizontal">
{{house-ads-list-setting
name="topic_list_top"
value=adSettings.topic_list_top
allAds=houseAds
adSettings=adSettings
value=this.adSettings.topic_list_top
allAds=this.houseAds
adSettings=this.adSettings
}}
{{house-ads-list-setting
name="topic_above_post_stream"
value=adSettings.topic_above_post_stream
allAds=houseAds
adSettings=adSettings
value=this.adSettings.topic_above_post_stream
allAds=this.houseAds
adSettings=this.adSettings
}}
{{house-ads-list-setting
name="topic_above_suggested"
value=adSettings.topic_above_suggested
allAds=houseAds
adSettings=adSettings
value=this.adSettings.topic_above_suggested
allAds=this.houseAds
adSettings=this.adSettings
}}
{{house-ads-list-setting
name="post_bottom"
value=adSettings.post_bottom
allAds=houseAds
adSettings=adSettings
value=this.adSettings.post_bottom
allAds=this.houseAds
adSettings=this.adSettings
}}
{{house-ads-list-setting
name="topic_list_between"
value=adSettings.topic_list_between
allAds=houseAds
adSettings=adSettings
value=this.adSettings.topic_list_between
allAds=this.houseAds
adSettings=this.adSettings
}}

<DButton
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="adplugin-mgmt">
<h1>{{i18n "admin.adplugin.house_ads.title"}}</h1>
{{#if model.length}}
{{#if this.model.length}}
<div class="content-list">
<div class="house-ads-actions">
<LinkTo
Expand All @@ -17,7 +17,7 @@
</LinkTo>
</div>
<ul class="house-ads-list">
{{#each model as |ad|}}
{{#each this.model as |ad|}}
<li class="house-ads-list-item">
{{#link-to route="adminPlugins.houseAds.show" model=ad.id}}
{{ad.name}}
Expand Down
12 changes: 6 additions & 6 deletions assets/javascripts/discourse/components/ad-slot.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{#each adComponents as |adComponent|}}
{{#each this.adComponents as |adComponent|}}
{{! Trick to force full destroy/re-render of component when route changes }}
{{#each (array this.router.currentRoute)}}
{{component
adComponent
placement=placement
category=category
postNumber=postNumber
indexNumber=indexNumber
tagName=childTagName
placement=this.placement
category=this.category
postNumber=this.postNumber
indexNumber=this.indexNumber
tagName=this.childTagName
}}
{{/each}}
{{/each}}
4 changes: 2 additions & 2 deletions assets/javascripts/discourse/components/adbutler-ad.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#if showAd}}
<div id={{divId}} class={{className}}></div>
{{#if this.showAd}}
<div id={{this.divId}} class={{this.className}}></div>
{{/if}}
18 changes: 10 additions & 8 deletions assets/javascripts/discourse/components/amazon-product-links.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{{#if showAd}}
{{#if site.mobileView}}
<div class="amazon-product-links-label" style={{adTitleStyleMobile}}><h2
>{{i18n "adplugin.advertisement_label"}}</h2></div>
{{#if this.showAd}}
{{#if this.site.mobileView}}
<div
class="amazon-product-links-label"
style={{this.adTitleStyleMobile}}
><h2>{{i18n "adplugin.advertisement_label"}}</h2></div>
<iframe
style={{adWrapperStyleMobile}}
style={{this.adWrapperStyleMobile}}
marginwidth="0"
marginheight="0"
scrolling="no"
frameborder="0"
src={{userInputMobile}}
src={{this.userInputMobile}}
title={{i18n "adplugin.advertisement_label"}}
>
</iframe>
Expand All @@ -18,12 +20,12 @@
}}</h2></div>
<div class="container" align="center">
<iframe
style={{adWrapperStyle}}
style={{this.adWrapperStyle}}
marginwidth="0"
marginheight="0"
scrolling="no"
frameborder="0"
src={{userInput}}
src={{this.userInput}}
title={{i18n "adplugin.advertisement_label"}}
>
</iframe>
Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/discourse/components/carbonads-ad.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if showAd}}
{{#if this.showAd}}
{{! template-lint-disable no-forbidden-elements }}
<script src={{url}} id="_carbonads_js" async type="text/javascript">
<script src={{this.url}} id="_carbonads_js" async type="text/javascript">
</script>
{{/if}}
14 changes: 7 additions & 7 deletions assets/javascripts/discourse/components/google-adsense.hbs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{{#if showAd}}
{{#if this.showAd}}
<div class="google-adsense-label"><h2>{{i18n
"adplugin.advertisement_label"
}}</h2></div>
<div
class="google-adsense-content"
id={{if isResponsive "google-adsense__responsive"}}
style={{adWrapperStyle}}
id={{if this.isResponsive "google-adsense__responsive"}}
style={{this.adWrapperStyle}}
>
<ins
class="adsbygoogle"
style={{adInsStyle}}
data-ad-client="ca-pub-{{publisher_id}}"
data-ad-slot={{ad_code}}
data-ad-format={{autoAdFormat}}
style={{this.adInsStyle}}
data-ad-client="ca-pub-{{this.publisher_id}}"
data-ad-slot={{this.ad_code}}
data-ad-format={{this.autoAdFormat}}
>
</ins>
</div>
Expand Down
17 changes: 8 additions & 9 deletions assets/javascripts/discourse/components/google-dfp-ad.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{{#if showAd}}
{{#if site.mobileView}}
<div class="google-dfp-ad-label" style={{adTitleStyleMobile}}><h2>{{i18n
"adplugin.advertisement_label"
}}</h2></div>
{{#if this.showAd}}
{{#if this.site.mobileView}}
<div class="google-dfp-ad-label" style={{this.adTitleStyleMobile}}><h2
>{{i18n "adplugin.advertisement_label"}}</h2></div>
<div
id={{divId}}
style={{adWrapperStyle}}
id={{this.divId}}
style={{this.adWrapperStyle}}
class="dfp-ad-unit"
align="center"
></div>
Expand All @@ -14,8 +13,8 @@
"adplugin.advertisement_label"
}}</h2></div>
<div
id={{divId}}
style={{adWrapperStyle}}
id={{this.divId}}
style={{this.adWrapperStyle}}
class="dfp-ad-unit"
align="center"
></div>
Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/discourse/components/house-ad.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#if showAd}}
{{html-safe adHtml}}
{{#if this.showAd}}
{{html-safe this.adHtml}}
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ad-slot
placement="topic-list-between"
category=category.slug
indexNumber=index
category=this.category.slug
indexNumber=this.index
childTagName="td"
}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ad-slot placement="topic-list-top" category=category.slug}}
{{ad-slot placement="topic-list-top" category=this.category.slug}}
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{{ad-slot placement="topic-above-post-stream" category=model.category.slug}}
{{ad-slot
placement="topic-above-post-stream"
category=this.model.category.slug
}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ad-slot placement="topic-above-suggested" category=model.category.slug}}
{{ad-slot placement="topic-above-suggested" category=this.model.category.slug}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"devDependencies": {
"@discourse/lint-configs": "2.0.1",
"@discourse/lint-configs": "2.2.0",
"ember-template-lint": "6.0.0",
"eslint": "9.14.0",
"prettier": "2.8.8"
Expand Down
Loading