Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2019 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -32,9 +32,18 @@ module RepositoriesHelper
|
|||
end
|
||||
end
|
||||
|
||||
def render_pagination
|
||||
pagination_links_each @paginator do |text, parameters, options|
|
||||
if entry = @entries[parameters[:page] - 1]
|
||||
ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path)
|
||||
link_to text, {action: 'entry', id: @project, repository_id: @repository.identifier_param, path: to_path_param(ent_path), rev: @rev}
|
||||
end
|
||||
end if @paginator
|
||||
end
|
||||
|
||||
def render_properties(properties)
|
||||
unless properties.nil? || properties.empty?
|
||||
content = ''
|
||||
content = +''
|
||||
properties.keys.sort.each do |property|
|
||||
content << content_tag('li', "<b>#{h property}</b>: <span>#{h properties[property]}</span>".html_safe)
|
||||
end
|
||||
|
@ -49,7 +58,7 @@ module RepositoriesHelper
|
|||
# Detects moved/copied files
|
||||
if !change.from_path.blank?
|
||||
change.action =
|
||||
@changeset.filechanges.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
|
||||
@changeset.filechanges.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
|
||||
end
|
||||
change
|
||||
when 'D'
|
||||
|
@ -78,10 +87,10 @@ module RepositoriesHelper
|
|||
|
||||
def render_changes_tree(tree)
|
||||
return '' if tree.nil?
|
||||
output = ''
|
||||
output = +''
|
||||
output << '<ul>'
|
||||
tree.keys.sort.each do |file|
|
||||
style = 'change'
|
||||
style = +'change'
|
||||
text = File.basename(h(file))
|
||||
if s = tree[file][:s]
|
||||
style << ' folder'
|
||||
|
@ -130,7 +139,7 @@ module RepositoriesHelper
|
|||
def scm_select_tag(repository)
|
||||
scm_options = [["--- #{l(:actionview_instancetag_blank_option)} ---", '']]
|
||||
Redmine::Scm::Base.all.each do |scm|
|
||||
if Setting.enabled_scm.include?(scm) ||
|
||||
if Setting.enabled_scm.include?(scm) ||
|
||||
(repository && repository.class.name.demodulize == scm)
|
||||
scm_options << ["Repository::#{scm}".constantize.scm_name, scm]
|
||||
end
|
||||
|
@ -157,15 +166,6 @@ module RepositoriesHelper
|
|||
:onchange => "this.name='repository[password]';"))
|
||||
end
|
||||
|
||||
def darcs_field_tags(form, repository)
|
||||
content_tag('p', form.text_field(
|
||||
:url, :label => l(:field_path_to_repository),
|
||||
:size => 60, :required => true,
|
||||
:disabled => !repository.safe_attribute?('url')) +
|
||||
scm_path_info_tag(repository)) +
|
||||
scm_log_encoding_tag(form, repository)
|
||||
end
|
||||
|
||||
def mercurial_field_tags(form, repository)
|
||||
content_tag('p', form.text_field(
|
||||
:url, :label => l(:field_path_to_repository),
|
||||
|
@ -278,8 +278,8 @@ module RepositoriesHelper
|
|||
:href => block_given? ? yield(commit.scmid) : commit.scmid
|
||||
}
|
||||
end
|
||||
heads.sort! { |head1, head2| head1.to_s <=> head2.to_s }
|
||||
space = nil
|
||||
heads.sort_by!(&:to_s)
|
||||
space = nil
|
||||
heads.each do |head|
|
||||
if commits_by_scmid.include? head.scmid
|
||||
space = index_head((space || -1) + 1, head, commits_by_scmid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue