Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div class="details">
|
||||
<h4>
|
||||
<%= avatar(@changeset.user, :size => "24") %>
|
||||
<%= avatar(@changeset.user) %>
|
||||
<%= authoring(@changeset.committed_on, @changeset.author) %>
|
||||
</h4>
|
||||
<% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %>
|
||||
|
@ -33,8 +33,33 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="wiki changeset-comments"><%= format_changeset_comments @changeset %></div>
|
||||
<div class="wiki changeset-comments">
|
||||
<%= format_changeset_comments @changeset %>
|
||||
</div>
|
||||
|
||||
<% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %>
|
||||
<%= render :partial => 'related_issues' %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:browse_repository, @repository.project) %>
|
||||
<%
|
||||
tabs = []
|
||||
tabs << { name: 'revision', label: :label_change_plural,
|
||||
url: { :action => 'revision',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => nil,
|
||||
:rev => @changeset.identifier}
|
||||
}
|
||||
|
||||
tabs << { name: 'diff', label: :label_view_diff,
|
||||
url: { :action => 'diff',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => "",
|
||||
:rev => @changeset.identifier }
|
||||
} if action_name == 'diff' || @changeset.filechanges.any?
|
||||
%>
|
||||
|
||||
<%= render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => action_name} %>
|
||||
<% end %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<td style="padding-left: <%=18 * depth%>px;" class="<%=
|
||||
@repository.report_last_commit ? "filename" : "filename_no_report" %>">
|
||||
<% if entry.is_dir? %>
|
||||
<span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
||||
<span class="expander icon icon-collapsed" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
||||
:action => 'show',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
|
||||
:class => 'icon icon-stats' if @repository.supports_all_revisions? %>
|
||||
|
||||
<%= actions_dropdown do %>
|
||||
<%= link_to_if_authorized l(:label_settings),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'repositories'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
<% end %>
|
||||
|
||||
<%= form_tag({:action => controller.action_name,
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
|
|
|
@ -20,6 +20,12 @@ end %>
|
|||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
||||
:method => :get
|
||||
) do %>
|
||||
<% show_diff = revisions.size > 1 && User.current.allowed_to?(:browse_repository, @repository.project) %>
|
||||
<% if show_diff %>
|
||||
<p>
|
||||
<%= submit_tag(l(:label_view_diff), :name => nil) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<table class="list changesets">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
|
@ -30,7 +36,6 @@ end %>
|
|||
<th><%= l(:field_comments) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% show_diff = revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<tr class="changeset">
|
||||
|
@ -48,6 +53,10 @@ end %>
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
|
||||
<% if show_diff %>
|
||||
<p>
|
||||
<%= submit_tag(l(:label_view_diff), :name => nil) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<% line_num = 1; previous_revision = nil %>
|
||||
<% syntax_highlight_lines(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each do |line| %>
|
||||
<% revision = @annotate.revisions[line_num - 1] %>
|
||||
<tr id="L<%= line_num %>" class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>">
|
||||
<tr id="L<%= line_num %>" class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %> <%= previous_revision && revision && revision != previous_revision ? 'bloc-change' : nil%>">
|
||||
<th class="line-num"><a href="#L<%= line_num %>"><%= line_num %></a></th>
|
||||
<td class="revision">
|
||||
<% if revision && revision != previous_revision %>
|
||||
|
|
|
@ -1,4 +1,31 @@
|
|||
<% if @changeset && @changeset_to.nil? %>
|
||||
<div class="contextual">
|
||||
«
|
||||
<% unless @changeset.previous.nil? -%>
|
||||
<%= link_to_revision(@changeset.previous, @repository,
|
||||
:text => l(:label_previous), :accesskey => accesskey(:previous)) %>
|
||||
<% else -%>
|
||||
<%= l(:label_previous) %>
|
||||
<% end -%>
|
||||
|
|
||||
<% unless @changeset.next.nil? -%>
|
||||
<%= link_to_revision(@changeset.next, @repository,
|
||||
:text => l(:label_next), :accesskey => accesskey(:next)) %>
|
||||
<% else -%>
|
||||
<%= l(:label_next) %>
|
||||
<% end -%>
|
||||
»
|
||||
|
||||
<%= form_tag({:controller => 'repositories',
|
||||
:action => 'revision',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => nil},
|
||||
:method => :get) do %>
|
||||
<%= text_field_tag 'rev', @rev, :size => 8 %>
|
||||
<%= submit_tag 'OK', :name => nil %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'changeset' %>
|
||||
<% else %>
|
||||
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%= @path %></h2>
|
||||
|
|
|
@ -17,8 +17,15 @@
|
|||
<% elsif @content %>
|
||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||
<% else %>
|
||||
<% kind = if Redmine::MimeType.is_type?('video', @path)
|
||||
'video'
|
||||
elsif Redmine::MimeType.is_type?('audio', @path)
|
||||
'audio'
|
||||
end %>
|
||||
<%= render :partial => 'common/other',
|
||||
:locals => {
|
||||
:path => (url_for(params.merge(:action => 'raw')) if @allow_download),
|
||||
:kind => kind,
|
||||
:download_link => @repository.supports_cat? ? link_to(
|
||||
l(:label_no_preview_download),
|
||||
{ :action => 'raw', :id => @project,
|
||||
|
@ -28,6 +35,10 @@
|
|||
:class => 'icon icon-download') : nil } %>
|
||||
<% end %>
|
||||
|
||||
<span class="pagination filepreview">
|
||||
<%= render_pagination %>
|
||||
</span>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
<%= render :partial => 'changeset' %>
|
||||
|
||||
<% if User.current.allowed_to?(:browse_repository, @project) %>
|
||||
<h3><%= l(:label_attachment_plural) %></h3>
|
||||
<ul id="changes-legend">
|
||||
<li class="change change-A"><%= l(:label_added) %></li>
|
||||
<li class="change change-M"><%= l(:label_modified) %></li>
|
||||
|
@ -38,13 +37,6 @@
|
|||
<li class="change change-D"><%= l(:label_deleted) %></li>
|
||||
</ul>
|
||||
|
||||
<p><%= link_to(l(:label_view_diff),
|
||||
:action => 'diff',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => "",
|
||||
:rev => @changeset.identifier) if @changeset.filechanges.any? %></p>
|
||||
|
||||
<div class="changeset-changes">
|
||||
<%= render_changeset_changes %>
|
||||
</div>
|
||||
|
|
|
@ -1,20 +1,98 @@
|
|||
<h2><%= l(:label_statistics) %></h2>
|
||||
|
||||
<p>
|
||||
<%= tag("embed",
|
||||
:type => "image/svg+xml", :src => url_for(:controller => 'repositories',
|
||||
:action => 'graph', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:graph => "commits_per_month")) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= tag("embed",
|
||||
:type => "image/svg+xml", :src => url_for(:controller => 'repositories',
|
||||
:action => 'graph', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:graph => "commits_per_author")) %>
|
||||
</p>
|
||||
<div class="repository-graph">
|
||||
<canvas id="commits_per_month"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="repository-graph">
|
||||
<canvas id="commits_per_author"></canvas>
|
||||
</div>
|
||||
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function(){
|
||||
$.getJSON(<%= raw url_for(:controller => 'repositories',
|
||||
:action => 'graph', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:graph => "commits_per_month").to_json %>, function(data){
|
||||
|
||||
var chartData = {
|
||||
labels: data['labels'],
|
||||
datasets: [{
|
||||
label: <%= raw l(:label_revision_plural).to_json %>,
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.7)',
|
||||
borderColor: 'rgb(255, 99, 132)',
|
||||
borderWidth: 1,
|
||||
data: data['commits']
|
||||
}, {
|
||||
label: <%= raw l(:label_change_plural).to_json %>,
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.7)',
|
||||
borderColor: 'rgb(54, 162, 235)',
|
||||
data: data['changes']
|
||||
}]
|
||||
};
|
||||
new Chart(document.getElementById("commits_per_month").getContext("2d"), {
|
||||
type: 'bar',
|
||||
data: chartData,
|
||||
options: {
|
||||
elements: {
|
||||
rectangle: {borderWidth: 2}
|
||||
},
|
||||
responsive: true,
|
||||
legend: {position: 'right'},
|
||||
title: {
|
||||
display: true,
|
||||
text: <%= raw l(:label_commits_per_month).to_json %>
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$.getJSON(<%= raw url_for(:controller => 'repositories',
|
||||
:action => 'graph', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:graph => "commits_per_author").to_json %>, function(data){
|
||||
|
||||
var chartData = {
|
||||
labels: data['labels'],
|
||||
datasets: [{
|
||||
label: <%= raw l(:label_revision_plural).to_json %>,
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.7)',
|
||||
borderColor: 'rgb(255, 99, 132)',
|
||||
borderWidth: 1,
|
||||
data: data['commits']
|
||||
}, {
|
||||
label: <%= raw l(:label_change_plural).to_json %>,
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.7)',
|
||||
borderColor: 'rgb(54, 162, 235)',
|
||||
data: data['changes']
|
||||
}]
|
||||
};
|
||||
|
||||
new Chart(document.getElementById("commits_per_author").getContext("2d"), {
|
||||
type: 'horizontalBar',
|
||||
data: chartData,
|
||||
options: {
|
||||
elements: {
|
||||
rectangle: {borderWidth: 2}
|
||||
},
|
||||
responsive: true,
|
||||
legend: {position: 'right'},
|
||||
title: {
|
||||
display: true,
|
||||
text: <%= raw l(:label_commits_per_author).to_json %>
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
|
||||
|
||||
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
||||
|
||||
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag "Chart.bundle.min" %>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue