Browse Source

code for title format

pull/643/head
JG 3 years ago
parent
commit
aa0453e7db
  1. 8
      app/helpers/item_label_helper.rb

8
app/helpers/item_label_helper.rb

@ -2,4 +2,12 @@ module ItemLabelHelper
def format_label(count, item)
count > 1 ? item.pluralize : item
end
def format_title(path, searched, page_title, current_user, item_label, count)
if searched.present?
title = "#{page_title} (#{count} #{item_label} matching ‘#{searched}’)"
else
title = page_title
end
end
end

Loading…
Cancel
Save