Sha256: 9ef12e80c30e75aad115d56860b6f7118b216e0500e57fc1e50b7c92e98b8e16

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 Bytes

Contents

module Espresso
  module Helpers
    inlude WillPaginate::ViewHelpers

    def simple_search
      form_tag(url_for(:action => :index), :method => :get, :class => 'b_search b_search-simple') do
        inform = returning '' do |result|
          result << text_field_tag(:q, params[:q])
          result << submit_tag(t('krasivotokak.espresso.find', :default => 'Find!'), :class => 'submit')
        end
        concat inform
      end
    end

    def will_paginate_with_i18n(collection, options = {})
      will_paginate_without_i18n(collection,
                                 options.merge({
        :class => 'b_pagination',
        :previous_label => t('krasivotokak.espresso.previous', :default => '← Previous'),
        :next_label =>     t('krasivotokak.espresso.next', :default => 'Next →')}))
    end
    alias_method_chain :will_paginate, :i18n
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
espresso-0.0.10 lib/espresso/helpers.rb