mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Merged r1015, r1019, r1022 to r1025, r1045 and r1047 from trunk.
git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1048 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a2c18b2037
commit
bd7542cf98
@ -1,7 +1,7 @@
|
|||||||
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %>
|
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %>
|
||||||
<select onchange="if (this.value != '') { window.location = this.value; }">
|
<select onchange="if (this.value != '') { window.location = this.value; }">
|
||||||
<option selected><%= l(:label_jump_to_a_project) %></option>
|
<option selected="selected"><%= l(:label_jump_to_a_project) %></option>
|
||||||
<option disabled>---</option>
|
<option disabled="disabled">---</option>
|
||||||
<% user_projects_by_root.keys.sort.each do |root| %>
|
<% user_projects_by_root.keys.sort.each do |root| %>
|
||||||
<%= content_tag('option', h(root.name), :value => url_for(:controller => 'projects', :action => 'show', :id => root)) %>
|
<%= content_tag('option', h(root.name), :value => url_for(:controller => 'projects', :action => 'show', :id => root)) %>
|
||||||
<% user_projects_by_root[root].sort.each do |project| %>
|
<% user_projects_by_root[root].sort.each do |project| %>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title><%=h html_title %></title>
|
<title><%=h html_title %></title>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> <%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang
|
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> <%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<p><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless @project %>
|
<p><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless @project %>
|
||||||
<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
|
<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
|
||||||
<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %></span>
|
<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %>
|
||||||
<br />
|
<br />
|
||||||
<% unless news.summary.blank? %><span class="summary"><%=h news.summary %></span><br /><% end %>
|
<% unless news.summary.blank? %><span class="summary"><%=h news.summary %></span><br /><% end %>
|
||||||
<span class="author"><%= authoring news.created_on, news.author %></p>
|
<span class="author"><%= authoring news.created_on, news.author %></span></p>
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
<%= 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>
|
<%= 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 %>
|
<% end %>
|
||||||
|
|
||||||
<div class="autoscroll">
|
|
||||||
<% cache(@cache_key) do %>
|
<% cache(@cache_key) do %>
|
||||||
<% @diff.each do |table_file| %>
|
<% @diff.each do |table_file| %>
|
||||||
|
<div class="autoscroll">
|
||||||
<% if @diff_type == 'sbs' %>
|
<% if @diff_type == 'sbs' %>
|
||||||
<table class="filecontent CodeRay">
|
<table class="filecontent CodeRay">
|
||||||
<thead>
|
<thead>
|
||||||
@ -84,9 +84,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
<%= stylesheet_link_tag "scm" %>
|
<%= stylesheet_link_tag "scm" %>
|
||||||
|
|||||||
@ -24,12 +24,6 @@
|
|||||||
|
|
||||||
<%= link_to_attachments @page.attachments, :delete_url => (authorize_for('wiki', 'destroy_attachment') ? {:controller => 'wiki', :action => 'destroy_attachment', :page => @page.title} : nil) %>
|
<%= link_to_attachments @page.attachments, :delete_url => (authorize_for('wiki', 'destroy_attachment') ? {:controller => 'wiki', :action => 'destroy_attachment', :page => @page.title} : nil) %>
|
||||||
|
|
||||||
<div class="contextual">
|
|
||||||
<%= l(:label_export_to) %>
|
|
||||||
<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
|
|
||||||
<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if authorize_for('wiki', 'add_attachment') %>
|
<% if authorize_for('wiki', 'add_attachment') %>
|
||||||
<p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
|
<p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
|
||||||
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
|
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
|
||||||
@ -38,6 +32,13 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<div class="contextual">
|
||||||
|
<%= l(:label_export_to) %>
|
||||||
|
<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
|
||||||
|
<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
<%= stylesheet_link_tag 'scm' %>
|
<%= stylesheet_link_tag 'scm' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@ -112,7 +112,7 @@ module Redmine
|
|||||||
:author => changeset[:user],
|
:author => changeset[:user],
|
||||||
:time => Time.parse(changeset[:date]),
|
:time => Time.parse(changeset[:date]),
|
||||||
:message => changeset[:description],
|
:message => changeset[:description],
|
||||||
:paths => changeset[:files].split.collect{|path| {:action => 'X', :path => "/#{path}"}}
|
:paths => changeset[:files].to_s.split.collect{|path| {:action => 'X', :path => "/#{path}"}}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
return nil if $? && $?.exitstatus != 0
|
return nil if $? && $?.exitstatus != 0
|
||||||
|
|||||||
@ -69,4 +69,8 @@ module ApplicationHelper
|
|||||||
super((@current_theme && @current_theme.stylesheets.include?(source)) ?
|
super((@current_theme && @current_theme.stylesheets.include?(source)) ?
|
||||||
"/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
|
"/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def path_to_stylesheet(source)
|
||||||
|
stylesheet_path source
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -39,6 +39,9 @@ ContextMenu.prototype = {
|
|||||||
this.selection = tr;
|
this.selection = tr;
|
||||||
var id = tr.id.substring(6, tr.id.length);
|
var id = tr.id.substring(6, tr.id.length);
|
||||||
/* TODO: do not hard code path */
|
/* TODO: do not hard code path */
|
||||||
new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){Effect.Appear('context-menu', {duration: 0.20})}})
|
new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){
|
||||||
|
Effect.Appear('context-menu', {duration: 0.20});
|
||||||
|
if (window.parseStylesheets) { window.parseStylesheets(); }
|
||||||
|
}})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,7 +123,7 @@ hr { width: 100%; height: 1px; background: #ccc; border: 0;}
|
|||||||
textarea.wiki-edit { width: 99%; }
|
textarea.wiki-edit { width: 99%; }
|
||||||
li p {margin-top: 0;}
|
li p {margin-top: 0;}
|
||||||
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
|
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
|
||||||
.autoscroll {overflow-x: auto; padding:1px; width:100%;}
|
.autoscroll {overflow-x: auto; padding:1px; width:100%; margin-bottom: 1.2em;}
|
||||||
#user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
|
#user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
|
||||||
|
|
||||||
/***** Tabular forms ******/
|
/***** Tabular forms ******/
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
#context-menu li.folder ul {
|
#context-menu li.folder ul {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
left:128px; /* IE */
|
left:168px; /* IE6 */
|
||||||
top:-2px;
|
top:-2px;
|
||||||
}
|
}
|
||||||
#context-menu li.folder>ul { left:148px; }
|
#context-menu li.folder>ul { left:148px; }
|
||||||
|
|||||||
@ -117,4 +117,6 @@ function getElementsBySelect(rule) {
|
|||||||
|
|
||||||
return nodes;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.parseStylesheets = parseStylesheets;
|
||||||
</script>
|
</script>
|
||||||
@ -35,83 +35,88 @@ class RepositoriesMercurialControllerTest < Test::Unit::TestCase
|
|||||||
Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
|
Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show
|
if File.directory?(REPOSITORY_PATH)
|
||||||
get :show, :id => 3
|
def test_show
|
||||||
assert_response :success
|
get :show, :id => 3
|
||||||
assert_template 'show'
|
assert_response :success
|
||||||
assert_not_nil assigns(:entries)
|
assert_template 'show'
|
||||||
assert_not_nil assigns(:changesets)
|
assert_not_nil assigns(:entries)
|
||||||
end
|
assert_not_nil assigns(:changesets)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_browse_root
|
||||||
|
get :browse, :id => 3
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'browse'
|
||||||
|
assert_not_nil assigns(:entries)
|
||||||
|
assert_equal 3, assigns(:entries).size
|
||||||
|
assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'}
|
||||||
|
assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'}
|
||||||
|
assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'}
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_browse_directory
|
||||||
|
get :browse, :id => 3, :path => ['images']
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'browse'
|
||||||
|
assert_not_nil assigns(:entries)
|
||||||
|
assert_equal 2, assigns(:entries).size
|
||||||
|
entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
|
||||||
|
assert_not_nil entry
|
||||||
|
assert_equal 'file', entry.kind
|
||||||
|
assert_equal 'images/edit.png', entry.path
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_changes
|
||||||
|
get :changes, :id => 3, :path => ['images', 'edit.png']
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'changes'
|
||||||
|
assert_tag :tag => 'h2', :content => 'edit.png'
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_entry_show
|
||||||
|
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'entry'
|
||||||
|
# Line 19
|
||||||
|
assert_tag :tag => 'th',
|
||||||
|
:content => /10/,
|
||||||
|
:attributes => { :class => /line-num/ },
|
||||||
|
:sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_entry_download
|
||||||
|
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
|
||||||
|
assert_response :success
|
||||||
|
# File content
|
||||||
|
assert @response.body.include?('WITHOUT ANY WARRANTY')
|
||||||
|
end
|
||||||
|
|
||||||
def test_browse_root
|
def test_diff
|
||||||
get :browse, :id => 3
|
# Full diff of changeset 4
|
||||||
assert_response :success
|
get :diff, :id => 3, :rev => 4
|
||||||
assert_template 'browse'
|
assert_response :success
|
||||||
assert_not_nil assigns(:entries)
|
assert_template 'diff'
|
||||||
assert_equal 3, assigns(:entries).size
|
# Line 22 removed
|
||||||
assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'}
|
assert_tag :tag => 'th',
|
||||||
assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'}
|
:content => /22/,
|
||||||
assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'}
|
:sibling => { :tag => 'td',
|
||||||
end
|
:attributes => { :class => /diff_out/ },
|
||||||
|
:content => /def remove/ }
|
||||||
def test_browse_directory
|
end
|
||||||
get :browse, :id => 3, :path => ['images']
|
|
||||||
assert_response :success
|
def test_annotate
|
||||||
assert_template 'browse'
|
get :annotate, :id => 3, :path => ['sources', 'watchers_controller.rb']
|
||||||
assert_not_nil assigns(:entries)
|
assert_response :success
|
||||||
assert_equal 2, assigns(:entries).size
|
assert_template 'annotate'
|
||||||
entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
|
# Line 23, revision 4
|
||||||
assert_not_nil entry
|
assert_tag :tag => 'th', :content => /23/,
|
||||||
assert_equal 'file', entry.kind
|
:sibling => { :tag => 'td', :child => { :tag => 'a', :content => /4/ } },
|
||||||
assert_equal 'images/edit.png', entry.path
|
:sibling => { :tag => 'td', :content => /jsmith/ },
|
||||||
end
|
:sibling => { :tag => 'td', :content => /watcher =/ }
|
||||||
|
end
|
||||||
def test_changes
|
else
|
||||||
get :changes, :id => 3, :path => ['images', 'edit.png']
|
puts "Mercurial test repository NOT FOUND. Skipping functional tests !!!"
|
||||||
assert_response :success
|
def test_fake; assert true end
|
||||||
assert_template 'changes'
|
|
||||||
assert_tag :tag => 'h2', :content => 'edit.png'
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_entry_show
|
|
||||||
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
|
|
||||||
assert_response :success
|
|
||||||
assert_template 'entry'
|
|
||||||
# Line 19
|
|
||||||
assert_tag :tag => 'th',
|
|
||||||
:content => /10/,
|
|
||||||
:attributes => { :class => /line-num/ },
|
|
||||||
:sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_entry_download
|
|
||||||
get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
|
|
||||||
assert_response :success
|
|
||||||
# File content
|
|
||||||
assert @response.body.include?('WITHOUT ANY WARRANTY')
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_diff
|
|
||||||
# Full diff of changeset 4
|
|
||||||
get :diff, :id => 3, :rev => 4
|
|
||||||
assert_response :success
|
|
||||||
assert_template 'diff'
|
|
||||||
# Line 22 removed
|
|
||||||
assert_tag :tag => 'th',
|
|
||||||
:content => /22/,
|
|
||||||
:sibling => { :tag => 'td',
|
|
||||||
:attributes => { :class => /diff_out/ },
|
|
||||||
:content => /def remove/ }
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_annotate
|
|
||||||
get :annotate, :id => 3, :path => ['sources', 'watchers_controller.rb']
|
|
||||||
assert_response :success
|
|
||||||
assert_template 'annotate'
|
|
||||||
# Line 23, revision 4
|
|
||||||
assert_tag :tag => 'th', :content => /23/,
|
|
||||||
:sibling => { :tag => 'td', :child => { :tag => 'a', :content => /4/ } },
|
|
||||||
:sibling => { :tag => 'td', :content => /jsmith/ },
|
|
||||||
:sibling => { :tag => 'td', :content => /watcher =/ }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user