Commit 8f01557a188f49a7f97516ef0e308a149bdbd2ae

  • avatar
  • August Lilleaas <augustlilleaas @gm…l.com>
  • Mon Jun 15 12:30:32 CEST 2009
The event rendering helper is now aware of the fact that it is some times being displayed without commits_in_event_xxx, e.g. on the home page scroller.
  
289289
290290 def render_event_push(event)
291291 project = event.target.project
292 commit_link = link_to_remote_if(event.has_commits?, pluralize(event.events.size, 'commit'), :url => commits_event_path(event.to_param), :method => :get, :update => "commits_in_event_#{event.to_param}", :before => "$('commits_in_event_#{event.to_param}').toggle()")
292 commit_link = link_to_if(event.has_commits?, pluralize(event.events.size, 'commit'),
293 repo_owner_path(event.target, :project_repository_commits_in_ref_path, project, event.target, ensplat_path(event.data)),
294 :onclick => "if ($('commits_in_event_#{event.to_param}')) {$('commits_in_event_#{event.to_param}').toggle(); return false;}"
295 )
296
293297 action = action_for_event(:event_pushed_n, :commit_link => commit_link) do
294298 title = repo_title(event.target, project)
295 " to " + link_to(h(title+':'+event.data), repo_owner_path(event.target,
296 :project_repository_commits_in_ref_path, project, event.target, ensplat_path(event.data)))
299 " to " + link_to(h(title+':'+event.data), repo_owner_path(event.target, :project_repository_path, event.target.project, event.target))
297300 end
298301 body = h(event.body)
299302 category = 'push'