Commit 8aa9fde8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Different search placeholder depdends on area

parent 03a9beee9bfd
......@@ -226,4 +226,13 @@
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
......
Supports Markdown
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