diff --git a/app/controllers/apps_controller.rb b/app/controllers/apps_controller.rb index f3a31cb..7f0360c 100644 --- a/app/controllers/apps_controller.rb +++ b/app/controllers/apps_controller.rb @@ -10,7 +10,13 @@ class AppsController < ApplicationController def show respond_to do |format| format.html do - @errs = @app.errs.ordered.paginate(:page => params[:page], :per_page => current_user.per_page) + if(params[:all_errs]) + @errs = @app.errs.ordered.paginate(:page => params[:page], :per_page => current_user.per_page) + @all_errs = true + else + @errs = @app.errs.unresolved.ordered.paginate(:page => params[:page], :per_page => current_user.per_page) + @all_errs = false + end @deploys = @app.deploys.order_by(:created_at.desc).limit(5) end format.atom do diff --git a/app/views/apps/show.html.haml b/app/views/apps/show.html.haml index 2a46297..29adda0 100644 --- a/app/views/apps/show.html.haml +++ b/app/views/apps/show.html.haml @@ -12,6 +12,10 @@ - if current_user.admin? = link_to 'edit', edit_app_path(@app), :class => 'button' = link_to 'destroy', app_path(@app), :method => :delete, :confirm => 'Seriously?', :class => 'button' + - if @all_errs == true + = link_to 'unresolved errs', app_path(@app), :class => 'button' + - else + = link_to 'all errs', app_path(@app, {all_errs: true}), :class => 'button' %h3 Watchers %table.watchers -- libgit2 0.21.2