[#369] fix error in the old code

This commit is contained in:
Alexander Machehin 2014-05-06 19:15:32 +06:00
parent 508085306c
commit e10965a95f
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ class Projects::IssuesController < Projects::BaseController
# Using mb_chars for correct transform to lowercase ('Русский Текст'.downcase => "Русский Текст") # Using mb_chars for correct transform to lowercase ('Русский Текст'.downcase => "Русский Текст")
@issues = @issues.search(params[:search_issue]) if params[:search_issue] !~ /#{t('layout.issues.search')}/ @issues = @issues.search(params[:search_issue]) if params[:search_issue] !~ /#{t('layout.issues.search')}/
@opened_issues, @closed_issues = @issues.not_closed_or_merged.count, @issues.closed_or_merged.count @opened_issues, @closed_issues = @issues.not_closed_or_merged, @issues.closed_or_merged
@status = params[:status] == 'closed' ? :closed : :open @status = params[:status] == 'closed' ? :closed : :open
@issues = @issues.send( (@status == :closed) ? :closed_or_merged : :not_closed_or_merged ) @issues = @issues.send( (@status == :closed) ? :closed_or_merged : :not_closed_or_merged )

View File

@ -2,9 +2,9 @@
.project-tabnav .project-tabnav
%ul.tabnav-tabs %ul.tabnav-tabs
%li.list-browser-filter-tabs.open{class: ('selected' if @status == :open)} %li.list-browser-filter-tabs.open{class: ('selected' if @status == :open)}
%a= "#{t('layout.issues.statuses.open')} (#{@opened_issues})" %a= "#{t('layout.issues.statuses.open')} (#{@opened_issues.count})"
%li.list-browser-filter-tabs.closed{class: ('selected' if @status != :open)} %li.list-browser-filter-tabs.closed{class: ('selected' if @status != :open)}
%a= "#{t('layout.issues.statuses.closed')} (#{@closed_issues})" %a= "#{t('layout.issues.statuses.closed')} (#{@closed_issues.count})"
%li.list-browser-sorts.updated{class: ("selected #{@direction}" if @sort == :updated)} %li.list-browser-sorts.updated{class: ("selected #{@direction}" if @sort == :updated)}
- if @sort == :updated - if @sort == :updated
%i{class: (@direction == :asc ? 'icon-chevron-up' : 'icon-chevron-down')} %i{class: (@direction == :asc ? 'icon-chevron-up' : 'icon-chevron-down')}