From 597c1e6c09f57e5e3b5f471f774137fbe21b06cd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 15 Jun 2008 11:40:13 +0000 Subject: [PATCH] Adds links to repository directories in the browser (#1094). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1544 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../repositories/_dir_list_content.rhtml | 24 ++++++------------ public/images/bullet_toggle_minus.png | Bin 0 -> 335 bytes public/images/bullet_toggle_plus.png | Bin 0 -> 335 bytes public/stylesheets/application.css | 4 +++ 4 files changed, 12 insertions(+), 16 deletions(-) create mode 100644 public/images/bullet_toggle_minus.png create mode 100644 public/images/bullet_toggle_plus.png diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml index c3bd56e09..c30216533 100644 --- a/app/views/repositories/_dir_list_content.rhtml +++ b/app/views/repositories/_dir_list_content.rhtml @@ -1,26 +1,18 @@ <% @entries.each do |entry| %> <% tr_id = Digest::MD5.hexdigest(entry.path) depth = params[:depth].to_i %> - - -<%= if entry.is_dir? - link_to_remote h(entry.name), - {:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id}, + + +<% if entry.is_dir? %> + "scmEntryClick('#{tr_id}')" - }, - {:href => url_for({:action => 'browse', :id => @project, :path => entry.path, :rev => @rev}), - :class => ('icon icon-folder'), - :style => "margin-left: #{18 * depth}px;" - } -else - link_to h(entry.name), + :condition => "scmEntryClick('#{tr_id}')"%>">  +<% end %> +<%= link_to h(entry.name), {:action => (entry.is_dir? ? 'browse' : 'changes'), :id => @project, :path => entry.path, :rev => @rev}, - :class => 'icon icon-file', - :style => "margin-left: #{18 * depth}px;" -end %> + :class => (entry.is_dir? ? 'icon icon-folder' : 'icon icon-file')%> <%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %> <%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> diff --git a/public/images/bullet_toggle_minus.png b/public/images/bullet_toggle_minus.png new file mode 100644 index 0000000000000000000000000000000000000000..5ce75938fdeca159bf2917dcafae187bfb8dc52e GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!UWsc&iE~kEVo7Fxo&%v+ZMj zvk)l6S>O>_%)r1c1j3A$?$-SQ3bLd-`Z_W&Z0zU$lgJ9>dj$A|xc>kDf77N-ot>S{ z&CPXnbrlsA#l^*Q=FFKnbLPQ=2TMy!7cE+}X3d(_t5>(RwQb(Kxxc@E&z?P(E?wHU zZ{NlCSLIOf!55+}= z-8ndlni$xf8s<-KZ*LD~P&{y&Q^n$^0MnfWQ5_COz73Kw9E@&iX<}h!Wm%R|!VCD=R-fLC|8pq)2>gTe~DWM4f!lvI6-Y0X`wF|NsBrv}sdkXJ>PB zb6s6sMMXt%aq*lvb7sz*dGO%D($dmJix#a}vu5?`)opEUn>TOn@9*EUXV0Zem-g-3 zw{z#tb?erxSg~T)u3hsEZD#?R$ygHP7tG-B>_!@p