diff --git a/app/controllers/iphone/tickets_controller.rb b/app/controllers/iphone/tickets_controller.rb index c033593..92ffef8 100644 --- a/app/controllers/iphone/tickets_controller.rb +++ b/app/controllers/iphone/tickets_controller.rb @@ -9,19 +9,13 @@ def show def index if params[:client_id] - tickets = Ticket.find(:all, :conditions => {:client_id => params[:client_id]}) - new_array = [] - tickets.each do |ticket| - if ticket.archived_on == nil - new_array << ticket - end - end - @tickets = new_array.sort_by{|ticket| [ticket.status, ticket.id]} + @tickets = Ticket.find(:all, :conditions => {:client_id => params[:client_id]}) + @tickets = @tickets.sort_by{|ticket| [ticket.status, ticket.id]} elsif params[:device_id] @tickets = Device.find(params[:device_id]).tickets else if params[:status] - @tickets = Ticket.limit(params[:status], params[:scope], current_user, params[:device]) + @tickets = Ticket.limit(params[:status], current_user, params[:scope]) @tickets = @tickets.sort_by{|ticket| [ticket.status, ticket.id]} else @tickets = [] diff --git a/app/controllers/tickets_controller.rb b/app/controllers/tickets_controller.rb index 77ea356..1fcf931 100644 --- a/app/controllers/tickets_controller.rb +++ b/app/controllers/tickets_controller.rb @@ -4,7 +4,6 @@ class TicketsController < ApplicationController def index @tickets = Ticket.limit(params[:status], current_user, params[:scope]) - @tickets = @tickets.sort_by{|ticket| [ticket.status, ticket.id]} respond_to do |format| diff --git a/app/helpers/tickets_helper.rb b/app/helpers/tickets_helper.rb index e7fbcec..5f5fcaa 100644 --- a/app/helpers/tickets_helper.rb +++ b/app/helpers/tickets_helper.rb @@ -1,7 +1,7 @@ module TicketsHelper def totals_helper(status) if @totals[status].to_i > 0 - return "#{@totals[status]}" + return "#{@totals[status]}" end end diff --git a/app/views/iphone/clients/home.html.erb b/app/views/iphone/clients/home.html.erb index edbb89d..109511c 100644 --- a/app/views/iphone/clients/home.html.erb +++ b/app/views/iphone/clients/home.html.erb @@ -1,10 +1,43 @@ -
-

- Back - Home +
+
+

Suite

+
+
- \ No newline at end of file + +<% form_tag "/iphone/clients", :method => "get", :class => "panel", :title => "Client Search", :id => "client_search" do %> +
+

Client Search

+ Home +
+
+
+
+ + <%= text_field_tag :q %> +
+
+ +
+<% end %> + +<% form_tag "/iphone/devices", :method => "get", :class => "panel", :title => "Device Search", :id => "device_search" do %> +
+

Device Search

+ Home +
+
+
+
+ + <%= text_field_tag :q %> +
+
+
+ +<% end %> \ No newline at end of file diff --git a/app/views/iphone/clients/index.html.erb b/app/views/iphone/clients/index.html.erb index 9e9ca21..21a2930 100644 --- a/app/views/iphone/clients/index.html.erb +++ b/app/views/iphone/clients/index.html.erb @@ -1,17 +1,12 @@ -<% if @clients.length == 0 %> - <% form_tag "/iphone/clients", :method => "get", :class => "panel", :title => "Search", :selected => "true" do %> -
-
- - <%= text_field_tag :q %> -
-
- - <% end %> -<% else %> -