diff --git a/app/assets/stylesheets/layout/_header.scss b/app/assets/stylesheets/layout/_header.scss index 125517a..fb93759 100644 --- a/app/assets/stylesheets/layout/_header.scss +++ b/app/assets/stylesheets/layout/_header.scss @@ -12,7 +12,6 @@ header .banner { position: relative; img { - width: em(430); height: em(200); position: absolute; top: em(20); diff --git a/app/assets/stylesheets/pages/_teams.scss b/app/assets/stylesheets/pages/_teams.scss index f18487f..3bc9e7d 100644 --- a/app/assets/stylesheets/pages/_teams.scss +++ b/app/assets/stylesheets/pages/_teams.scss @@ -3,6 +3,8 @@ */ #teams { + @include span-columns(12); + table { table-layout: auto; } diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e90c52f..eac98ce 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,6 @@ class ApplicationController < ActionController::Base + include Exceptions + helper :all helper_method :cuser, :strip, :return_here @@ -8,10 +10,6 @@ class ApplicationController < ActionController::Base protect_from_forgery respond_to :html, :js - include Exceptions - - # Global methods - def cuser @cuser ||= User.find(session[:user]) if session[:user] end @@ -37,20 +35,19 @@ class ApplicationController < ActionController::Base end def redirect_to_home - redirect_to :controller => "articles", :action => "news_index" + redirect_to controller: "articles", action: "news_index" end - def rescue_action(exception) - case exception - when AccessError - render :text => t(:access_denied), :layout => true - when Error - render :text => exception.message, :layout => true - when ActiveRecord::StaleObjectError - render :text => t(:application_stale) - else - super exception - end + rescue_from AccessError do |exception| + render 'errors/403', status: 403, layout: 'errors' + end + + rescue_from Error do |exception| + render text: exception.message, layout: true + end + + rescue_from ActiveRecord::StaleObjectError do |exception| + render text: t(:application_stale) end private diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index 4151ab5..34c35cb 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -2,7 +2,7 @@ class TeamsController < ApplicationController before_filter :get_team, only: [:show, :edit, :update, :destroy, :recover] def index - @teams = Team.search(params[:search]).paginate(per_page: 40, page: params[:page]).with_teamers_num(0).ordered + @teams = Team.with_teamers_num(0).search(params[:search]).paginate(per_page: 80, page: params[:page]).ordered end def show diff --git a/app/views/contests/current.html.erb b/app/views/contests/current.html.erb index 4a95e76..80bb409 100644 --- a/app/views/contests/current.html.erb +++ b/app/views/contests/current.html.erb @@ -1,4 +1,4 @@ -
diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index 58c65d4..6f04ccb 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,4 +1,4 @@ -set :branch, 'develop' +set :branch, 'feature-redesign' set :deploy_to, '/var/www/virtual/ensl.org/staging/rails' set :rails_env, 'staging' |
---|