52 lines
1.9 KiB
Plaintext
52 lines
1.9 KiB
Plaintext
<% content_for :page_specific_css do %>
|
|
<%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" %>
|
|
<%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" %>
|
|
<%= stylesheet_link_tag "tickets/ticket_index" %>
|
|
<% end %>
|
|
<div class="category_ticket_wrap">
|
|
<% if !@category.nil? %>
|
|
<div>
|
|
<h3>
|
|
<%= @category.title %><%= " - history" if params[:type] == "history" %>
|
|
<%= render :partial => "search_form", locals: {:form_action => "/admin/tickets_manage/category/#{@category.id.to_s}"} %>
|
|
</h3>
|
|
<% h = request.original_fullpath.split("?")[1] %>
|
|
<% if params[:type] == "history" %>
|
|
<% h = h.gsub("type=history","").chomp("&") %>
|
|
<span style="position:relative;margin-top:-30px;" class="pull-right"><a href="/admin/tickets_manage/category/<%= @category.id.to_s %><%= h != ""? "?#{h}" : "" %>">View current</a></span>
|
|
<% else %>
|
|
<% h = h.nil? ? "type=history" : "#{h}&type=history" %>
|
|
<span style="position:relative;margin-top:-30px;" class="pull-right"><a href="/admin/tickets_manage/category/<%= @category.id.to_s %>?<%= h %>">View history</a></span>
|
|
<% end %>
|
|
</div>
|
|
<% else %>
|
|
<div>
|
|
<h3>Category Not found!</h3>
|
|
</div>
|
|
<% end %>
|
|
<table class="table main-list">
|
|
<thead>
|
|
<tr class="sort-header">
|
|
<% @table_fields.each do |f| %>
|
|
<%= thead(f) %>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% if !@tickets.nil? && @tickets.count > 0 %>
|
|
<%= render :partial => "ticket_by_c", :collection => @tickets %>
|
|
<% else %>
|
|
<tr><td colspan="9" style="text-align:center;">No tickets.</td></tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% if !@tickets.nil? && @tickets.count > 0 %>
|
|
<%=
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
content_tag :div, paginate(@tickets), class: "pagination pagination-centered"
|
|
end
|
|
%>
|
|
<% end %>
|
|
</div>
|
|
<script type="text/javascript" src="/assets/search.js"></script>
|