Revision 912:5e80956cc792 app/views/repositories
| app/views/repositories/_breadcrumbs.html.erb | ||
|---|---|---|
| 1 |
<%= link_to 'root', :action => 'show', :id => @project, :path => '', :rev => @rev %> |
|
| 2 |
<% |
|
| 3 |
dirs = path.split('/')
|
|
| 4 |
if 'file' == kind |
|
| 5 |
filename = dirs.pop |
|
| 6 |
end |
|
| 7 |
link_path = '' |
|
| 8 |
dirs.each do |dir| |
|
| 9 |
next if dir.blank? |
|
| 10 |
link_path << '/' unless link_path.empty? |
|
| 11 |
link_path << "#{dir}"
|
|
| 12 |
%> |
|
| 13 |
/ <%= link_to h(dir), :action => 'show', :id => @project, |
|
| 14 |
:path => to_path_param(link_path), :rev => @rev %> |
|
| 15 |
<% end %> |
|
| 16 |
<% if filename %> |
|
| 17 |
/ <%= link_to h(filename), |
|
| 18 |
:action => 'changes', :id => @project, |
|
| 19 |
:path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
|
| 20 |
<% end %> |
|
| 21 |
<% |
|
| 22 |
# @rev is revsion or Git and Mercurial branch or tag. |
|
| 23 |
# For Mercurial *tip*, @rev and @changeset are nil. |
|
| 24 |
rev_text = @changeset.nil? ? @rev : format_revision(@changeset) |
|
| 25 |
%> |
|
| 26 |
<%= "@ #{h rev_text}" unless rev_text.blank? %>
|
|
| 27 |
|
|
| 28 |
<% html_title(with_leading_slash(path)) -%> |
|
| app/views/repositories/_breadcrumbs.rhtml | ||
|---|---|---|
| 1 |
<%= link_to 'root', :action => 'show', :id => @project, :path => '', :rev => @rev %> |
|
| 2 |
<% |
|
| 3 |
dirs = path.split('/')
|
|
| 4 |
if 'file' == kind |
|
| 5 |
filename = dirs.pop |
|
| 6 |
end |
|
| 7 |
link_path = '' |
|
| 8 |
dirs.each do |dir| |
|
| 9 |
next if dir.blank? |
|
| 10 |
link_path << '/' unless link_path.empty? |
|
| 11 |
link_path << "#{dir}"
|
|
| 12 |
%> |
|
| 13 |
/ <%= link_to h(dir), :action => 'show', :id => @project, |
|
| 14 |
:path => to_path_param(link_path), :rev => @rev %> |
|
| 15 |
<% end %> |
|
| 16 |
<% if filename %> |
|
| 17 |
/ <%= link_to h(filename), |
|
| 18 |
:action => 'changes', :id => @project, |
|
| 19 |
:path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
|
| 20 |
<% end %> |
|
| 21 |
<% |
|
| 22 |
# @rev is revsion or Git and Mercurial branch or tag. |
|
| 23 |
# For Mercurial *tip*, @rev and @changeset are nil. |
|
| 24 |
rev_text = @changeset.nil? ? @rev : format_revision(@changeset) |
|
| 25 |
%> |
|
| 26 |
<%= "@ #{h rev_text}" unless rev_text.blank? %>
|
|
| 27 |
|
|
| 28 |
<% html_title(with_leading_slash(path)) -%> |
|
| app/views/repositories/_dir_list.html.erb | ||
|---|---|---|
| 1 |
<table class="list entries" id="browser"> |
|
| 2 |
<thead> |
|
| 3 |
<tr id="root"> |
|
| 4 |
<th><%= l(:field_name) %></th> |
|
| 5 |
<th><%= l(:field_filesize) %></th> |
|
| 6 |
<% if @repository.report_last_commit %> |
|
| 7 |
<th><%= l(:label_revision) %></th> |
|
| 8 |
<th><%= l(:label_age) %></th> |
|
| 9 |
<th><%= l(:field_author) %></th> |
|
| 10 |
<th><%= l(:field_comments) %></th> |
|
| 11 |
<% end %> |
|
| 12 |
</tr> |
|
| 13 |
</thead> |
|
| 14 |
<tbody> |
|
| 15 |
<%= render :partial => 'dir_list_content' %> |
|
| 16 |
</tbody> |
|
| 17 |
</table> |
|
| app/views/repositories/_dir_list.rhtml | ||
|---|---|---|
| 1 |
<table class="list entries" id="browser"> |
|
| 2 |
<thead> |
|
| 3 |
<tr id="root"> |
|
| 4 |
<th><%= l(:field_name) %></th> |
|
| 5 |
<th><%= l(:field_filesize) %></th> |
|
| 6 |
<% if @repository.report_last_commit %> |
|
| 7 |
<th><%= l(:label_revision) %></th> |
|
| 8 |
<th><%= l(:label_age) %></th> |
|
| 9 |
<th><%= l(:field_author) %></th> |
|
| 10 |
<th><%= l(:field_comments) %></th> |
|
| 11 |
<% end %> |
|
| 12 |
</tr> |
|
| 13 |
</thead> |
|
| 14 |
<tbody> |
|
| 15 |
<%= render :partial => 'dir_list_content' %> |
|
| 16 |
</tbody> |
|
| 17 |
</table> |
|
| app/views/repositories/_dir_list_content.html.erb | ||
|---|---|---|
| 1 |
<% @entries.each do |entry| %> |
|
| 2 |
<% tr_id = Digest::MD5.hexdigest(entry.path) |
|
| 3 |
depth = params[:depth].to_i %> |
|
| 4 |
<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> |
|
| 5 |
<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> |
|
| 6 |
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> |
|
| 7 |
<td style="padding-left: <%=18 * depth%>px;" class="<%= |
|
| 8 |
@repository.report_last_commit ? "filename" : "filename_no_report" %>";> |
|
| 9 |
<% if entry.is_dir? %> |
|
| 10 |
<span class="expander" onclick="<%= remote_function( |
|
| 11 |
:url => {
|
|
| 12 |
:action => 'show', |
|
| 13 |
:id => @project, |
|
| 14 |
:path => to_path_param(ent_path), |
|
| 15 |
:rev => @rev, |
|
| 16 |
:depth => (depth + 1), |
|
| 17 |
:parent_id => tr_id |
|
| 18 |
}, |
|
| 19 |
:method => :get, |
|
| 20 |
:update => { :success => tr_id },
|
|
| 21 |
:position => :after, |
|
| 22 |
:success => "scmEntryLoaded('#{tr_id}')",
|
|
| 23 |
:condition => "scmEntryClick('#{tr_id}')"
|
|
| 24 |
) %>"> </span> |
|
| 25 |
<% end %> |
|
| 26 |
<%= link_to h(ent_name), |
|
| 27 |
{:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev},
|
|
| 28 |
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
|
| 29 |
</td> |
|
| 30 |
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> |
|
| 31 |
<% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> |
|
| 32 |
<% if @repository.report_last_commit %> |
|
| 33 |
<td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td> |
|
| 34 |
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> |
|
| 35 |
<td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : h(changeset.author) if entry.lastrev %></td>
|
|
| 36 |
<td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td> |
|
| 37 |
<% end %> |
|
| 38 |
</tr> |
|
| 39 |
<% end %> |
|
| app/views/repositories/_dir_list_content.rhtml | ||
|---|---|---|
| 1 |
<% @entries.each do |entry| %> |
|
| 2 |
<% tr_id = Digest::MD5.hexdigest(entry.path) |
|
| 3 |
depth = params[:depth].to_i %> |
|
| 4 |
<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> |
|
| 5 |
<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> |
|
| 6 |
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> |
|
| 7 |
<td style="padding-left: <%=18 * depth%>px;" class="<%= |
|
| 8 |
@repository.report_last_commit ? "filename" : "filename_no_report" %>";> |
|
| 9 |
<% if entry.is_dir? %> |
|
| 10 |
<span class="expander" onclick="<%= remote_function :url => {:action => 'show', :id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
|
|
| 11 |
:method => :get, |
|
| 12 |
:update => { :success => tr_id },
|
|
| 13 |
:position => :after, |
|
| 14 |
:success => "scmEntryLoaded('#{tr_id}')",
|
|
| 15 |
:condition => "scmEntryClick('#{tr_id}')"%>"> </span>
|
|
| 16 |
<% end %> |
|
| 17 |
<%= link_to h(ent_name), |
|
| 18 |
{:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev},
|
|
| 19 |
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
|
| 20 |
</td> |
|
| 21 |
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> |
|
| 22 |
<% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> |
|
| 23 |
<% if @repository.report_last_commit %> |
|
| 24 |
<td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td> |
|
| 25 |
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> |
|
| 26 |
<td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td>
|
|
| 27 |
<td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td> |
|
| 28 |
<% end %> |
|
| 29 |
</tr> |
|
| 30 |
<% end %> |
|
| app/views/repositories/_link_to_functions.html.erb | ||
|---|---|---|
| 1 |
<% if @entry && @entry.kind == 'file' %> |
|
| 2 |
|
|
| 3 |
<p> |
|
| 4 |
<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
| 5 |
<% if @repository.supports_cat? %> |
|
| 6 |
<%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
| 7 |
<% end %> |
|
| 8 |
<% if @repository.supports_annotate? %> |
|
| 9 |
<%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
| 10 |
<% end %> |
|
| 11 |
<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
|
|
| 12 |
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
|
| 13 |
</p> |
|
| 14 |
|
|
| 15 |
<% end %> |
|
| app/views/repositories/_link_to_functions.rhtml | ||
|---|---|---|
| 1 |
<% if @entry && @entry.kind == 'file' %> |
|
| 2 |
|
|
| 3 |
<p> |
|
| 4 |
<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
| 5 |
<% if @repository.supports_cat? %> |
|
| 6 |
<%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
| 7 |
<% end %> |
|
| 8 |
<% if @repository.supports_annotate? %> |
|
| 9 |
<%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
|
| 10 |
<% end %> |
|
| 11 |
<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
|
|
| 12 |
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
|
| 13 |
</p> |
|
| 14 |
|
|
| 15 |
<% end %> |
|
| app/views/repositories/_navigation.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= javascript_include_tag 'repository_navigation' %> |
|
| 3 |
<% end %> |
|
| 4 |
|
|
| 5 |
<%= link_to_revision_archive(@repository, @rev, @project, { :text => l(:label_download_revision), :class => 'icon icon-package' }) %>
|
|
| 6 |
|
|
| 7 |
<% form_tag({:action => controller.action_name, :id => @project, :path => to_path_param(@path), :rev => ''}, {:method => :get, :id => 'revision_selector'}) do -%>
|
|
| 8 |
<!-- Branches Dropdown --> |
|
| 9 |
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%> |
|
| 10 |
| <%= l(:label_branch) %>: |
|
| 11 |
<%= select_tag :branch, options_for_select([''] + @repository.branches,@rev), :id => 'branch' %> |
|
| 12 |
<% end -%> |
|
| 13 |
|
|
| 14 |
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%> |
|
| 15 |
| <%= l(:label_tag) %>: |
|
| 16 |
<%= select_tag :tag, options_for_select([''] + @repository.tags,@rev), :id => 'tag' %> |
|
| 17 |
<% end -%> |
|
| 18 |
|
|
| 19 |
| <%= l(:label_revision) %>: |
|
| 20 |
<%= text_field_tag 'rev', @rev, :size => 8 %> |
|
| 21 |
<% end -%> |
|
| 22 |
|
|
| 23 |
|
|
| app/views/repositories/_navigation.rhtml | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= javascript_include_tag 'repository_navigation' %> |
|
| 3 |
<% end %> |
|
| 4 |
|
|
| 5 |
<%= link_to_revision_archive(@repository, @rev, @project, { :text => l(:label_download_revision), :class => 'icon icon-package' }) %>
|
|
| 6 |
|
|
| 7 |
<% form_tag({:action => controller.action_name, :id => @project, :path => to_path_param(@path), :rev => ''}, {:method => :get, :id => 'revision_selector'}) do -%>
|
|
| 8 |
<!-- Branches Dropdown --> |
|
| 9 |
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%> |
|
| 10 |
| <%= l(:label_branch) %>: |
|
| 11 |
<%= select_tag :branch, options_for_select([''] + @repository.branches,@rev), :id => 'branch' %> |
|
| 12 |
<% end -%> |
|
| 13 |
|
|
| 14 |
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%> |
|
| 15 |
| <%= l(:label_tag) %>: |
|
| 16 |
<%= select_tag :tag, options_for_select([''] + @repository.tags,@rev), :id => 'tag' %> |
|
| 17 |
<% end -%> |
|
| 18 |
|
|
| 19 |
| <%= l(:label_revision) %>: |
|
| 20 |
<%= text_field_tag 'rev', @rev, :size => 8 %> |
|
| 21 |
<% end -%> |
|
| 22 |
|
|
| 23 |
|
|
| app/views/repositories/_revision_graph.html.erb | ||
|---|---|---|
| 1 |
<%= javascript_include_tag "raphael.js" %> |
|
| 2 |
<script type="text/javascript" charset="utf-8"> |
|
| 3 |
var chunk = {commits:<%= commits.values.to_json %>}
|
|
| 4 |
</script> |
|
| 5 |
<%= javascript_include_tag "revision_graph.js" %> |
|
| 6 |
|
|
| 7 |
<script type="text/javascript"> |
|
| 8 |
Event.observe(window,"load", function(){
|
|
| 9 |
branchGraph(document.getElementById("holder"));
|
|
| 10 |
}) |
|
| 11 |
</script> |
|
| 12 |
|
|
| 13 |
<div id="holder" class="graph"></div> |
|
| app/views/repositories/_revisions.html.erb | ||
|---|---|---|
| 1 |
<% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %> |
|
| 2 |
<% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %>
|
|
| 3 |
<table class="list changesets"> |
|
| 4 |
<thead><tr> |
|
| 5 |
<% if show_revision_graph %> |
|
| 6 |
<th></th> |
|
| 7 |
<% end %> |
|
| 8 |
<th>#</th> |
|
| 9 |
<th></th> |
|
| 10 |
<th></th> |
|
| 11 |
<th><%= l(:label_date) %></th> |
|
| 12 |
<th><%= l(:field_author) %></th> |
|
| 13 |
<th><%= l(:field_comments) %></th> |
|
| 14 |
</tr></thead> |
|
| 15 |
<tbody> |
|
| 16 |
<% show_diff = revisions.size > 1 %> |
|
| 17 |
<% line_num = 1 %> |
|
| 18 |
<% revisions.each do |changeset| %> |
|
| 19 |
<tr class="changeset <%= cycle 'odd', 'even' %>"> |
|
| 20 |
<% if show_revision_graph %> |
|
| 21 |
<% if line_num == 1 %> |
|
| 22 |
<td class="revision_graph" rowspan="<%= revisions.size %>"> |
|
| 23 |
<% href_base = Proc.new {|x| url_for(:controller => 'repositories',
|
|
| 24 |
:action => 'revision', |
|
| 25 |
:id => project, |
|
| 26 |
:rev => x) } %> |
|
| 27 |
<%= render :partial => 'revision_graph', |
|
| 28 |
:locals => {
|
|
| 29 |
:commits => index_commits( |
|
| 30 |
revisions, |
|
| 31 |
@repository.branches, |
|
| 32 |
href_base |
|
| 33 |
) |
|
| 34 |
} %> |
|
| 35 |
</td> |
|
| 36 |
<% end %> |
|
| 37 |
<% end %> |
|
| 38 |
<td class="id"><%= link_to_revision(changeset, project) %></td> |
|
| 39 |
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td>
|
|
| 40 |
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
|
|
| 41 |
<td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
|
| 42 |
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td> |
|
| 43 |
<% if show_revision_graph %> |
|
| 44 |
<td class="comments_nowrap"> |
|
| 45 |
<%= textilizable(truncate(truncate_at_line_break(changeset.comments, 0), :length => 90)) %> |
|
| 46 |
</td> |
|
| 47 |
<% else %> |
|
| 48 |
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td> |
|
| 49 |
<% end %> |
|
| 50 |
</tr> |
|
| 51 |
<% line_num += 1 %> |
|
| 52 |
<% end %> |
|
| 53 |
</tbody> |
|
| 54 |
</table> |
|
| 55 |
<%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %> |
|
| 56 |
<% end %> |
|
| app/views/repositories/_revisions.rhtml | ||
|---|---|---|
| 1 |
<% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => to_path_param(path)}, :method => :get) do %>
|
|
| 2 |
<table class="list changesets"> |
|
| 3 |
<thead><tr> |
|
| 4 |
<th>#</th> |
|
| 5 |
<th></th> |
|
| 6 |
<th></th> |
|
| 7 |
<th><%= l(:label_date) %></th> |
|
| 8 |
<th><%= l(:field_author) %></th> |
|
| 9 |
<th><%= l(:field_comments) %></th> |
|
| 10 |
</tr></thead> |
|
| 11 |
<tbody> |
|
| 12 |
<% show_diff = revisions.size > 1 %> |
|
| 13 |
<% line_num = 1 %> |
|
| 14 |
<% revisions.each do |changeset| %> |
|
| 15 |
<tr class="changeset <%= cycle 'odd', 'even' %>"> |
|
| 16 |
<td class="id"><%= link_to_revision(changeset, project) %></td> |
|
| 17 |
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td>
|
|
| 18 |
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
|
|
| 19 |
<td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
|
| 20 |
<td class="author"><%=h changeset.author %></td> |
|
| 21 |
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td> |
|
| 22 |
</tr> |
|
| 23 |
<% line_num += 1 %> |
|
| 24 |
<% end %> |
|
| 25 |
</tbody> |
|
| 26 |
</table> |
|
| 27 |
<%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %> |
|
| 28 |
<% end %> |
|
| app/views/repositories/annotate.html.erb | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
|
| 8 |
|
|
| 9 |
<p><%= render :partial => 'link_to_functions' %></p> |
|
| 10 |
|
|
| 11 |
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
|
| 12 |
|
|
| 13 |
<div class="autoscroll"> |
|
| 14 |
<table class="filecontent annotate syntaxhl"> |
|
| 15 |
<tbody> |
|
| 16 |
<% line_num = 1 %> |
|
| 17 |
<% syntax_highlight(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each_line do |line| %> |
|
| 18 |
<% revision = @annotate.revisions[line_num - 1] %> |
|
| 19 |
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> |
|
| 20 |
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th> |
|
| 21 |
<td class="revision"> |
|
| 22 |
<%= (revision.identifier ? link_to_revision(revision, @project) : format_revision(revision)) if revision %></td> |
|
| 23 |
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td>
|
|
| 24 |
<td class="line-code"><pre><%= line %></pre></td> |
|
| 25 |
</tr> |
|
| 26 |
<% line_num += 1 %> |
|
| 27 |
<% end %> |
|
| 28 |
</tbody> |
|
| 29 |
</table> |
|
| 30 |
</div> |
|
| 31 |
|
|
| 32 |
<% html_title(l(:button_annotate)) -%> |
|
| 33 |
|
|
| 34 |
<% content_for :header_tags do %> |
|
| 35 |
<%= stylesheet_link_tag 'scm' %> |
|
| 36 |
<% end %> |
|
| app/views/repositories/annotate.rhtml | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
|
| 8 |
|
|
| 9 |
<p><%= render :partial => 'link_to_functions' %></p> |
|
| 10 |
|
|
| 11 |
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
|
| 12 |
|
|
| 13 |
<div class="autoscroll"> |
|
| 14 |
<table class="filecontent annotate syntaxhl"> |
|
| 15 |
<tbody> |
|
| 16 |
<% line_num = 1 %> |
|
| 17 |
<% syntax_highlight(@path, to_utf8(@annotate.content)).each_line do |line| %> |
|
| 18 |
<% revision = @annotate.revisions[line_num-1] %> |
|
| 19 |
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> |
|
| 20 |
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th> |
|
| 21 |
<td class="revision"> |
|
| 22 |
<%= (revision.identifier ? link_to_revision(revision, @project) : format_revision(revision)) if revision %></td> |
|
| 23 |
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td>
|
|
| 24 |
<td class="line-code"><pre><%= line %></pre></td> |
|
| 25 |
</tr> |
|
| 26 |
<% line_num += 1 %> |
|
| 27 |
<% end %> |
|
| 28 |
</tbody> |
|
| 29 |
</table> |
|
| 30 |
</div> |
|
| 31 |
|
|
| 32 |
<% html_title(l(:button_annotate)) -%> |
|
| 33 |
|
|
| 34 |
<% content_for :header_tags do %> |
|
| 35 |
<%= stylesheet_link_tag 'scm' %> |
|
| 36 |
<% end %> |
|
| app/views/repositories/changes.html.erb | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2> |
|
| 8 |
<%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %>
|
|
| 9 |
</h2> |
|
| 10 |
|
|
| 11 |
<p><%= render :partial => 'link_to_functions' %></p> |
|
| 12 |
|
|
| 13 |
<%= render_properties(@properties) %> |
|
| 14 |
|
|
| 15 |
<%= render(:partial => 'revisions', |
|
| 16 |
:locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
|
|
| 17 |
|
|
| 18 |
<% html_title(l(:label_change_plural)) -%> |
|
| app/views/repositories/changes.rhtml | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2> |
|
| 8 |
<%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %>
|
|
| 9 |
</h2> |
|
| 10 |
|
|
| 11 |
<p><%= render :partial => 'link_to_functions' %></p> |
|
| 12 |
|
|
| 13 |
<%= render_properties(@properties) %> |
|
| 14 |
|
|
| 15 |
<%= render(:partial => 'revisions', |
|
| 16 |
:locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
|
|
| 17 |
|
|
| 18 |
<% html_title(l(:label_change_plural)) -%> |
|
| app/views/repositories/committers.html.erb | ||
|---|---|---|
| 1 |
<h2><%= l(:label_repository) %></h2> |
|
| 2 |
|
|
| 3 |
<%= simple_format(l(:text_repository_usernames_mapping)) %> |
|
| 4 |
|
|
| 5 |
<% if @committers.empty? %> |
|
| 6 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 7 |
<% else %> |
|
| 8 |
|
|
| 9 |
<% form_tag({}) do %>
|
|
| 10 |
<table class="list"> |
|
| 11 |
<thead> |
|
| 12 |
<tr> |
|
| 13 |
<th><%= l(:field_login) %></th> |
|
| 14 |
<th><%= l(:label_user) %></th> |
|
| 15 |
</tr> |
|
| 16 |
</thead> |
|
| 17 |
<tbody> |
|
| 18 |
<% i = 0 -%> |
|
| 19 |
<% @committers.each do |committer, user_id| -%> |
|
| 20 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 21 |
<td><%=h committer %></td> |
|
| 22 |
<td> |
|
| 23 |
<%= hidden_field_tag "committers[#{i}][]", committer %>
|
|
| 24 |
<%= 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) %>
|
|
| 25 |
</td> |
|
| 26 |
</tr> |
|
| 27 |
<% i += 1 -%> |
|
| 28 |
<% end -%> |
|
| 29 |
</tbody> |
|
| 30 |
</table> |
|
| 31 |
<p><%= submit_tag(l(:button_update)) %></p> |
|
| 32 |
<% end %> |
|
| 33 |
|
|
| 34 |
<% end %> |
|
| app/views/repositories/committers.rhtml | ||
|---|---|---|
| 1 |
<h2><%= l(:label_repository) %></h2> |
|
| 2 |
|
|
| 3 |
<%= simple_format(l(:text_repository_usernames_mapping)) %> |
|
| 4 |
|
|
| 5 |
<% if @committers.empty? %> |
|
| 6 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 7 |
<% else %> |
|
| 8 |
|
|
| 9 |
<% form_tag({}) do %>
|
|
| 10 |
<table class="list"> |
|
| 11 |
<thead> |
|
| 12 |
<tr> |
|
| 13 |
<th><%= l(:field_login) %></th> |
|
| 14 |
<th><%= l(:label_user) %></th> |
|
| 15 |
</tr> |
|
| 16 |
</thead> |
|
| 17 |
<tbody> |
|
| 18 |
<% i = 0 -%> |
|
| 19 |
<% @committers.each do |committer, user_id| -%> |
|
| 20 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 21 |
<td><%=h committer %></td> |
|
| 22 |
<td> |
|
| 23 |
<%= hidden_field_tag "committers[#{i}][]", committer %>
|
|
| 24 |
<%= 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) %>
|
|
| 25 |
</td> |
|
| 26 |
</tr> |
|
| 27 |
<% i += 1 -%> |
|
| 28 |
<% end -%> |
|
| 29 |
</tbody> |
|
| 30 |
</table> |
|
| 31 |
<p><%= submit_tag(l(:button_update)) %></p> |
|
| 32 |
<% end %> |
|
| 33 |
|
|
| 34 |
<% end %> |
|
| app/views/repositories/diff.html.erb | ||
|---|---|---|
| 1 |
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2> |
|
| 2 |
|
|
| 3 |
<!-- Choose view type --> |
|
| 4 |
<% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
|
|
| 5 |
<%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
|
|
| 6 |
<%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
|
|
| 7 |
<p> |
|
| 8 |
<label><%= l(:label_view_diff) %></label> |
|
| 9 |
<%= select_tag 'type', |
|
| 10 |
options_for_select( |
|
| 11 |
[[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), |
|
| 12 |
:onchange => "if (this.value != '') {this.form.submit()}" %>
|
|
| 13 |
</p> |
|
| 14 |
<% end %> |
|
| 15 |
|
|
| 16 |
<% cache(@cache_key) do -%> |
|
| 17 |
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
|
|
| 18 |
<% end -%> |
|
| 19 |
|
|
| 20 |
<% other_formats_links do |f| %> |
|
| 21 |
<%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %> |
|
| 22 |
<% end %> |
|
| 23 |
|
|
| 24 |
<% html_title(with_leading_slash(@path), 'Diff') -%> |
|
| 25 |
|
|
| 26 |
<% content_for :header_tags do %> |
|
| 27 |
<%= stylesheet_link_tag "scm" %> |
|
| 28 |
<% end %> |
|
| app/views/repositories/diff.rhtml | ||
|---|---|---|
| 1 |
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2> |
|
| 2 |
|
|
| 3 |
<!-- Choose view type --> |
|
| 4 |
<% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
|
|
| 5 |
<%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
|
|
| 6 |
<%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
|
|
| 7 |
<p><label><%= l(:label_view_diff) %></label> |
|
| 8 |
<%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %></p>
|
|
| 9 |
<% end %> |
|
| 10 |
|
|
| 11 |
<% cache(@cache_key) do -%> |
|
| 12 |
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
|
|
| 13 |
<% end -%> |
|
| 14 |
|
|
| 15 |
<% other_formats_links do |f| %> |
|
| 16 |
<%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %> |
|
| 17 |
<% end %> |
|
| 18 |
|
|
| 19 |
<% html_title(with_leading_slash(@path), 'Diff') -%> |
|
| 20 |
|
|
| 21 |
<% content_for :header_tags do %> |
|
| 22 |
<%= stylesheet_link_tag "scm" %> |
|
| 23 |
<% end %> |
|
| app/views/repositories/entry.html.erb | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
|
| 8 |
|
|
| 9 |
<p><%= render :partial => 'link_to_functions' %></p> |
|
| 10 |
|
|
| 11 |
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
|
| 12 |
|
|
| 13 |
<% content_for :header_tags do %> |
|
| 14 |
<%= stylesheet_link_tag "scm" %> |
|
| 15 |
<% end %> |
|
| app/views/repositories/entry.rhtml | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
|
| 8 |
|
|
| 9 |
<p><%= render :partial => 'link_to_functions' %></p> |
|
| 10 |
|
|
| 11 |
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
|
| 12 |
|
|
| 13 |
<% content_for :header_tags do %> |
|
| 14 |
<%= stylesheet_link_tag "scm" %> |
|
| 15 |
<% end %> |
|
| app/views/repositories/revision.html.erb | ||
|---|---|---|
| 1 |
<div class="contextual"> |
|
| 2 |
|
|
| 3 |
<%= link_to_revision_archive(@repository, @changeset, @project, { :text => l(:label_download_revision), :class => 'icon icon-package' }) %>
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
« |
|
| 7 |
<% unless @changeset.previous.nil? -%> |
|
| 8 |
<%= link_to_revision(@changeset.previous, @project, :text => l(:label_previous)) %> |
|
| 9 |
<% else -%> |
|
| 10 |
<%= l(:label_previous) %> |
|
| 11 |
<% end -%> |
|
| 12 |
|
|
| 13 |
<% unless @changeset.next.nil? -%> |
|
| 14 |
<%= link_to_revision(@changeset.next, @project, :text => l(:label_next)) %> |
|
| 15 |
<% else -%> |
|
| 16 |
<%= l(:label_next) %> |
|
| 17 |
<% end -%> |
|
| 18 |
» |
|
| 19 |
|
|
| 20 |
<% form_tag({:controller => 'repositories',
|
|
| 21 |
:action => 'revision', |
|
| 22 |
:id => @project, |
|
| 23 |
:rev => nil}, |
|
| 24 |
:method => :get) do %> |
|
| 25 |
<%= text_field_tag 'rev', @rev, :size => 8 %> |
|
| 26 |
<%= submit_tag 'OK', :name => nil %> |
|
| 27 |
<% end %> |
|
| 28 |
|
|
| 29 |
</div> |
|
| 30 |
|
|
| 31 |
<h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2> |
|
| 32 |
|
|
| 33 |
<table class="revision-info"> |
|
| 34 |
<% if @changeset.scmid %> |
|
| 35 |
<tr> |
|
| 36 |
<td>ID</td><td><%= h(@changeset.scmid) %></td> |
|
| 37 |
</tr> |
|
| 38 |
<% end %> |
|
| 39 |
<% unless @changeset.parents.blank? %> |
|
| 40 |
<tr> |
|
| 41 |
<td><%= l(:label_parent_revision) %></td> |
|
| 42 |
<td> |
|
| 43 |
<%= @changeset.parents.collect{
|
|
| 44 |
|p| link_to_revision(p, @project, :text => format_revision(p)) |
|
| 45 |
}.join(", ") %>
|
|
| 46 |
</td> |
|
| 47 |
</tr> |
|
| 48 |
<% end %> |
|
| 49 |
<% unless @changeset.children.blank? %> |
|
| 50 |
<tr> |
|
| 51 |
<td><%= l(:label_child_revision) %></td> |
|
| 52 |
<td> |
|
| 53 |
<%= @changeset.children.collect{
|
|
| 54 |
|p| link_to_revision(p, @project, :text => format_revision(p)) |
|
| 55 |
}.join(", ") %>
|
|
| 56 |
</td> |
|
| 57 |
</tr> |
|
| 58 |
<% end %> |
|
| 59 |
</table> |
|
| 60 |
<p> |
|
| 61 |
<span class="author"> |
|
| 62 |
<%= authoring(@changeset.committed_on, @changeset.author) %> |
|
| 63 |
</span> |
|
| 64 |
</p> |
|
| 65 |
|
|
| 66 |
<%= textilizable @changeset.comments %> |
|
| 67 |
|
|
| 68 |
<% if @changeset.issues.visible.any? %> |
|
| 69 |
<h3><%= l(:label_related_issues) %></h3> |
|
| 70 |
<ul> |
|
| 71 |
<% @changeset.issues.visible.each do |issue| %> |
|
| 72 |
<li><%= link_to_issue issue %></li> |
|
| 73 |
<% end %> |
|
| 74 |
</ul> |
|
| 75 |
<% end %> |
|
| 76 |
|
|
| 77 |
<% if User.current.allowed_to?(:browse_repository, @project) %> |
|
| 78 |
<h3><%= l(:label_attachment_plural) %></h3> |
|
| 79 |
<ul id="changes-legend"> |
|
| 80 |
<li class="change change-A"><%= l(:label_added) %></li> |
|
| 81 |
<li class="change change-M"><%= l(:label_modified) %></li> |
|
| 82 |
<li class="change change-C"><%= l(:label_copied) %></li> |
|
| 83 |
<li class="change change-R"><%= l(:label_renamed) %></li> |
|
| 84 |
<li class="change change-D"><%= l(:label_deleted) %></li> |
|
| 85 |
</ul> |
|
| 86 |
|
|
| 87 |
<p><%= link_to(l(:label_view_diff), |
|
| 88 |
:action => 'diff', |
|
| 89 |
:id => @project, |
|
| 90 |
:path => "", |
|
| 91 |
:rev => @changeset.identifier) if @changeset.changes.any? %></p> |
|
| 92 |
|
|
| 93 |
<div class="changeset-changes"> |
|
| 94 |
<%= render_changeset_changes %> |
|
| 95 |
</div> |
|
| 96 |
<% end %> |
|
| 97 |
|
|
| 98 |
<% content_for :header_tags do %> |
|
| 99 |
<%= stylesheet_link_tag "scm" %> |
|
| 100 |
<% end %> |
|
| 101 |
|
|
| 102 |
<% html_title("#{l(:label_revision)} #{format_revision(@changeset)}") -%>
|
|
| app/views/repositories/revision.rhtml | ||
|---|---|---|
| 1 |
<div class="contextual"> |
|
| 2 |
|
|
| 3 |
<%= link_to_revision_archive(@repository, @changeset, @project, { :text => l(:label_download_revision), :class => 'icon icon-package' }) %>
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
« |
|
| 7 |
<% unless @changeset.previous.nil? -%> |
|
| 8 |
<%= link_to_revision(@changeset.previous, @project, :text => l(:label_previous)) %> |
|
| 9 |
<% else -%> |
|
| 10 |
<%= l(:label_previous) %> |
|
| 11 |
<% end -%> |
|
| 12 |
|
|
| 13 |
<% unless @changeset.next.nil? -%> |
|
| 14 |
<%= link_to_revision(@changeset.next, @project, :text => l(:label_next)) %> |
|
| 15 |
<% else -%> |
|
| 16 |
<%= l(:label_next) %> |
|
| 17 |
<% end -%> |
|
| 18 |
» |
|
| 19 |
|
|
| 20 |
<% form_tag({:controller => 'repositories',
|
|
| 21 |
:action => 'revision', |
|
| 22 |
:id => @project, |
|
| 23 |
:rev => nil}, |
|
| 24 |
:method => :get) do %> |
|
| 25 |
<%= text_field_tag 'rev', @rev, :size => 8 %> |
|
| 26 |
<%= submit_tag 'OK', :name => nil %> |
|
| 27 |
<% end %> |
|
| 28 |
|
|
| 29 |
</div> |
|
| 30 |
|
|
| 31 |
<h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2> |
|
| 32 |
|
|
| 33 |
<p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %> |
|
| 34 |
<span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p> |
|
| 35 |
|
|
| 36 |
<%= textilizable @changeset.comments %> |
|
| 37 |
|
|
| 38 |
<% if @changeset.issues.visible.any? %> |
|
| 39 |
<h3><%= l(:label_related_issues) %></h3> |
|
| 40 |
<ul> |
|
| 41 |
<% @changeset.issues.visible.each do |issue| %> |
|
| 42 |
<li><%= link_to_issue issue %></li> |
|
| 43 |
<% end %> |
|
| 44 |
</ul> |
|
| 45 |
<% end %> |
|
| 46 |
|
|
| 47 |
<% if User.current.allowed_to?(:browse_repository, @project) %> |
|
| 48 |
<h3><%= l(:label_attachment_plural) %></h3> |
|
| 49 |
<ul id="changes-legend"> |
|
| 50 |
<li class="change change-A"><%= l(:label_added) %></li> |
|
| 51 |
<li class="change change-M"><%= l(:label_modified) %></li> |
|
| 52 |
<li class="change change-C"><%= l(:label_copied) %></li> |
|
| 53 |
<li class="change change-R"><%= l(:label_renamed) %></li> |
|
| 54 |
<li class="change change-D"><%= l(:label_deleted) %></li> |
|
| 55 |
</ul> |
|
| 56 |
|
|
| 57 |
<p><%= link_to(l(:label_view_diff), |
|
| 58 |
:action => 'diff', |
|
| 59 |
:id => @project, |
|
| 60 |
:path => "", |
|
| 61 |
:rev => @changeset.identifier) if @changeset.changes.any? %></p> |
|
| 62 |
|
|
| 63 |
<div class="changeset-changes"> |
|
| 64 |
<%= render_changeset_changes %> |
|
| 65 |
</div> |
|
| 66 |
<% end %> |
|
| 67 |
|
|
| 68 |
<% content_for :header_tags do %> |
|
| 69 |
<%= stylesheet_link_tag "scm" %> |
|
| 70 |
<% end %> |
|
| 71 |
|
|
| 72 |
<% html_title("#{l(:label_revision)} #{format_revision(@changeset)}") -%>
|
|
| app/views/repositories/revisions.html.erb | ||
|---|---|---|
| 1 |
<div class="contextual"> |
|
| 2 |
<% form_tag({:action => 'revision', :id => @project}) do %>
|
|
| 3 |
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 8 %> |
|
| 4 |
<%= submit_tag 'OK' %> |
|
| 5 |
<% end %> |
|
| 6 |
</div> |
|
| 7 |
|
|
| 8 |
<h2><%= l(:label_revision_plural) %></h2> |
|
| 9 |
|
|
| 10 |
<%= render :partial => 'revisions', |
|
| 11 |
:locals => {:project => @project,
|
|
| 12 |
:path => '', |
|
| 13 |
:revisions => @changesets, |
|
| 14 |
:entry => nil } %> |
|
| 15 |
|
|
| 16 |
<p class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></p> |
|
| 17 |
|
|
| 18 |
<% content_for :header_tags do %> |
|
| 19 |
<%= stylesheet_link_tag "scm" %> |
|
| 20 |
<%= auto_discovery_link_tag( |
|
| 21 |
:atom, |
|
| 22 |
params.merge( |
|
| 23 |
{:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
|
| 24 |
<% end %> |
|
| 25 |
|
|
| 26 |
<% other_formats_links do |f| %> |
|
| 27 |
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
| 28 |
<% end %> |
|
| 29 |
|
|
| 30 |
<% html_title(l(:label_revision_plural)) -%> |
|
| app/views/repositories/revisions.rhtml | ||
|---|---|---|
| 1 |
<div class="contextual"> |
|
| 2 |
<% form_tag({:action => 'revision', :id => @project}) do %>
|
|
| 3 |
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 8 %> |
|
| 4 |
<%= submit_tag 'OK' %> |
|
| 5 |
<% end %> |
|
| 6 |
</div> |
|
| 7 |
|
|
| 8 |
<h2><%= l(:label_revision_plural) %></h2> |
|
| 9 |
|
|
| 10 |
<%= render :partial => 'revisions', |
|
| 11 |
:locals => {:project => @project,
|
|
| 12 |
:path => '', |
|
| 13 |
:revisions => @changesets, |
|
| 14 |
:entry => nil } %> |
|
| 15 |
|
|
| 16 |
<p class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></p> |
|
| 17 |
|
|
| 18 |
<% content_for :header_tags do %> |
|
| 19 |
<%= stylesheet_link_tag "scm" %> |
|
| 20 |
<%= auto_discovery_link_tag( |
|
| 21 |
:atom, |
|
| 22 |
params.merge( |
|
| 23 |
{:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
|
| 24 |
<% end %> |
|
| 25 |
|
|
| 26 |
<% other_formats_links do |f| %> |
|
| 27 |
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
| 28 |
<% end %> |
|
| 29 |
|
|
| 30 |
<% html_title(l(:label_revision_plural)) -%> |
|
| app/views/repositories/show.html.erb | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
|
|
| 8 |
|
|
| 9 |
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
|
| 10 |
<%= render :partial => 'dir_list' %> |
|
| 11 |
<% end %> |
|
| 12 |
|
|
| 13 |
<%= render_properties(@properties) %> |
|
| 14 |
|
|
| 15 |
<% if authorize_for('repositories', 'revisions') %>
|
|
| 16 |
<% if @changesets && !@changesets.empty? %> |
|
| 17 |
<h3><%= l(:label_latest_revision_plural) %></h3> |
|
| 18 |
<%= render :partial => 'revisions', |
|
| 19 |
:locals => {:project => @project, :path => @path,
|
|
| 20 |
:revisions => @changesets, :entry => nil }%> |
|
| 21 |
<% end %> |
|
| 22 |
<p> |
|
| 23 |
<% |
|
| 24 |
has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) |
|
| 25 |
sep = '' |
|
| 26 |
%> |
|
| 27 |
<% if @repository.supports_all_revisions? && @path.blank? %> |
|
| 28 |
<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project %> |
|
| 29 |
<% sep = '|' %> |
|
| 30 |
<% end %> |
|
| 31 |
<% |
|
| 32 |
if @repository.supports_directory_revisions? && |
|
| 33 |
( has_branches || !@path.blank? || !@rev.blank? ) |
|
| 34 |
%> |
|
| 35 |
<%= sep %> |
|
| 36 |
<%= |
|
| 37 |
link_to l(:label_view_revisions), |
|
| 38 |
:action => 'changes', |
|
| 39 |
:path => to_path_param(@path), |
|
| 40 |
:id => @project, |
|
| 41 |
:rev => @rev |
|
| 42 |
%> |
|
| 43 |
<% end %> |
|
| 44 |
</p> |
|
| 45 |
|
|
| 46 |
<% if true # @path.blank? %> |
|
| 47 |
<% content_for :header_tags do %> |
|
| 48 |
<%= auto_discovery_link_tag( |
|
| 49 |
:atom, params.merge( |
|
| 50 |
{:format => 'atom', :action => 'revisions',
|
|
| 51 |
:id => @project, :page => nil, :key => User.current.rss_key})) %> |
|
| 52 |
<% end %> |
|
| 53 |
|
|
| 54 |
<p class="statistics"> |
|
| 55 |
<%= link_to l(:label_statistics), {:action => 'stats', :id => @project}, :class => 'icon icon-stats' %>
|
|
| 56 |
</p> |
|
| 57 |
|
|
| 58 |
<% other_formats_links do |f| %> |
|
| 59 |
<%= f.link_to 'Atom', :url => {:action => 'revisions', :id => @project, :key => User.current.rss_key} %>
|
|
| 60 |
<% end %> |
|
| 61 |
|
|
| 62 |
<% end %> |
|
| 63 |
<% end %> |
|
| 64 |
|
|
| 65 |
<% content_for :header_tags do %> |
|
| 66 |
<%= stylesheet_link_tag "scm" %> |
|
| 67 |
<% end %> |
|
| 68 |
|
|
| 69 |
<% html_title(l(:label_repository)) -%> |
|
| app/views/repositories/show.rhtml | ||
|---|---|---|
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|
| 2 |
|
|
| 3 |
<div class="contextual"> |
|
| 4 |
<%= render :partial => 'navigation' %> |
|
| 5 |
</div> |
|
| 6 |
|
|
| 7 |
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
|
|
| 8 |
|
|
| 9 |
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
|
| 10 |
<%= render :partial => 'dir_list' %> |
|
| 11 |
<% end %> |
|
| 12 |
|
|
| 13 |
<%= render_properties(@properties) %> |
|
| 14 |
|
|
| 15 |
<% if authorize_for('repositories', 'revisions') %>
|
|
| 16 |
<% if @changesets && !@changesets.empty? %> |
|
| 17 |
<h3><%= l(:label_latest_revision_plural) %></h3> |
|
| 18 |
<%= render :partial => 'revisions', |
|
| 19 |
:locals => {:project => @project, :path => @path,
|
|
| 20 |
:revisions => @changesets, :entry => nil }%> |
|
| 21 |
<% end %> |
|
| 22 |
<p> |
|
| 23 |
<% |
|
| 24 |
has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) |
|
| 25 |
sep = '' |
|
| 26 |
%> |
|
| 27 |
<% if @repository.supports_all_revisions? && @path.blank? %> |
|
| 28 |
<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project %> |
|
| 29 |
<% sep = '|' %> |
|
| 30 |
<% end %> |
|
| 31 |
<% |
|
| 32 |
if @repository.supports_directory_revisions? && |
|
| 33 |
( has_branches || !@path.blank? || !@rev.blank? ) |
|
| 34 |
%> |
|
| 35 |
<%= sep %> |
|
| 36 |
<%= |
|
| 37 |
link_to l(:label_view_revisions), |
|
| 38 |
:action => 'changes', |
|
| 39 |
:path => to_path_param(@path), |
|
| 40 |
:id => @project, |
|
| 41 |
:rev => @rev |
|
| 42 |
%> |
|
| 43 |
<% end %> |
|
| 44 |
</p> |
|
| 45 |
|
|
| 46 |
<% if true # @path.blank? %> |
|
| 47 |
<% content_for :header_tags do %> |
|
| 48 |
<%= auto_discovery_link_tag( |
|
| 49 |
:atom, params.merge( |
|
| 50 |
{:format => 'atom', :action => 'revisions',
|
|
| 51 |
:id => @project, :page => nil, :key => User.current.rss_key})) %> |
|
| 52 |
<% end %> |
|
| 53 |
|
|
| 54 |
<p class="statistics"> |
|
| 55 |
<%= link_to l(:label_statistics), {:action => 'stats', :id => @project}, :class => 'icon icon-stats' %>
|
|
| 56 |
</p> |
|
| 57 |
|
|
| 58 |
<% other_formats_links do |f| %> |
|
| 59 |
<%= f.link_to 'Atom', :url => {:action => 'revisions', :id => @project, :key => User.current.rss_key} %>
|
|
| 60 |
<% end %> |
|
| 61 |
|
|
| 62 |
<% end %> |
|
| 63 |
<% end %> |
|
| 64 |
|
|
| 65 |
<% content_for :header_tags do %> |
|
| 66 |
<%= stylesheet_link_tag "scm" %> |
|
| 67 |
<% end %> |
|
| 68 |
|
|
| 69 |
<% html_title(l(:label_repository)) -%> |
|
| app/views/repositories/stats.html.erb | ||
|---|---|---|
| 1 |
<h2><%= l(:label_statistics) %></h2> |
|
| 2 |
|
|
| 3 |
<p> |
|
| 4 |
<%= tag("embed", :width => 800, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_month")) %>
|
|
| 5 |
</p> |
|
| 6 |
<p> |
|
| 7 |
<%= tag("embed", :width => 800, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_author")) %>
|
|
| 8 |
</p> |
|
| 9 |
|
|
| 10 |
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p> |
|
| 11 |
|
|
| 12 |
<% html_title(l(:label_repository), l(:label_statistics)) -%> |
|
| app/views/repositories/stats.rhtml | ||
|---|---|---|
| 1 |
<h2><%= l(:label_statistics) %></h2> |
|
| 2 |
|
|
| 3 |
<p> |
|
| 4 |
<%= tag("embed", :width => 800, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_month")) %>
|
|
| 5 |
</p> |
|
| 6 |
<p> |
|
| 7 |
<%= tag("embed", :width => 800, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_author")) %>
|
|
| 8 |
</p> |
|
| 9 |
|
|
| 10 |
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p> |
|
| 11 |
|
|
| 12 |
<% html_title(l(:label_repository), l(:label_statistics)) -%> |
|
Also available in: Unified diff