svn browser merged in trunk

git-svn-id: http://redmine.rubyforge.org/svn/trunk@106 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2006-12-24 13:38:45 +00:00
1 parent 918123cd06
commit bc44158501
29 files changed
+715 -6

No files matched your search

+2
View File
@@ -91,6 +91,7 @@
<%= link_to l(:label_document_plural), {:controller => 'projects', :action => 'list_documents', :id => @project }, :class => "menuItem" %>
<%= link_to l(:label_member_plural), {:controller => 'projects', :action => 'list_members', :id => @project }, :class => "menuItem" %>
<%= link_to l(:label_attachment_plural), {:controller => 'projects', :action => 'list_files', :id => @project }, :class => "menuItem" %>
<%= link_to l(:label_repository), {:controller => 'repositories', :action => 'show', :id => @project}, :class => "menuItem" if @project.repository and !@project.repository.new_record? %></li>
<%= link_to_if_authorized l(:label_settings), {:controller => 'projects', :action => 'settings', :id => @project }, :class => "menuItem" %>
</div>
<% end %>
@@ -112,6 +113,7 @@
<li><%= link_to l(:label_document_plural), :controller => 'projects', :action => 'list_documents', :id => @project %></li>
<li><%= link_to l(:label_member_plural), :controller => 'projects', :action => 'list_members', :id => @project %></li>
<li><%= link_to l(:label_attachment_plural), :controller => 'projects', :action => 'list_files', :id => @project %></li>
<li><%= link_to l(:label_repository), :controller => 'repositories', :action => 'show', :id => @project if @project.repository and !@project.repository.new_record? %></li>
<li><%= link_to_if_authorized l(:label_settings), :controller => 'projects', :action => 'settings', :id => @project %></li>
</ul>
<% end %>
+12 -1
View File
@@ -1,4 +1,5 @@
<%= error_messages_for 'project' %>
<div class="box">
<!--[form:project]-->
<p><%= f.text_field :name, :required => true %></p>
@@ -22,5 +23,15 @@
<%= custom_field.name %>
<% end %></p>
<% end %>
<!--[eoform:project]-->
<!--[eoform:project]-->
</div>
<div class="box"><h3><%= check_box_tag "repository_enabled", 1, !@project.repository.nil?, :onclick => "Element.toggle('repository');" %> <%= l(:label_repository) %></h3>
<%= hidden_field_tag "repository_enabled", 0 %>
<div id="repository">
<% fields_for :repository, @project.repository, { :builder => TabularFormBuilder, :lang => current_language} do |repository| %>
<p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://)</p>
<% end %>
</div>
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
</div>
+23
View File
@@ -0,0 +1,23 @@
<table class="list">
<thead><tr>
<th><%= l(:field_name) %></th>
<th><%= l(:field_filesize) %></th>
<th><%= l(:label_revision) %></th>
<th><%= l(:field_author) %></th>
<th><%= l(:label_date) %></th>
</tr></thead>
<tbody>
<% total_size = 0
@entries.each do |entry| %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%= link_to h(entry.name), { :action => (entry.is_dir? ? 'browse' : 'revisions'), :id => @project, :path => entry.path, :rev => @rev }, :class => "icon " + (entry.is_dir? ? 'folder' : 'file') %></td>
<td align="right"><%= human_size(entry.size) unless entry.is_dir? %></td>
<td align="right"><%= link_to entry.lastrev.identifier, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier %></td>
<td align="center"><em><%=h entry.lastrev.author %></em></td>
<td align="center"><%= format_time(entry.lastrev.time) %></td>
</tr>
<% total_size += entry.size
end %>
</tbody>
</table>
<p align="right"><em><%= l(:label_total) %>: <%= human_size(total_size) %></em></p>
+18
View File
@@ -0,0 +1,18 @@
<%= 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|
link_path << '/' unless link_path.empty?
link_path << "#{dir}"
%>
/ <%= link_to h(dir), :action => 'browse', :id => @project, :path => link_path, :rev => @rev %>
<% end %>
<% if filename %>
/ <%= link_to h(filename), :action => 'revisions', :id => @project, :path => "#{link_path}/#{filename}", :rev => @rev %>
<% end %>
<%= "@ #{revision}" if revision %>
+11
View File
@@ -0,0 +1,11 @@
<%= stylesheet_link_tag "scm" %>
<div class="contextual">
<%= start_form_tag %>
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
<%= submit_tag 'OK' %>
</div>
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
<%= render :partial => 'dir_list' %>
+55
View File
@@ -0,0 +1,55 @@
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
<%= stylesheet_link_tag "scm" %>
<table class="list">
<thead><tr><th>@<%= @rev %></th><th>@<%= @rev_to %></th><th></th></tr></thead>
<tbody>
<% parsing = false
line_num_l = 0
line_num_r = 0 %>
<% @diff.each do |line| %>
<%
if line =~ /^@@ (\+|\-)(\d+),\d+ (\+|\-)(\d+),\d+ @@/
line_num_l = $2.to_i
line_num_r = $4.to_i
if parsing %>
<tr class="spacing"><td colspan="3">&nbsp;</td></tr>
<% end
parsing = true
next
end
next unless parsing
%>
<tr>
<% case line[0, 1]
when " " %>
<th class="line-num"><%= line_num_l %></th>
<th class="line-num"><%= line_num_r %></th>
<td class="line-code">
<% line_num_l = line_num_l + 1
line_num_r = line_num_r + 1
when "-" %>
<th class="line-num"></th>
<th class="line-num"><%= line_num_r %></th>
<td class="line-code" style="background: #fdd;">
<% line_num_r = line_num_r + 1
when "+" %>
<th class="line-num"><%= line_num_l %></th>
<th class="line-num"></th>
<td class="line-code" style="background: #dfd;">
<% line_num_l = line_num_l + 1
else
next
end %>
<%= h(line[1..-1]).gsub(/\s/, "&nbsp;") %></td></tr>
<% end %>
</tbody>
</table>
+35
View File
@@ -0,0 +1,35 @@
<%= stylesheet_link_tag "scm" %>
<div class="contextual">
<%= start_form_tag %>
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
<%= submit_tag 'OK' %>
</div>
<h2><%= l(:label_revision) %> <%= @revision.identifier %></h2>
<p><em><%= @revision.author %>, <%= format_time(@revision.time) %></em></p>
<%= simple_format @revision.message %>
<div style="float:right;">
<div class="square action_A"></div> <div style="float:left;"><%= l(:label_added) %>&nbsp;</div>
<div class="square action_M"></div> <div style="float:left;"><%= l(:label_modified) %>&nbsp;</div>
<div class="square action_D"></div> <div style="float:left;"><%= l(:label_deleted) %>&nbsp;</div>
</div>
<h3><%= l(:label_attachment_plural) %></h3>
<table class="list">
<tbody>
<% @revision.paths.each do |path| %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><div class="square action_<%= path[:action] %>"></div> <%= path[:path] %></td>
<td>
<% if path[:action] == "M" %>
<%= link_to 'View diff', :action => 'diff', :id => @project, :path => path[:path].gsub(/^\//, ''), :rev => @revision.identifier %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<p><%= lwr(:label_modification, @revision.paths.length) %></p>
+38
View File
@@ -0,0 +1,38 @@
<%= stylesheet_link_tag "scm" %>
<div class="contextual">
<%= start_form_tag %>
<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
<%= submit_tag 'OK' %>
</div>
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => @entry.kind, :revision => @rev } %></h2>
<% if @entry.is_file? %>
<h3><%=h @entry.name %></h3>
<p><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= human_size @entry.size %>)</p>
<% end %>
<h3>Revisions</h3>
<table class="list">
<thead><tr>
<th>#</th>
<th><%= l(:field_author) %></th>
<th><%= l(:label_date) %></th>
<th><%= l(:field_description) %></th>
<th></th>
</tr></thead>
<tbody>
<% @revisions.each do |revision| %>
<tr class="<%= cycle 'odd', 'even' %>">
<th align="center"><%= link_to revision.identifier, :action => 'revision', :id => @project, :rev => revision.identifier %></th>
<td align="center"><em><%=h revision.author %></em></td>
<td align="center"><%= format_time(revision.time) %></td>
<td width="70%"><%= simple_format(h(revision.message)) %></td>
<td align="center"><%= link_to 'Diff', :action => 'diff', :id => @project, :path => @path, :rev => revision.identifier if @entry.is_file? && revision != @revisions.last %></td>
</tr>
<% end %>
</tbody>
</table>
<p><%= lwr(:label_modification, @revisions.length) %></p>
+15
View File
@@ -0,0 +1,15 @@
<%= stylesheet_link_tag "scm" %>
<h2><%= l(:label_repository) %></h2>
<h3><%= l(:label_revision_plural) %></h3>
<% if @latest_revision %>
<p><%= l(:label_latest_revision) %>:
<%= link_to @latest_revision.identifier, :action => 'revision', :id => @project, :rev => @latest_revision.identifier %><br />
<em><%= @latest_revision.author %>, <%= format_time(@latest_revision.time) %></em></p>
<% end %>
<p><%= link_to l(:label_view_revisions), :action => 'revisions', :id => @project %></p>
<h3><%= l(:label_browse) %></h3>
<%= render :partial => 'dir_list' %>