Skip to content

Commit 387bb1f

Browse files
committed
added a partial for first visit notices
1 parent 62df2be commit 387bb1f

4 files changed

Lines changed: 17 additions & 27 deletions

File tree

app/views/layouts/application.html.erb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@
1515
<%= render 'shared/notices' %>
1616

1717
<% if @first_visit_notice %>
18-
<% notice = SiteSetting['FirstVisitGuidance'] %>
19-
<% if notice.present? %>
20-
<div class="notice js-first-visit-notice" id="fvn">
21-
<button type="button" class="button is-close-button" data-dismiss="#fvn" aria-label="Close" id="fvn-dismiss">
22-
<span aria-hidden="true">&times;</span>
23-
</button>
24-
<%= raw(sanitize(notice, scrubber: scrubber)) %>
25-
</div>
26-
<% end %>
18+
<%= render 'notices/first_visit' %>
2719
<% end %>
2820

2921
<%= yield %>

app/views/layouts/stripe.html.erb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,7 @@
1717
<%= render 'shared/notices' %>
1818

1919
<% if @first_visit_notice %>
20-
<% notice = SiteSetting['FirstVisitGuidance'] %>
21-
<% if notice.present? %>
22-
<div class="notice js-first-visit-notice" id="fvn">
23-
<button type="button" class="button is-close-button" data-dismiss="#fvn" aria-label="Close" id="fvn-dismiss">
24-
<span aria-hidden="true">&times;</span>
25-
</button>
26-
<%= raw(sanitize(notice, scrubber: scrubber)) %>
27-
</div>
28-
<% end %>
20+
<%= render 'notices/first_visit' %>
2921
<% end %>
3022

3123
<%= yield %>

app/views/layouts/without_sidebar.html.erb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@
1313
<%= render 'shared/notices' %>
1414

1515
<% if @first_visit_notice %>
16-
<% notice = SiteSetting['FirstVisitGuidance'] %>
17-
<% if notice.present? %>
18-
<div class="notice js-first-visit-notice" id="fvn">
19-
<button type="button" class="button is-close-button" data-dismiss="#fvn" aria-label="Close" id="fvn-dismiss">
20-
<span aria-hidden="true">&times;</span>
21-
</button>
22-
<%= raw(sanitize(notice, scrubber: scrubber)) %>
23-
</div>
24-
<% end %>
16+
<%= render 'notices/first_visit' %>
2517
<% end %>
2618

2719
<%= yield %>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<% notice = SiteSetting['FirstVisitGuidance'] %>
2+
3+
<% if notice.present? %>
4+
<div class="notice js-first-visit-notice" id="fvn">
5+
<button type="button"
6+
class="button is-close-button"
7+
data-dismiss="#fvn"
8+
aria-label="Close"
9+
id="fvn-dismiss">
10+
<span aria-hidden="true">&times;</span>
11+
</button>
12+
<%= raw(sanitize(notice, scrubber: scrubber)) %>
13+
</div>
14+
<% end %>

0 commit comments

Comments
 (0)