##// END OF EJS Templates
[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132)....
[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132). This commit updates the CSS styles to match with CodeRay 1.1.0, while it preserves the custom changes applied in r10132. The CSS styles were still based on CodeRay 1.0.6 (included since Redmine 1.4.0) with the custom changes from r10132 (included since Redmine 2.1.0). Redmine 2.3.2 till 2.3.4 came with CodeRay 1.0.9, an upgrade that didn't needed changes in the CSS styles. Starting with 2.4.0 Redmine comes with CodeRay 1.1.0, a minor upgrade that came with new/changed token_kinds and lots of changes in the alpha stylesheet, that in turn is used as a base for Redmine's own CodeRay CSS styles. As such, this upgrade needed CSS stylesheet changes like done before in r7618 and r7623 (for 1.0.0 upgrade) and r9389 (for 1.0.6 upgrade). But these changes, plus an update of the Redmine core documentation that is shipped along the core (wiki_syntax_detailed_[markdown|textile].html), aren't integrated up untill today. Contributed by Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@14488 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r13881:92833d0b10e7
r14106:6fbb56e55735
Show More
versions_helper.rb
76 lines | 2.6 KiB | text/x-ruby | RubyLexer
/ app / helpers / versions_helper.rb
Jean-Philippe Lang
Added encoding comment to helpers (#9792)....
r8090 # encoding: utf-8
#
Jean-Philippe Lang
Adds an option to view issues count by status on the version page (#7921)....
r5059 # Redmine - project management software
Jean-Philippe Lang
Copyright update....
r13490 # Copyright (C) 2006-2015 Jean-Philippe Lang
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
Toshi MARUYAMA
remove trailing white-spaces from app/helpers/versions_helper.rb....
r6801 #
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
Toshi MARUYAMA
remove trailing white-spaces from app/helpers/versions_helper.rb....
r6801 #
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Jean-Philippe Lang
Initial commit...
r2 module VersionsHelper
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942
Jean-Philippe Lang
Fixed that roadmap anchor links can be ambigous (#11540)....
r10017 def version_anchor(version)
if @project == version.project
anchor version.name
else
anchor "#{version.project.try(:identifier)}-#{version.name}"
end
end
Jean-Philippe Lang
Fixed: Issues counters in roadmap only link to issues in the same project (#9660)....
r13035 def version_filtered_issues_path(version, options = {})
options = {:fixed_version_id => version, :set_filter => 1}.merge(options)
project = case version.sharing
when 'hierarchy', 'tree'
if version.project && version.project.root.visible?
version.project.root
else
version.project
end
when 'system'
nil
else
version.project
end
if project
project_issues_path(project, options)
else
issues_path(options)
end
end
Jean-Philippe Lang
Ability to disable standard fields on a per tracker basis (#1091)....
r9729 STATUS_BY_CRITERIAS = %w(tracker status priority author assigned_to category)
Toshi MARUYAMA
remove trailing white-spaces from app/helpers/versions_helper.rb....
r6801
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 def render_issue_status_by(version, criteria)
Jean-Philippe Lang
Ability to disable standard fields on a per tracker basis (#1091)....
r9729 criteria = 'tracker' unless STATUS_BY_CRITERIAS.include?(criteria)
Toshi MARUYAMA
remove trailing white-spaces from app/helpers/versions_helper.rb....
r6801
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 h = Hash.new {|k,v| k[v] = [0, 0]}
begin
# Total issue count
Jean-Philippe Lang
Use #fixed_issues association (#19455)....
r13881 version.fixed_issues.group(criteria).count.each {|c,s| h[c][0] = s}
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 # Open issues count
Jean-Philippe Lang
Use #fixed_issues association (#19455)....
r13881 version.fixed_issues.open.group(criteria).count.each {|c,s| h[c][1] = s}
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 rescue ActiveRecord::RecordNotFound
# When grouping by an association, Rails throws this exception if there's no result (bug)
end
Jean-Philippe Lang
Issues by Category should show tasks without category (#8106)....
r10549 # Sort with nil keys in last position
counts = h.keys.sort {|a,b| a.nil? ? 1 : (b.nil? ? -1 : a <=> b)}.collect {|k| {:group => k, :total => h[k][0], :open => h[k][1], :closed => (h[k][0] - h[k][1])}}
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 max = counts.collect {|c| c[:total]}.max
Toshi MARUYAMA
remove trailing white-spaces from app/helpers/versions_helper.rb....
r6801
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 render :partial => 'issue_counts', :locals => {:version => version, :criteria => criteria, :counts => counts, :max => max}
end
Toshi MARUYAMA
remove trailing white-spaces from app/helpers/versions_helper.rb....
r6801
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 def status_by_options_for_select(value)
options_for_select(STATUS_BY_CRITERIAS.collect {|criteria| [l("field_#{criteria}".to_sym), criteria]}, value)
end
Jean-Philippe Lang
Initial commit...
r2 end