Commit fb36355f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Different search placeholder depdends on area

parent 01be3204
......@@ -226,4 +226,13 @@ module ApplicationHelper
content_tag :i, nil, class: 'icon-lock cgreen'
end
def search_placeholder
if @project && @project.persisted?
"Search in this project"
elsif @group && @group.persisted?
"Search in this group"
else
"Search"
end
end
end
.search
= form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
= text_field_tag "search", nil, placeholder: "Search", class: "search-input"
= text_field_tag "search", nil, placeholder: search_placeholder, class: "search-input"
= hidden_field_tag :group_id, @group.try(:id)
- if @project && @project.persisted?
= hidden_field_tag :project_id, @project.id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment