Adds a branch for unlimited project hierarchy.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2148 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<table class="list entries" id="browser">
|
||||
<thead>
|
||||
<tr id="root">
|
||||
<th><%= l(:field_name) %></th>
|
||||
<th><%= l(:field_filesize) %></th>
|
||||
<th><%= l(:label_revision) %></th>
|
||||
<th><%= l(:label_age) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render :partial => 'dir_list_content' %>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,24 @@
|
||||
<% @entries.each do |entry| %>
|
||||
<% tr_id = Digest::MD5.hexdigest(entry.path)
|
||||
depth = params[:depth].to_i %>
|
||||
<tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry <%= entry.kind %>">
|
||||
<td style="padding-left: <%=18 * depth%>px;" class="filename">
|
||||
<% if entry.is_dir? %>
|
||||
<span class="expander" onclick="<%= remote_function :url => {:action => 'browse', :id => @project, :path => to_path_param(entry.path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
|
||||
:update => { :success => tr_id },
|
||||
:position => :after,
|
||||
:success => "scmEntryLoaded('#{tr_id}')",
|
||||
:condition => "scmEntryClick('#{tr_id}')"%>"> </span>
|
||||
<% end %>
|
||||
<%= link_to h(entry.name),
|
||||
{:action => (entry.is_dir? ? 'browse' : 'changes'), :id => @project, :path => to_path_param(entry.path), :rev => @rev},
|
||||
:class => (entry.is_dir? ? 'icon icon-folder' : 'icon icon-file')%>
|
||||
</td>
|
||||
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
|
||||
<% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
|
||||
<td class="revision"><%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td>
|
||||
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
|
||||
<td class="author"><%= changeset.nil? ? h(entry.lastrev.author.to_s.split('<').first) : changeset.author if entry.lastrev %></td>
|
||||
<td class="comments"><%=h truncate(changeset.comments, 50) unless changeset.nil? %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -0,0 +1,21 @@
|
||||
<%= link_to 'root', :action => 'browse', :id => @project, :path => '', :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 h(dir), :action => 'browse', :id => @project, :path => to_path_param(link_path), :rev => @rev %>
|
||||
<% end %>
|
||||
<% if filename %>
|
||||
/ <%= link_to h(filename), :action => 'changes', :id => @project, :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
||||
<% end %>
|
||||
|
||||
<%= "@ #{revision}" if revision %>
|
||||
|
||||
<% html_title(with_leading_slash(path)) -%>
|
||||
@@ -0,0 +1,28 @@
|
||||
<% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :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 = entry && entry.is_file? && revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
||||
<td class="id"><%= link_to format_revision(changeset.revision), :action => 'revision', :id => project, :rev => changeset.revision %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.revision, (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>
|
||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||
<td class="author"><%=h changeset.author %></td>
|
||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,28 @@
|
||||
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||||
|
||||
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
||||
|
||||
<div class="autoscroll">
|
||||
<table class="filecontent annotate CodeRay">
|
||||
<tbody>
|
||||
<% line_num = 1 %>
|
||||
<% syntax_highlight(@path, to_utf8(@annotate.content)).each_line do |line| %>
|
||||
<% revision = @annotate.revisions[line_num-1] %>
|
||||
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>">
|
||||
<th class="line-num"><%= line_num %></th>
|
||||
<td class="revision">
|
||||
<%= (revision.identifier ? link_to(format_revision(revision.identifier), :action => 'revision', :id => @project, :rev => revision.identifier) : format_revision(revision.revision)) if revision %></td>
|
||||
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td>
|
||||
<td class="line-code"><pre><%= line %></pre></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:button_annotate)) -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag 'scm' %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class="contextual">
|
||||
<% form_tag do %>
|
||||
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
|
||||
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,19 @@
|
||||
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
|
||||
|
||||
<p>
|
||||
<% if @repository.supports_cat? %>
|
||||
<%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
||||
<% end %>
|
||||
<% if @repository.supports_annotate? %>
|
||||
<%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => to_path_param(@path), :rev => @rev } %> |
|
||||
<% end %>
|
||||
<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => to_path_param(@path), :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
|
||||
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
||||
</p>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<%= render(:partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
|
||||
|
||||
<% html_title(l(:label_change_plural)) -%>
|
||||
@@ -0,0 +1,34 @@
|
||||
<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 class="<%= cycle 'odd', 'even' %>">
|
||||
<td><%=h committer %></td>
|
||||
<td>
|
||||
<%= hidden_field_tag "committers[#{i}][]", committer %>
|
||||
<%= 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_update)) %></p>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
@@ -0,0 +1,27 @@
|
||||
<h2><%= l(:label_revision) %> <%= format_revision(@rev) %> <%= @path.gsub(/^.*\//, '') %></h2>
|
||||
|
||||
<!-- Choose view type -->
|
||||
<% form_tag({ :controller => 'repositories', :action => 'diff'}, :method => 'get') do %>
|
||||
<% params.each do |k, p| %>
|
||||
<% if k != "type" %>
|
||||
<%= hidden_field_tag(k,p) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<p><label><%= l(:label_view_diff) %></label>
|
||||
<%= 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>
|
||||
<% end %>
|
||||
|
||||
<% cache(@cache_key) do -%>
|
||||
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
|
||||
<% end -%>
|
||||
|
||||
<p class="other-formats">
|
||||
<%= l(:label_export_to) %>
|
||||
<span><%= link_to 'Unified diff', params.merge(:format => 'diff') %></span>
|
||||
</p>
|
||||
|
||||
<% html_title(with_leading_slash(@path), 'Diff') -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,7 @@
|
||||
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||||
|
||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,57 @@
|
||||
<div class="contextual">
|
||||
«
|
||||
<% unless @changeset.previous.nil? -%>
|
||||
<%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
|
||||
<% else -%>
|
||||
<%= l(:label_previous) %>
|
||||
<% end -%>
|
||||
|
|
||||
<% unless @changeset.next.nil? -%>
|
||||
<%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
|
||||
<% else -%>
|
||||
<%= l(:label_next) %>
|
||||
<% end -%>
|
||||
»
|
||||
|
||||
<% form_tag({:controller => 'repositories', :action => 'revision', :id => @project, :rev => nil}, :method => :get) do %>
|
||||
<%= text_field_tag 'rev', @rev, :size => 5 %>
|
||||
<%= submit_tag 'OK', :name => nil %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_revision) %> <%= format_revision(@changeset.revision) %></h2>
|
||||
|
||||
<p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %>
|
||||
<span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p>
|
||||
|
||||
<%= textilizable @changeset.comments %>
|
||||
|
||||
<% if @changeset.issues.any? %>
|
||||
<h3><%= l(:label_related_issues) %></h3>
|
||||
<ul>
|
||||
<% @changeset.issues.each do |issue| %>
|
||||
<li><%= link_to_issue issue %>: <%=h issue.subject %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<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, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p>
|
||||
|
||||
<div class="changeset-changes">
|
||||
<%= render_changeset_changes %>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title("#{l(:label_revision)} #{@changeset.revision}") -%>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="contextual">
|
||||
<% form_tag({:action => 'revision', :id => @project}) do %>
|
||||
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
|
||||
<%= submit_tag 'OK' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_revision_plural) %></h2>
|
||||
|
||||
<%= render :partial => 'revisions', :locals => {:project => @project, :path => '', :revisions => @changesets, :entry => nil }%>
|
||||
|
||||
<p class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></p>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
|
||||
<p class="other-formats">
|
||||
<%= l(:label_export_to) %>
|
||||
<span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
|
||||
</p>
|
||||
|
||||
<% html_title(l(:label_revision_plural)) -%>
|
||||
@@ -0,0 +1,35 @@
|
||||
<div class="contextual">
|
||||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
<%= link_to l(:label_statistics), {:action => 'stats', :id => @project}, :class => 'icon icon-stats' %>
|
||||
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') -%>
|
||||
<% form_tag(:action => 'browse', :id => @project) do -%>
|
||||
| <%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<h2><%= l(:label_repository) %> (<%= @repository.scm_name %>)</h2>
|
||||
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
|
||||
<% if !@changesets.empty? && authorize_for('repositories', 'revisions') %>
|
||||
<h3><%= l(:label_latest_revision_plural) %></h3>
|
||||
<%= render :partial => 'revisions', :locals => {:project => @project, :path => '', :revisions => @changesets, :entry => nil }%>
|
||||
<p><%= link_to l(:label_view_revisions), :action => 'revisions', :id => @project %></p>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :action => 'revisions', :id => @project, :page => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
<p class="other-formats">
|
||||
<%= l(:label_export_to) %>
|
||||
<span><%= link_to 'Atom', {:action => 'revisions', :id => @project, :format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_repository)) -%>
|
||||
@@ -0,0 +1,12 @@
|
||||
<h2><%= l(:label_statistics) %></h2>
|
||||
|
||||
<p>
|
||||
<%= tag("embed", :width => 800, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_month")) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= tag("embed", :width => 800, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :graph => "commits_per_author")) %>
|
||||
</p>
|
||||
|
||||
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
||||
|
||||
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
||||
Reference in New Issue
Block a user