Feature #5386 » show_branch_tags_in_changeset.diff
| app/helpers/repositories_helper.rb (Arbeitskopie) | ||
|---|---|---|
|
end
|
||
|
max_space
|
||
|
end
|
||
|
def has_branch_detail?
|
||
|
@repository.scm.respond_to? :branch_contains
|
||
|
end
|
||
|
def insert_branches_detail(html)
|
||
|
return html unless has_branch_detail?
|
||
|
substring = '</li>'
|
||
|
location = html.index(substring).to_i + substring.length
|
||
|
html.insert(location, branches_html)
|
||
|
end
|
||
|
def branches_html
|
||
|
content_tag(:li) do
|
||
|
content = content_tag(:strong, "#{l(:label_branch)}")
|
||
|
content << " "
|
||
|
content << "#{@repository.identifier}@ "
|
||
|
content << links_to_branches.join(', ').html_safe
|
||
|
end
|
||
|
end
|
||
|
def links_to_branches
|
||
|
return [] unless has_branch_detail?
|
||
|
branch_groups.map { |name, branches| branches_link(name, branches) }
|
||
|
end
|
||
|
def branches_link(name, branches)
|
||
|
return branch_link(branches.first) if branches.length == 1
|
||
|
link = link_to("[#{name}...]", 'javascript:;', class: 'scm-branch-group').html_safe
|
||
|
content_tag(:span, class: 'scm-branch-hide') do
|
||
|
link << content_tag(:span, class: 'scm-branches') do
|
||
|
branches.map { |branch| branch_link(branch) }.join(', ').html_safe
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
def branch_link(branch)
|
||
|
link_to(branch, {:controller => 'repositories',
|
||
|
:action => 'show',
|
||
|
:id => @repository.project,
|
||
|
:repository_id => @repository.identifier,
|
||
|
:path => to_path_param(@path),
|
||
|
:rev => branch}).html_safe
|
||
|
end
|
||
|
def branch_groups
|
||
|
@repository.scm.branch_contains(@rev).group_by do |branch|
|
||
|
branch.downcase
|
||
|
.gsub(/^\d+/, '#####')
|
||
|
.split(/[\-\._]/)
|
||
|
.first
|
||
|
end.sort_by { |name, branches| [branches.length, name] }
|
||
|
end
|
||
|
end
|
||
| app/views/issues/tabs/_changesets.html.erb (Arbeitskopie) | ||
|---|---|---|
|
:repository_id => changeset.repository.identifier_param,
|
||
|
:path => "",
|
||
|
:rev => changeset.identifier) %>)
|
||
|
<% if !Setting.display_under_associated_revisions? && changeset.scmid.present?
|
||
|
@repository = changeset.repository
|
||
|
@rev = changeset.identifier
|
||
|
%>
|
||
|
(<em><%= l(:label_branches) %>: <%= links_to_branches.join(', ').html_safe %></em>)
|
||
|
<% end %>
|
||
|
<% end %></p>
|
||
|
<div class="wiki changeset-comments">
|
||
| app/views/repositories/_changeset.html.erb (Arbeitskopie) | ||
|---|---|---|
|
}.join(", ").html_safe %>
|
||
|
</li>
|
||
|
<% end %>
|
||
|
<% if !Setting.display_under_single_revision? %>
|
||
|
<li>
|
||
|
<strong><%= l(:label_branches) %></strong>
|
||
|
<%= links_to_branches.join(', ').html_safe %>
|
||
|
</li>
|
||
|
<% end %>
|
||
|
<% if @changeset.children.present? %>
|
||
|
<li>
|
||
|
<strong><%= l(:label_child_revision) %></strong>
|
||
| app/views/settings/_issues.html.erb (Arbeitskopie) | ||
|---|---|---|
|
<p><%= setting_text_field :gantt_items_limit, :size => 6 %></p>
|
||
|
<p><%= setting_text_field :gantt_months_limit, :size => 6 %></p>
|
||
|
</div>
|
||
|
<fieldset class="box">
|
||
|
<legend><%= l(:label_display_revision_branches) %></legend>
|
||
|
<div class="tabular settings">
|
||
|
<p><%= setting_check_box :display_under_single_revision %></p>
|
||
|
<p><%= setting_check_box :display_under_associated_revisions %></p>
|
||
|
</div>
|
||
|
</fieldset>
|
||
|
<fieldset class="box">
|
||
|
<legend><%= l(:label_parent_task_attributes) %></legend>
|
||
|
<div class="tabular settings">
|
||
| config/locales/de.yml (Arbeitskopie) | ||
|---|---|---|
|
label_board_sticky: Wichtig (immer oben)
|
||
|
label_boolean: Boolean
|
||
|
label_branch: Zweig
|
||
|
label_branches: Zweige
|
||
|
label_browse: Codebrowser
|
||
|
label_bulk_edit_selected_issues: Alle ausgewählten Tickets bearbeiten
|
||
|
label_bulk_edit_selected_time_entries: Ausgewählte Zeitaufwände bearbeiten
|
||
| ... | ... | |
|
setting_default_projects_tracker_ids: Standardmäßig aktivierte Tracker für neue Projekte
|
||
|
setting_diff_max_lines_displayed: Maximale Anzahl anzuzeigender Diff-Zeilen
|
||
|
setting_display_subprojects_issues: Tickets von Unterprojekten im Hauptprojekt anzeigen
|
||
|
setting_display_under_single_revision: Unterschiede bei Revision anzeigen
|
||
|
setting_display_under_associated_revisions: Bei zugehörigen Revisionen anzeigen
|
||
|
setting_emails_footer: E-Mail-Fußzeile
|
||
|
setting_emails_header: E-Mail-Kopfzeile
|
||
|
setting_enabled_scm: Aktivierte Versionskontrollsysteme
|
||
| ... | ... | |
|
label_ends_with: endet mit
|
||
|
label_issue_fixed_version_updated: Zielversion aktualisiert
|
||
|
setting_project_list_defaults: Voreinstellungen Projektliste
|
||
|
label_display_revision_branches: Zweige zur Revision anzeigen
|
||
|
label_display_type: Ergebnisse anzeigen als
|
||
|
label_display_type_list: Liste
|
||
|
label_display_type_board: Karte
|
||
| config/locales/en.yml (Arbeitskopie) | ||
|---|---|---|
|
setting_time_format: Time format
|
||
|
setting_timespan_format: Time span format
|
||
|
setting_cross_project_issue_relations: Allow cross-project issue relations
|
||
|
setting_display_under_single_revision: Display revision under Single Revision
|
||
|
setting_display_under_associated_revisions: Display revision under Associated Revisions
|
||
|
setting_cross_project_subtasks: Allow cross-project subtasks
|
||
|
setting_issue_list_default_columns: Isuses list defaults
|
||
|
setting_repositories_encodings: Attachments and repositories encodings
|
||
| ... | ... | |
|
label_repository_plural: Repositories
|
||
|
label_browse: Browse
|
||
|
label_branch: Branch
|
||
|
label_branches: Branches
|
||
|
label_tag: Tag
|
||
|
label_revision: Revision
|
||
|
label_revision_plural: Revisions
|
||
| ... | ... | |
|
label_registration_manual_activation: manual account activation
|
||
|
label_registration_automatic_activation: automatic account activation
|
||
|
label_display_per_page: "Per page: %{value}"
|
||
|
label_display_revision_branches: Show branches for revision
|
||
|
label_age: Age
|
||
|
label_change_properties: Change properties
|
||
|
label_general: General
|
||
| config/settings.yml (Arbeitskopie) | ||
|---|---|---|
|
# Redmine - project management software
|
||
|
# Copyright (C) 2006-2020 Jean-Philippe Lang
|
||
|
# Copyright (C) 2006-2017 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
|
||
| ... | ... | |
|
app_title:
|
||
|
default: Redmine
|
||
|
app_subtitle:
|
||
|
default: Project management
|
||
|
welcome_text:
|
||
|
default:
|
||
|
login_required:
|
||
| ... | ... | |
|
lost_password:
|
||
|
default: 1
|
||
|
security_notifications: 1
|
||
|
twofa:
|
||
|
default: 1
|
||
|
security_notifications: 1
|
||
|
unsubscribe:
|
||
|
default: 1
|
||
|
password_required_char_classes:
|
||
| ... | ... | |
|
max_additional_emails:
|
||
|
format: int
|
||
|
default: 5
|
||
|
email_domains_allowed:
|
||
|
default:
|
||
|
email_domains_denied:
|
||
|
default:
|
||
|
# Maximum lifetime of user sessions in minutes
|
||
|
session_lifetime:
|
||
|
format: int
|
||
| ... | ... | |
|
attachment_max_size:
|
||
|
format: int
|
||
|
default: 5120
|
||
|
bulk_download_max_size:
|
||
|
format: int
|
||
|
default: 102400
|
||
|
attachment_extensions_allowed:
|
||
|
default:
|
||
|
attachment_extensions_denied:
|
||
| ... | ... | |
|
gantt_items_limit:
|
||
|
format: int
|
||
|
default: 500
|
||
|
gantt_months_limit:
|
||
|
format: int
|
||
|
default: 24
|
||
|
# Maximum size of files that can be displayed
|
||
|
# inline through the file viewer (in KB)
|
||
|
file_max_size_displayed:
|
||
| ... | ... | |
|
serialized: true
|
||
|
default:
|
||
|
- Subversion
|
||
|
- Darcs
|
||
|
- Mercurial
|
||
|
- Cvs
|
||
|
- Bazaar
|
||
| ... | ... | |
|
default: 'derived'
|
||
|
link_copied_issue:
|
||
|
default: 'ask'
|
||
|
close_duplicate_issues:
|
||
|
default: 1
|
||
|
issue_group_assignment:
|
||
|
default: 0
|
||
|
default_issue_start_date_to_creation_date:
|
||
| ... | ... | |
|
default: ''
|
||
|
mail_handler_enable_regex_delimiters:
|
||
|
default: 0
|
||
|
mail_handler_enable_regex_excluded_filenames:
|
||
|
default: 0
|
||
|
mail_handler_excluded_filenames:
|
||
|
default: ''
|
||
|
mail_handler_api_enabled:
|
||
| ... | ... | |
|
mail_handler_api_key:
|
||
|
default:
|
||
|
security_notifications: 1
|
||
|
mail_handler_preferred_body_part:
|
||
|
default: plain
|
||
|
issue_list_default_columns:
|
||
|
serialized: true
|
||
|
default:
|
||
| ... | ... | |
|
default: []
|
||
|
display_subprojects_issues:
|
||
|
default: 1
|
||
|
time_entry_list_defaults:
|
||
|
serialized: true
|
||
|
default:
|
||
|
column_names:
|
||
|
- spent_on
|
||
|
- user
|
||
|
- activity
|
||
|
- issue
|
||
|
- comments
|
||
|
- hours
|
||
|
totalable_names:
|
||
|
- hours
|
||
|
project_list_display_type:
|
||
|
default: board
|
||
|
project_list_defaults:
|
||
|
serialized: true
|
||
|
default:
|
||
|
column_names:
|
||
|
- name
|
||
|
- identifier
|
||
|
- short_description
|
||
|
issue_done_ratio:
|
||
|
default: 'issue_field'
|
||
|
default_projects_public:
|
||
| ... | ... | |
|
default: 0
|
||
|
security_notifications: 1
|
||
|
gravatar_default:
|
||
|
default: 'identicon'
|
||
|
default: ''
|
||
|
start_of_week:
|
||
|
default: ''
|
||
|
rest_api_enabled:
|
||
| ... | ... | |
|
emails_header:
|
||
|
default: ''
|
||
|
thumbnails_enabled:
|
||
|
default: 1
|
||
|
default: 0
|
||
|
thumbnails_size:
|
||
|
format: int
|
||
|
default: 100
|
||
| ... | ... | |
|
timelog_required_fields:
|
||
|
serialized: true
|
||
|
default: []
|
||
|
timelog_accept_0_hours:
|
||
|
default: 1
|
||
|
timelog_max_hours_per_day:
|
||
|
format: int
|
||
|
default: 999
|
||
|
timelog_accept_future_dates:
|
||
|
default: 1
|
||
|
show_status_changes_in_mail_subject:
|
||
|
default: 1
|
||
| lib/redmine/scm/adapters/git_adapter.rb (Arbeitskopie) | ||
|---|---|---|
|
rescue ScmCommandAborted
|
||
|
nil
|
||
|
end
|
||
|
|
||
|
def branch_contains(hash)
|
||
|
cleaned_hash = hash.sub(/[^\w]/, '')
|
||
|
cmd_args = ['branch', '--contains', cleaned_hash]
|
||
|
begin
|
||
|
branches = git_cmd(cmd_args) do |io|
|
||
|
io.readlines.sort!.map{|t| t.strip.gsub(/\* ?/, '')}
|
||
|
end
|
||
|
rescue ScmCommandAborted
|
||
|
branches = Array.new
|
||
|
end
|
||
|
branches.uniq
|
||
|
end
|
||
|
def tags
|
||
|
return @tags if @tags
|
||
| public/javascripts/repository_navigation.js (Arbeitskopie) | ||
|---|---|---|
|
$('#branch,#tag').removeAttr('disabled');
|
||
|
}
|
||
|
});
|
||
|
$('a.scm-branch-group').on('click', function() {
|
||
|
$(this).parent().removeClass('scm-branch-hide');
|
||
|
});
|
||
|
})
|
||
| public/stylesheets/scm.css (Arbeitskopie) | ||
|---|---|---|
|
.breadcrumbs>.separator::before, .breadcrumbs>.separator::after {
|
||
|
content: " ";
|
||
|
}
|
||
|
.scm-branch-group, .scm-branch-hide > .scm-branches { display: none; }
|
||
|
.scm-branch-hide > .scm-branch-group { display: inline; }
|
||