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

34 lines
1.4 KiB
Plaintext

<div class="search-wrap ticket-search-wrap ticket-container">
<h3 class="ticket-search-heading">
<i class="ticket-search-icon fa fa-search"></i>
Search tickets
</h3>
<span class="search-box">
<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">
<option value="">General</option>
<% @smart_search_fields.each do |ssf| %>
<option value="<%= ssf %>"><%= ssf.capitalize %></option>
<% end %>
</select>
<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 %>
</form>
</span>
<% 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>
Search result for <b><i>"<%= params[:keywords] %>"</i></b>
</div>
<% end %>
</div>