From: Toshi MARUYAMA Date: Tue, 23 Aug 2011 08:42:17 +0000 (+0000) Subject: rename .rhtml to .html.erb of app/views/repositories/_breadcrumbs.rhtml. X-Git-Tag: 1.3.0~1418 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ec11c1c566b5b7468c8e677805ccc818e4498823;p=redmine.git rename .rhtml to .html.erb of app/views/repositories/_breadcrumbs.rhtml. :rhtml and :rxml were finally removed as template handlers at Rails 3.1 RC4. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6543 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb new file mode 100644 index 000000000..d0fdf2a60 --- /dev/null +++ b/app/views/repositories/_breadcrumbs.html.erb @@ -0,0 +1,28 @@ +<%= link_to 'root', :action => 'show', :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 => 'show', :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 %> +<% + # @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) +%> +<%= "@ #{h rev_text}" unless rev_text.blank? %> + +<% html_title(h(with_leading_slash(path))) -%> diff --git a/app/views/repositories/_breadcrumbs.rhtml b/app/views/repositories/_breadcrumbs.rhtml deleted file mode 100644 index d0fdf2a60..000000000 --- a/app/views/repositories/_breadcrumbs.rhtml +++ /dev/null @@ -1,28 +0,0 @@ -<%= link_to 'root', :action => 'show', :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 => 'show', :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 %> -<% - # @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) -%> -<%= "@ #{h rev_text}" unless rev_text.blank? %> - -<% html_title(h(with_leading_slash(path))) -%>