Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
c1b1c321
Commit
c1b1c321
authored
May 29, 2014
by
Kyle Fazzari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add summaries for notes and merge requests to dashboard feed.
This fixes #305.
parent
b1ce97d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
0 deletions
+13
-0
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+4
-0
app/models/event.rb
app/models/event.rb
+5
-0
app/views/events/_event_merge_request.atom.haml
app/views/events/_event_merge_request.atom.haml
+2
-0
app/views/events/_event_note.atom.haml
app/views/events/_event_note.atom.haml
+2
-0
No files found.
app/helpers/events_helper.rb
View file @
c1b1c321
...
...
@@ -83,6 +83,10 @@ module EventsHelper
render
"events/event_issue"
,
issue:
event
.
issue
elsif
event
.
push?
render
"events/event_push"
,
event:
event
elsif
event
.
merge_request?
render
"events/event_merge_request"
,
merge_request:
event
.
merge_request
elsif
event
.
note?
render
"events/event_note"
,
note:
event
.
note
end
end
...
...
app/models/event.rb
View file @
c1b1c321
...
...
@@ -33,6 +33,7 @@ class Event < ActiveRecord::Base
delegate
:name
,
:email
,
to: :author
,
prefix:
true
,
allow_nil:
true
delegate
:title
,
to: :issue
,
prefix:
true
,
allow_nil:
true
delegate
:title
,
to: :merge_request
,
prefix:
true
,
allow_nil:
true
delegate
:title
,
to: :note
,
prefix:
true
,
allow_nil:
true
belongs_to
:author
,
class_name:
"User"
belongs_to
:project
...
...
@@ -147,6 +148,10 @@ class Event < ActiveRecord::Base
target
if
target_type
==
"MergeRequest"
end
def
note
target
if
target_type
==
"Note"
end
def
action_name
if
closed?
"closed"
...
...
app/views/events/_event_merge_request.atom.haml
0 → 100644
View file @
c1b1c321
%div
{
xmlns:
"http://www.w3.org/1999/xhtml"
}
%p
=
simple_format
merge_request
.
description
app/views/events/_event_note.atom.haml
0 → 100644
View file @
c1b1c321
%div
{
:xmlns
=>
"http://www.w3.org/1999/xhtml"
}
%p
=
simple_format
note
.
note
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment