Skip to content

Commit e23856d

Browse files
committed
wip
1 parent 8eb5375 commit e23856d

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

app/views/publishers/home.html.slim

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,40 +21,39 @@ noscript
2121
= append_javascript_pack_tag "WelcomeModal"
2222

2323
.dashboard
24+
- if @publisher.channels.empty?
25+
.col-md.mb-4
26+
.add-channel-cta
27+
= t ".add_channel_cta"
2428

25-
- if @publisher.channels.empty?
26-
.col-md.mb-4
27-
.add-channel-cta
28-
= t ".add_channel_cta"
29+
/ Don't show if none of the promo registrations has a valid stat
30+
- if !@publisher.only_user_funds? \
31+
&& @publisher.promo_registrations.present? \
32+
&& @publisher.promo_registrations.has_stats.select { |promo_registration| promo_registration.stats_by_date.present? }.present? \
33+
&& !@publisher.promo_lockout_time_passed?
34+
= render "publishers/referral_charts", current_publisher: @publisher
2935

30-
/ Don't show if none of the promo registrations has a valid stat
31-
- if !@publisher.only_user_funds? \
32-
&& @publisher.promo_registrations.present? \
33-
&& @publisher.promo_registrations.has_stats.select { |promo_registration| promo_registration.stats_by_date.present? }.present? \
34-
&& !@publisher.promo_lockout_time_passed?
35-
= render "publishers/referral_charts", current_publisher: @publisher
36+
- @channels.each do |channel|
37+
= render partial: 'channel', locals: { channel: channel }
38+
= will_paginate(@channels)
3639

37-
- @channels.each do |channel|
38-
= render partial: 'channel', locals: { channel: channel }
39-
= will_paginate(@channels)
40+
.row id="add_channel_placeholder"
41+
.col.mb-4
42+
= link_to(\
43+
"+ #{t "shared.add_channel"}", \
44+
choose_new_channel_type_publishers_path, \
45+
data: {"js-confirm-with-modal": "choose-channel-type"}, \
46+
class: 'channel-placeholder' \
47+
)
4048

41-
.row id="add_channel_placeholder"
42-
.col.mb-4
43-
= link_to(\
44-
"+ #{t "shared.add_channel"}", \
45-
choose_new_channel_type_publishers_path, \
46-
data: {"js-confirm-with-modal": "choose-channel-type"}, \
47-
class: 'channel-placeholder' \
48-
)
49-
50-
.row.tos-row
51-
.col.mb-4
52-
- if @publisher.may_create_referrals?
53-
.promo--tos
54-
= t("promo.shared.tos_2_html")
55-
- else
56-
.terms-of-service
57-
= link_to(t("shared.terms_of_service"), terms_of_service_url)
49+
.row.tos-row
50+
.col.mb-4
51+
- if @publisher.may_create_referrals?
52+
.promo--tos
53+
= t("promo.shared.tos_2_html")
54+
- else
55+
.terms-of-service
56+
= link_to(t("shared.terms_of_service"), terms_of_service_url)
5857

5958
- if @publisher.promo_status(promo_running?) == :active
6059
javascript:

0 commit comments

Comments
 (0)