app/views/georgia/pages/_header.html.erb in georgia-0.7.8 vs app/views/georgia/pages/_header.html.erb in georgia-0.8.0
- old
+ new
@@ -1,22 +1,22 @@
<header class='header-main'>
<div class="header-title">
- <%= form_for :search, url: georgia.search_pages_url, method: :get, html: {role: 'search'} do |f| %>
+ <%= form_for :search, url: georgia.search_pages_path, method: :get, html: {role: 'search'} do |f| %>
<%= facets_inputs([:tg]) %>
<%= hidden_field_tag :s, params[:s] if params[:s] %>
<%= hidden_field_tag :t, params[:t] if params[:t] %>
<div class="input-group">
<div class="input-group-btn">
<button class="btn btn-default"><%= icon_tag('search') %></button>
</div>
- <%= text_field_tag :query, params[:query], class: 'form-control input-search', placeholder: 'Search' %>
+ <%= text_field_tag :query, params[:query], class: 'form-control input-search', placeholder: 'Search', autofocus: true %>
</div>
<% end -%>
</div>
<div class="header-actions">
- <%= link_to "#{icon_tag('plus')} Add new".html_safe, '#', class: 'btn btn-primary', data: {toggle: 'modal', target: '#page_form'} if can?(:create, model) %>
+ <%= link_to "#{icon_tag('plus')} Add new".html_safe, '#', class: 'btn btn-primary', data: {toggle: 'modal', target: '#page_form'} if policy(Georgia::Page).create? %>
</div>
</header>
<%= content_for :footer do %>
- <%= render 'georgia/shared/modals/page' if can?(:create, model) %>
+ <%= render 'georgia/shared/modals/page' if policy(Georgia::Page).create? %>
<% end -%>
\ No newline at end of file