Commit 8f01557a188f49a7f97516ef0e308a149bdbd2ae
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.
| |   |
| 289 | 289 | |
| 290 | 290 | def render_event_push(event) |
| 291 | 291 | project = event.target.project |
| 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()") |
| commit_link = link_to_if(event.has_commits?, pluralize(event.events.size, 'commit'), |
| repo_owner_path(event.target, :project_repository_commits_in_ref_path, project, event.target, ensplat_path(event.data)), |
| :onclick => "if ($('commits_in_event_#{event.to_param}')) {$('commits_in_event_#{event.to_param}').toggle(); return false;}" |
| ) |
| |
| 293 | 297 | action = action_for_event(:event_pushed_n, :commit_link => commit_link) do |
| 294 | 298 | title = repo_title(event.target, project) |
| " to " + link_to(h(title+':'+event.data), repo_owner_path(event.target, |
| :project_repository_commits_in_ref_path, project, event.target, ensplat_path(event.data))) |
| " to " + link_to(h(title+':'+event.data), repo_owner_path(event.target, :project_repository_path, event.target.project, event.target)) |
| 297 | 300 | end |
| 298 | 301 | body = h(event.body) |
| 299 | 302 | category = 'push' |