annotate .svn/pristine/25/25113ec5e4b14337a78af5200fc4c9451ad1548e.svn-base @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents cbb26bc654de
children
rev   line source
Chris@909 1 <% @entries.each do |entry| %>
Chris@909 2 <% tr_id = Digest::MD5.hexdigest(entry.path)
Chris@909 3 depth = params[:depth].to_i %>
Chris@909 4 <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %>
Chris@909 5 <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
Chris@909 6 <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
Chris@909 7 <td style="padding-left: <%=18 * depth%>px;" class="<%=
Chris@909 8 @repository.report_last_commit ? "filename" : "filename_no_report" %>";>
Chris@909 9 <% if entry.is_dir? %>
Chris@909 10 <span class="expander" onclick="<%= remote_function(
Chris@909 11 :url => {
Chris@909 12 :action => 'show',
Chris@909 13 :id => @project,
Chris@909 14 :path => to_path_param(ent_path),
Chris@909 15 :rev => @rev,
Chris@909 16 :depth => (depth + 1),
Chris@909 17 :parent_id => tr_id
Chris@909 18 },
Chris@909 19 :method => :get,
Chris@909 20 :update => { :success => tr_id },
Chris@909 21 :position => :after,
Chris@909 22 :success => "scmEntryLoaded('#{tr_id}')",
Chris@909 23 :condition => "scmEntryClick('#{tr_id}')"
Chris@909 24 ) %>">&nbsp</span>
Chris@909 25 <% end %>
Chris@909 26 <%= link_to h(ent_name),
Chris@909 27 {:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev},
Chris@909 28 :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
Chris@909 29 </td>
Chris@909 30 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
Chris@909 31 <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
Chris@909 32 <% if @repository.report_last_commit %>
Chris@909 33 <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td>
Chris@909 34 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
Chris@909 35 <td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : h(changeset.author) if entry.lastrev %></td>
Chris@909 36 <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td>
Chris@909 37 <% end %>
Chris@909 38 </tr>
Chris@909 39 <% end %>