Add a more verbose dashboard event feed
- Add project name to event title - Push: Entry links to single commit or commits overview depending on number of pushed commits - Push: Display first 15 commits with commit message and author and link to single commit - Issues: Display issue description
This commit is contained in:
parent
8ec956421c
commit
0b8e956f32
4 changed files with 40 additions and 5 deletions
|
@ -12,6 +12,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
|
|||
xml.entry do
|
||||
event_link = event.feed_url
|
||||
event_title = event.feed_title
|
||||
event_summary = event.feed_summary
|
||||
|
||||
xml.id "tag:#{request.host},#{event.created_at.strftime("%Y-%m-%d")}:#{event.id}"
|
||||
xml.link :href => event_link
|
||||
|
@ -22,7 +23,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
|
|||
xml.name event.author_name
|
||||
xml.email event.author_email
|
||||
end
|
||||
xml.summary event_title
|
||||
xml.summary(:type => "xhtml") { |x| x << event_summary unless event_summary.nil? }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
2
app/views/events/_event_issue.atom.haml
Normal file
2
app/views/events/_event_issue.atom.haml
Normal file
|
@ -0,0 +1,2 @@
|
|||
%div{:xmlns => "http://www.w3.org/1999/xhtml"}
|
||||
%p= simple_format issue.description
|
14
app/views/events/_event_push.atom.haml
Normal file
14
app/views/events/_event_push.atom.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
%div{:xmlns => "http://www.w3.org/1999/xhtml"}
|
||||
- event.commits.first(15).each do |commit|
|
||||
%p
|
||||
%strong= commit.author_name
|
||||
= link_to "(##{commit.short_id})", project_commit_path(event.project, :id => commit.id)
|
||||
%i
|
||||
at
|
||||
= commit.committed_date.strftime("%Y-%m-%d %H:%M:%S")
|
||||
%blockquote= simple_format commit.safe_message
|
||||
- if event.commits_count > 15
|
||||
%p
|
||||
%i
|
||||
\... and
|
||||
= pluralize(event.commits_count - 15, "more commit")
|
Loading…
Add table
Add a link
Reference in a new issue