Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
31
app/views/repositories/_breadcrumbs.html.erb
Normal file
31
app/views/repositories/_breadcrumbs.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
<%= link_to(@repository.identifier.present? ? @repository.identifier : 'root',
|
||||
:action => 'show', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => nil, :rev => @rev) %>
|
||||
<%
|
||||
dirs = path.split('/')
|
||||
if 'file' == kind
|
||||
filename = dirs.pop
|
||||
end
|
||||
link_path = ''
|
||||
dirs.each do |dir|
|
||||
next if dir.blank?
|
||||
link_path << '/' unless link_path.empty?
|
||||
link_path << "#{dir}"
|
||||
%>
|
||||
/ <%= link_to dir, :action => 'show', :id => @project, :repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(link_path), :rev => @rev %>
|
||||
<% end %>
|
||||
<% if filename %>
|
||||
/ <%= link_to filename,
|
||||
:action => 'entry', :id => @project, :repository_id => @repository.identifier_param,
|
||||
:path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
||||
<% end %>
|
||||
<%
|
||||
# @rev is revsion or Git and Mercurial branch or tag.
|
||||
# For Mercurial *tip*, @rev and @changeset are nil.
|
||||
rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
|
||||
%>
|
||||
<%= "@ #{rev_text}" unless rev_text.blank? %>
|
||||
|
||||
<% html_title(with_leading_slash(path)) -%>
|
42
app/views/repositories/_changeset.html.erb
Normal file
42
app/views/repositories/_changeset.html.erb
Normal file
|
@ -0,0 +1,42 @@
|
|||
<h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
|
||||
|
||||
<div class="details">
|
||||
<h4>
|
||||
<%= avatar(@changeset.user, :size => "24") %>
|
||||
<%= authoring(@changeset.committed_on, @changeset.author) %>
|
||||
</h4>
|
||||
<% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %>
|
||||
<ul class="revision-info">
|
||||
<% if @changeset.scmid.present? %>
|
||||
<li>
|
||||
<strong>ID </strong><%= @changeset.scmid %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @changeset.parents.present? %>
|
||||
<li>
|
||||
<strong><%= l(:label_parent_revision) %></strong>
|
||||
<%= @changeset.parents.collect{
|
||||
|p| link_to_revision(p, @repository, :text => format_revision(p))
|
||||
}.join(", ").html_safe %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @changeset.children.present? %>
|
||||
<li>
|
||||
<strong><%= l(:label_child_revision) %></strong>
|
||||
<%= @changeset.children.collect{
|
||||
|p| link_to_revision(p, @repository, :text => format_revision(p))
|
||||
}.join(", ").html_safe %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
</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 %>
|
19
app/views/repositories/_dir_list.html.erb
Normal file
19
app/views/repositories/_dir_list.html.erb
Normal file
|
@ -0,0 +1,19 @@
|
|||
<div class="autoscroll">
|
||||
<table class="list entries" id="browser">
|
||||
<thead>
|
||||
<tr id="root">
|
||||
<th><%= l(:field_name) %></th>
|
||||
<th><%= l(:field_filesize) %></th>
|
||||
<% if @repository.report_last_commit %>
|
||||
<th><%= l(:label_revision) %></th>
|
||||
<th><%= l(:label_age) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render :partial => 'dir_list_content' %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
31
app/views/repositories/_dir_list_content.html.erb
Normal file
31
app/views/repositories/_dir_list_content.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
<% @entries.each do |entry| %>
|
||||
<% tr_id = Digest::MD5.hexdigest(entry.path)
|
||||
depth = params[:depth].to_i %>
|
||||
<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %>
|
||||
<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
|
||||
<tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry <%= entry.kind %>">
|
||||
<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(
|
||||
:action => 'show',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(ent_path),
|
||||
:rev => @rev,
|
||||
:depth => (depth + 1),
|
||||
:parent_id => tr_id)) %>');"> </span>
|
||||
<% end %>
|
||||
<%= link_to ent_name,
|
||||
{:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
|
||||
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
||||
</td>
|
||||
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
|
||||
<% if @repository.report_last_commit %>
|
||||
<td class="revision"><%= link_to_revision(entry.changeset, @repository) if entry.changeset %></td>
|
||||
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
|
||||
<td class="author"><%= entry.author %></td>
|
||||
<td class="comments"><%= entry.changeset.comments.truncate(50) if entry.changeset %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
31
app/views/repositories/_form.html.erb
Normal file
31
app/views/repositories/_form.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
<%= error_messages_for 'repository' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
|
||||
<% if @repository && ! @repository.class.scm_available %>
|
||||
<em class="info error"><%= l(:text_scm_command_not_available) %></em>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></p>
|
||||
<p>
|
||||
<%= f.text_field :identifier, :disabled => @repository.identifier_frozen? %>
|
||||
<% unless @repository.identifier_frozen? %>
|
||||
<em class="info">
|
||||
<%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %>
|
||||
</em>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<% button_disabled = true %>
|
||||
<% if @repository %>
|
||||
<% button_disabled = ! @repository.class.scm_available %>
|
||||
<%= repository_field_tags(f, @repository) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save), :disabled => button_disabled) %>
|
||||
<%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %>
|
||||
</p>
|
19
app/views/repositories/_link_to_functions.html.erb
Normal file
19
app/views/repositories/_link_to_functions.html.erb
Normal file
|
@ -0,0 +1,19 @@
|
|||
<% if @entry && @entry.kind == 'file' %>
|
||||
|
||||
<%
|
||||
tabs = []
|
||||
tabs << { name: 'entry', label: :button_view,
|
||||
url: {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
|
||||
} if @repository.supports_cat?
|
||||
|
||||
tabs << { name: 'changes', label: :label_history,
|
||||
url: {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
|
||||
}
|
||||
tabs << { name: 'annotate', label: :button_annotate,
|
||||
url: {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
|
||||
} if @repository.supports_annotate?
|
||||
%>
|
||||
|
||||
<%= render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => action_name} %>
|
||||
|
||||
<% end %>
|
43
app/views/repositories/_navigation.html.erb
Normal file
43
app/views/repositories/_navigation.html.erb
Normal file
|
@ -0,0 +1,43 @@
|
|||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'repository_navigation' %>
|
||||
<% end %>
|
||||
|
||||
<% if @entry && !@entry.is_dir? && @repository.supports_cat? %>
|
||||
<% download_label = @entry.size ? "#{l :button_download} (#{number_to_human_size @entry.size})" : l(:button_download) %>
|
||||
<%= link_to(download_label,
|
||||
{:action => 'raw', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(@path),
|
||||
:rev => @rev}, class: 'icon icon-download') %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to l(:label_statistics),
|
||||
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
|
||||
:class => 'icon icon-stats' if @repository.supports_all_revisions? %>
|
||||
|
||||
<%= form_tag({:action => controller.action_name,
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(@path),
|
||||
:rev => nil},
|
||||
{:method => :get, :id => 'revision_selector'}) do -%>
|
||||
<!-- Branches Dropdown -->
|
||||
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
|
||||
| <%= l(:label_branch) %>:
|
||||
<%= select_tag :branch,
|
||||
options_for_select([''] + @repository.branches, @rev),
|
||||
:id => 'branch' %>
|
||||
<% end -%>
|
||||
|
||||
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%>
|
||||
| <%= l(:label_tag) %>:
|
||||
<%= select_tag :tag,
|
||||
options_for_select([''] + @repository.tags, @rev),
|
||||
:id => 'tag' %>
|
||||
<% end -%>
|
||||
|
||||
<% if @repository.supports_all_revisions? %>
|
||||
| <%= l(:label_revision) %>:
|
||||
<%= text_field_tag 'rev', @rev, :size => 8 %>
|
||||
<% end %>
|
||||
<% end -%>
|
42
app/views/repositories/_related_issues.html.erb
Normal file
42
app/views/repositories/_related_issues.html.erb
Normal file
|
@ -0,0 +1,42 @@
|
|||
<% manage_allowed = User.current.allowed_to?(:manage_related_issues, @repository.project) %>
|
||||
|
||||
<div id="related-issues">
|
||||
<% if manage_allowed %>
|
||||
<div class="contextual">
|
||||
<%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'issue_id'} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<h3><%= l(:label_related_issues) %></h3>
|
||||
<ul>
|
||||
<% @changeset.issues.visible.each do |issue| %>
|
||||
<li id="<%= "related-issue-#{issue.id}" %>"><%= link_to_issue issue %>
|
||||
<%= link_to(l(:label_relation_delete),
|
||||
{:controller => 'repositories', :action => 'remove_related_issue',
|
||||
:id => @project, :repository_id => @repository.identifier_param,
|
||||
:rev => @changeset.identifier, :issue_id => issue},
|
||||
:remote => true,
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:label_relation_delete),
|
||||
:class => 'icon-only icon-link-break'
|
||||
) if manage_allowed %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<% if manage_allowed %>
|
||||
<%= form_tag({:controller => 'repositories', :action => 'add_related_issue',
|
||||
:id => @project, :repository_id => @repository.identifier_param,
|
||||
:rev => @changeset.identifier},
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')) do |f| %>
|
||||
<%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= toggle_link l(:button_cancel), 'new-relation-form'%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= javascript_tag "observeAutocompleteField('issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => 'all')}')" %>
|
18
app/views/repositories/_revision_graph.html.erb
Normal file
18
app/views/repositories/_revision_graph.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
|||
<%= javascript_tag do %>
|
||||
function revisionGraphHandler(){
|
||||
drawRevisionGraph(
|
||||
document.getElementById('holder'),
|
||||
<%= commits.to_json.html_safe %>,
|
||||
<%= space %>
|
||||
);
|
||||
}
|
||||
$(document).ready(revisionGraphHandler);
|
||||
$(window).resize(revisionGraphHandler);
|
||||
<% end %>
|
||||
|
||||
<div id="holder" class="revision-graph"></div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'raphael' %>
|
||||
<%= javascript_include_tag 'revision_graph' %>
|
||||
<% end %>
|
53
app/views/repositories/_revisions.html.erb
Normal file
53
app/views/repositories/_revisions.html.erb
Normal file
|
@ -0,0 +1,53 @@
|
|||
<div class="autoscroll">
|
||||
<% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
|
||||
<%= if show_revision_graph && revisions && revisions.any?
|
||||
indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
|
||||
url_for(
|
||||
:controller => 'repositories',
|
||||
:action => 'revision',
|
||||
:id => project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => scmid)
|
||||
end
|
||||
render :partial => 'revision_graph',
|
||||
:locals => {
|
||||
:commits => indexed_commits,
|
||||
:space => graph_space
|
||||
}
|
||||
end %>
|
||||
<%= form_tag(
|
||||
{:controller => 'repositories', :action => 'diff', :id => project,
|
||||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
||||
:method => :get
|
||||
) do %>
|
||||
<table class="list changesets">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><%= l(:label_date) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% show_diff = revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<tr class="changeset">
|
||||
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
|
||||
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
|
||||
<%= link_to_revision(changeset, @repository) %>
|
||||
<% end %>
|
||||
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').prop('checked')) {$('#cb-#{line_num-1}').prop('checked',true);}") if show_diff && (line_num > 1) %></td>
|
||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||
<td class="author"><%= changeset.user.blank? ? changeset.author.to_s.truncate(30) : link_to_user(changeset.user) %></td>
|
||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments), :formatting => Setting.commit_logs_formatting?) %></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
|
||||
<% end %>
|
||||
</div>
|
7
app/views/repositories/add_related_issue.js.erb
Normal file
7
app/views/repositories/add_related_issue.js.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<% if @issue %>
|
||||
$('#related-issues').html('<%= escape_javascript(render :partial => "related_issues") %>');
|
||||
$('#related-issue-<%= @issue.id %>').effect("highlight");
|
||||
$('#issue_id').focus();
|
||||
<% else %>
|
||||
alert("<%= raw(escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid'))) %>");
|
||||
<% end %>
|
49
app/views/repositories/annotate.html.erb
Normal file
49
app/views/repositories/annotate.html.erb
Normal file
|
@ -0,0 +1,49 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="contextual">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
||||
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||||
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
|
||||
<% if @annotate %>
|
||||
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
||||
<div class="autoscroll">
|
||||
<table class="filecontent annotate syntaxhl">
|
||||
<tbody>
|
||||
<% 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] %>">
|
||||
<th class="line-num"><a href="#L<%= line_num %>"><%= line_num %></a></th>
|
||||
<td class="revision">
|
||||
<% if revision && revision != previous_revision %>
|
||||
<%= revision.identifier ?
|
||||
link_to_revision(revision, @repository) : format_revision(revision) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="author">
|
||||
<% if revision && revision != previous_revision %>
|
||||
<% author = Redmine::CodesetUtil.to_utf8(revision.author.to_s,
|
||||
@repository.repo_log_encoding) %>
|
||||
<%= author.split('<').first %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="line-code"><pre><%= line.html_safe %></pre></td>
|
||||
</tr>
|
||||
<% line_num += 1; previous_revision = revision %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% else %>
|
||||
<p id="errorExplanation"><%= @error_message %></p>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:button_annotate)) -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag 'scm' %>
|
||||
<% end %>
|
20
app/views/repositories/changes.html.erb
Normal file
20
app/views/repositories/changes.html.erb
Normal file
|
@ -0,0 +1,20 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="contextual">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
||||
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
|
||||
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<%= render(:partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_change_plural)) -%>
|
42
app/views/repositories/committers.html.erb
Normal file
42
app/views/repositories/committers.html.erb
Normal file
|
@ -0,0 +1,42 @@
|
|||
<h2><%= l(:label_repository) %></h2>
|
||||
|
||||
<%= simple_format(l(:text_repository_usernames_mapping)) %>
|
||||
|
||||
<% if @committers.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
|
||||
<%= form_tag({}) do %>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= l(:field_login) %></th>
|
||||
<th><%= l(:label_user) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% i = 0 -%>
|
||||
<% @committers.each do |committer, user_id| -%>
|
||||
<tr>
|
||||
<td><%= committer %></td>
|
||||
<td>
|
||||
<%= hidden_field_tag "committers[#{i}][]", committer, :id => nil %>
|
||||
<%= select_tag "committers[#{i}][]",
|
||||
content_tag(
|
||||
'option',
|
||||
"-- #{l :actionview_instancetag_blank_option} --",
|
||||
:value => ''
|
||||
) +
|
||||
options_from_collection_for_select(
|
||||
@users, 'id', 'name', user_id.to_i
|
||||
) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% i += 1 -%>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><%= submit_tag(l(:button_save)) %></p>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
31
app/views/repositories/diff.html.erb
Normal file
31
app/views/repositories/diff.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
<% if @changeset && @changeset_to.nil? %>
|
||||
<%= render :partial => 'changeset' %>
|
||||
<% else %>
|
||||
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%= @path %></h2>
|
||||
<% end %>
|
||||
|
||||
<!-- Choose view type -->
|
||||
<%= form_tag({:action => 'diff', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(@path), :rev=> @rev}, :method => 'get') do %>
|
||||
<%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
|
||||
<p>
|
||||
<%= l(:label_view_diff) %>:
|
||||
<label><%= radio_button_tag 'type', 'inline', @diff_type != 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_inline) %></label>
|
||||
<label><%= radio_button_tag 'type', 'sbs', @diff_type == 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_side_by_side) %></label>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% cache(@cache_key) do -%>
|
||||
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => @repository.class.scm_name} %>
|
||||
<% end -%>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to_with_query_parameters 'Diff', {}, :caption => 'Unified diff' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(with_leading_slash(@path), 'Diff') -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
5
app/views/repositories/edit.html.erb
Normal file
5
app/views/repositories/edit.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<h2><%= l(:label_repository) %></h2>
|
||||
|
||||
<%= labelled_form_for :repository, @repository, :url => repository_path(@repository), :html => {:method => :put, :id => 'repository-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
33
app/views/repositories/entry.html.erb
Normal file
33
app/views/repositories/entry.html.erb
Normal file
|
@ -0,0 +1,33 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="contextual">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
||||
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||||
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
|
||||
<% if Redmine::MimeType.is_type?('image', @path) %>
|
||||
<%= render :partial => 'common/image', :locals => {:path => url_for(:action => 'raw',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => @path,
|
||||
:rev => @rev), :alt => @path} %>
|
||||
<% elsif @content %>
|
||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||
<% else %>
|
||||
<%= render :partial => 'common/other',
|
||||
:locals => {
|
||||
:download_link => @repository.supports_cat? ? link_to(
|
||||
l(:label_no_preview_download),
|
||||
{ :action => 'raw', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(@path),
|
||||
:rev => @rev },
|
||||
:class => 'icon icon-download') : nil } %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
5
app/views/repositories/new.html.erb
Normal file
5
app/views/repositories/new.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<h2><%= l(:label_repository_new) %></h2>
|
||||
|
||||
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
1
app/views/repositories/new.js.erb
Normal file
1
app/views/repositories/new.js.erb
Normal file
|
@ -0,0 +1 @@
|
|||
$('#content').html('<%= escape_javascript(render :template => 'repositories/new', :formats => [:html]) %>');
|
1
app/views/repositories/remove_related_issue.js.erb
Normal file
1
app/views/repositories/remove_related_issue.js.erb
Normal file
|
@ -0,0 +1 @@
|
|||
$('#related-issue-<%= @issue.id %>').remove();
|
61
app/views/repositories/revision.html.erb
Normal file
61
app/views/repositories/revision.html.erb
Normal file
|
@ -0,0 +1,61 @@
|
|||
<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' %>
|
||||
|
||||
<% 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>
|
||||
<li class="change change-C"><%= l(:label_copied) %></li>
|
||||
<li class="change change-R"><%= l(:label_renamed) %></li>
|
||||
<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>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<%
|
||||
title = "#{l(:label_revision)} #{format_revision(@changeset)}"
|
||||
title << " - #{@changeset.comments.truncate(80)}"
|
||||
html_title(title)
|
||||
-%>
|
34
app/views/repositories/revisions.html.erb
Normal file
34
app/views/repositories/revisions.html.erb
Normal file
|
@ -0,0 +1,34 @@
|
|||
<div class="contextual">
|
||||
<%= form_tag(
|
||||
{:controller => 'repositories', :action => 'revision', :id => @project,
|
||||
:repository_id => @repository.identifier_param},
|
||||
:method => :get
|
||||
) do %>
|
||||
<%= l(:label_revision) %>: <%= text_field_tag 'rev', nil, :size => 8 %>
|
||||
<%= submit_tag 'OK' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_revision_plural) %></h2>
|
||||
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project,
|
||||
:path => '',
|
||||
:revisions => @changesets,
|
||||
:entry => nil } %>
|
||||
|
||||
<span class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></span>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<%= auto_discovery_link_tag(
|
||||
:atom,
|
||||
:params => request.query_parameters.merge(:page => nil, :key => User.current.rss_key),
|
||||
:format => 'atom') %>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_revision_plural)) -%>
|
78
app/views/repositories/show.html.erb
Normal file
78
app/views/repositories/show.html.erb
Normal file
|
@ -0,0 +1,78 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="contextual">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
||||
<h2><%= render :partial => 'breadcrumbs',
|
||||
:locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
|
||||
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<% if authorize_for('repositories', 'revisions') %>
|
||||
<% if @changesets && !@changesets.empty? %>
|
||||
<h3><%= l(:label_latest_revision_plural) %></h3>
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path,
|
||||
:revisions => @changesets, :entry => nil }%>
|
||||
<% end %>
|
||||
<p>
|
||||
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
|
||||
sep = '' %>
|
||||
<% if @repository.supports_all_revisions? && @path.blank? %>
|
||||
<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project,
|
||||
:repository_id => @repository.identifier_param %>
|
||||
<% sep = '|' %>
|
||||
<% end %>
|
||||
<% if @repository.supports_directory_revisions? &&
|
||||
( has_branches || !@path.blank? || !@rev.blank? ) %>
|
||||
<%= sep %>
|
||||
<%= link_to l(:label_view_revisions),
|
||||
:action => 'changes',
|
||||
:path => to_path_param(@path),
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => @rev %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if @repository.supports_all_revisions? %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(
|
||||
:atom,
|
||||
:action => 'revisions', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:key => User.current.rss_key) %>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom',
|
||||
:url => {:action => 'revisions', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @repositories.size > 1 %>
|
||||
<% content_for :sidebar do %>
|
||||
<h3><%= l(:label_repository_plural) %></h3>
|
||||
<p>
|
||||
<%= @repositories.sort.collect {|repo|
|
||||
link_to repo.name,
|
||||
{:controller => 'repositories', :action => 'show',
|
||||
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
|
||||
:class => 'repository' + (repo == @repository ? ' selected' : '')
|
||||
}.join('<br />').html_safe %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_repository)) -%>
|
20
app/views/repositories/stats.html.erb
Normal file
20
app/views/repositories/stats.html.erb
Normal file
|
@ -0,0 +1,20 @@
|
|||
<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>
|
||||
|
||||
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
||||
|
||||
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
Loading…
Add table
Add a link
Reference in a new issue