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) raw(wordbreaked_string)
end end
def pro_fontawesome_enabled?
request.domain =~ /donmai\.us/
end
def nav_link_to(text, url, **options) def nav_link_to(text, url, **options)
klass = options.delete(:class) klass = options.delete(:class)

View File

@@ -1,7 +1,7 @@
<div id="pool-nav"> <div id="pool-nav">
<ul> <ul>
<% pools.each do |pool| -%> <% pools.each do |pool| %>
<%= render "posts/partials/show/pool_list_item", pool: pool, post: post, selected: is_pool_selected?(pool) -%> <%= render "posts/partials/show/pool_list_item", pool: pool, post: post, selected: is_pool_selected?(pool) %>
<% end -%> <% end %>
</ul> </ul>
</div> </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}") -%> <%= link_to("Pool: #{pool.pretty_name}", pool_path(pool), title: "page #{pool.page_number(post.id)}/#{pool.post_count}") -%>
</span> </span>
<% if pool.neighbors(post, :next).tap do |previous_post_id| -%> <% pool.neighbors(post, :next).tap do |next_post_id| -%>
<% if previous_post_id %> <% if next_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)}") -%> <%= 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 -%> <% else -%>
<span class="next">next&thinsp;&rsaquo;</span> <span class="next">next&thinsp;&rsaquo;</span>
<% end -%> <% end -%>