diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-09 21:06:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-09 21:06:09 +0000 |
commit | 576a13e99d50a30cfcc9b78d4a0b3793990c0f40 (patch) | |
tree | 1e9b16083659bb33c255c05e2efdd9e31dd360ee /app/views/search | |
parent | 742895183aebd0e88194ca07c11d94e43e7d24c2 (diff) | |
download | redmine-576a13e99d50a30cfcc9b78d4a0b3793990c0f40.tar.gz redmine-576a13e99d50a30cfcc9b78d4a0b3793990c0f40.zip |
Option to search attachment filenames and description (#4383).
git-svn-id: http://svn.redmine.org/redmine/trunk@13856 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/index.html.erb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb index 6bbe8d482..aaf08d369 100644 --- a/app/views/search/index.html.erb +++ b/app/views/search/index.html.erb @@ -17,9 +17,21 @@ <% end %> </p> +<fieldset class="collapsible collapsed"> + <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend> + <div id="options-content" style="display:none;"> + <p> + <label><%= radio_button_tag 'attachments', '0', @search_attachments == '0' %> <%= l(:label_search_attachments_no) %></label> + <label><%= radio_button_tag 'attachments', '1', @search_attachments == '1' %> <%= l(:label_search_attachments_yes) %></label> + <label><%= radio_button_tag 'attachments', 'only', @search_attachments == 'only' %> <%= l(:label_search_attachments_only) %></label> + </p> + </div> +</fieldset> +<%= hidden_field_tag 'options', '', :id => 'show-options' %> + +</div> <p><%= submit_tag l(:button_submit) %></p> <% end %> -</div> <% if @results %> <div id="search-results-counts"> @@ -53,4 +65,12 @@ $("#search-types a").click(function(e){ $("#search-form").submit(); } }); + +$("#search-form").submit(function(){ + $("#show-options").val($("#options-content").is(":visible") ? '1' : '0'); +}); + +<% if params[:options] == '1' %> +toggleFieldset($("#options-content")); +<% end %> <% end %> |