Skip to content
Snippets Groups Projects
Commit fb36355f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Different search placeholder depdends on area

parent 01be3204
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment