This commit is contained in:
Albert Yi
2018-11-02 13:40:01 -07:00
parent 542641e3e2
commit e360058aca
3 changed files with 10 additions and 6 deletions

View File

@@ -7,6 +7,10 @@ module ApplicationHelper
raw(wordbreaked_string)
end
def pro_fontawesome_enabled?
request.domain =~ /donmai\.us/
end
def nav_link_to(text, url, **options)
klass = options.delete(:class)

View File

@@ -1,7 +1,7 @@
<div id="pool-nav">
<ul>
<% pools.each do |pool| -%>
<%= render "posts/partials/show/pool_list_item", pool: pool, post: post, selected: is_pool_selected?(pool) -%>
<% end -%>
<% pools.each do |pool| %>
<%= render "posts/partials/show/pool_list_item", pool: pool, post: post, selected: is_pool_selected?(pool) %>
<% end %>
</ul>
</div>

View File

@@ -17,9 +17,9 @@
<%= link_to("Pool: #{pool.pretty_name}", pool_path(pool), title: "page #{pool.page_number(post.id)}/#{pool.post_count}") -%>
</span>
<% if pool.neighbors(post, :next).tap do |previous_post_id| -%>
<% if previous_post_id %>
<%= link_to("next&thinsp;&rsaquo;".html_safe, post_path(next_post_in_pool, pool_id: pool.id), rel: selected ? "next" : nil, class: "next", title: "to page #{pool.page_number(previous_post_id)}") -%>
<% pool.neighbors(post, :next).tap do |next_post_id| -%>
<% if next_post_id %>
<%= link_to("next&thinsp;&rsaquo;".html_safe, post_path(next_post_id, pool_id: pool.id), rel: selected ? "next" : nil, class: "next", title: "to page #{pool.page_number(next_post_id)}") -%>
<% else -%>
<span class="next">next&thinsp;&rsaquo;</span>
<% end -%>