tickets/app/views/admin/tickets_manage/_search_form.html.erb

34 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-09-02 10:16:01 +00:00
<div class="search-wrap ticket-search-wrap ticket-container">
2015-08-25 10:49:47 +00:00
<h3 class="ticket-search-heading">
<i class="ticket-search-icon fa fa-search"></i>
Search tickets
</h3>
<span class="search-box">
2021-07-15 11:51:44 +00:00
<form action="<%= !(defined? form_action).nil? ? form_action : "/admin/tickets_manage/search" %>" method="get" id="search-form">
<select id="smart-field-select" class="ticket-search-option">
2015-08-25 10:49:47 +00:00
<option value="">General</option>
2015-08-18 18:28:47 +00:00
<% @smart_search_fields.each do |ssf| %>
2015-08-25 10:49:47 +00:00
<option value="<%= ssf %>"><%= ssf.capitalize %></option>
2015-08-18 18:28:47 +00:00
<% end %>
</select>
2015-08-25 10:49:47 +00:00
<input class="ticket-search-field" type="text" placeholder="keyword" name="keywords">
<% if params[:type] == "history" %>
<input type="hidden" name="type" value="history" />
<% end %>
<% if params[:takenby].present? %>
<input type="hidden" name="takenby" value="<%= params[:takenby] %>" />
<% end %>
<% if params[:tagged].present? %>
<input type="hidden" name="takenby" value="<%= params[:tagged] %>" />
<% end %>
2015-08-18 18:28:47 +00:00
</form>
</span>
2015-08-25 10:49:47 +00:00
<% if params[:keywords].present? %>
<div class="ticket-search-result">
<a href="<%= !(defined? form_action).nil? ? form_action : "/admin/tickets" %>"><i class="icons-cycle"></i></a>
2015-08-25 10:49:47 +00:00
Search result for <b><i>"<%= params[:keywords] %>"</i></b>
</div>
<% end %>
2015-09-02 10:16:01 +00:00
</div>