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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1d3efeb7
Commit
1d3efeb7
authored
Feb 27, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support display of wiki events
This updates templates and views to support wiki events
parent
0c342a8c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
1 deletion
+35
-1
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+15
-0
app/views/events/_event.html.haml
app/views/events/_event.html.haml
+3
-1
app/views/events/event/_wiki.html.haml
app/views/events/event/_wiki.html.haml
+10
-0
app/views/shared/_event_filter.html.haml
app/views/shared/_event_filter.html.haml
+2
-0
changelogs/unreleased/30526-be-wiki-activity-on-project-group-user.yml
...released/30526-be-wiki-activity-on-project-group-user.yml
+5
-0
No files found.
app/helpers/events_helper.rb
View file @
1d3efeb7
...
...
@@ -70,6 +70,8 @@ module EventsHelper
def
event_preposition
(
event
)
if
event
.
push_action?
||
event
.
commented_action?
||
event
.
target
"at"
elsif
event
.
wiki_page?
_
(
"Events|in the wiki for"
)
elsif
event
.
milestone?
"in"
end
...
...
@@ -172,6 +174,19 @@ module EventsHelper
end
end
def
event_wiki_title_html
(
event
)
capture
do
concat
content_tag
(
:span
,
_
(
'wiki page'
),
class:
"event-target-type append-right-4"
)
concat
link_to
(
event
.
wiki_page_title
,
event_wiki_page_target_url
(
event
),
title:
event
.
target_title
,
class:
'has-tooltip event-target-link append-right-4'
)
end
end
def
event_wiki_page_target_url
(
event
)
project_wiki_url
(
event
.
project
,
event
.
wiki_page_title
)
end
def
event_note_title_html
(
event
)
if
event
.
note_target
capture
do
...
...
app/views/events/_event.html.haml
View file @
1d3efeb7
...
...
@@ -5,7 +5,9 @@
.event-item-timestamp
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
-
if
event
.
created_project_action?
-
if
event
.
wiki_page?
=
render
"events/event/wiki"
,
event:
event
-
elsif
event
.
created_project_action?
=
render
"events/event/created_project"
,
event:
event
-
elsif
event
.
push_action?
=
render
"events/event/push"
,
event:
event
...
...
app/views/events/event/_wiki.html.haml
0 → 100644
View file @
1d3efeb7
=
icon_for_profile_event
(
event
)
=
event_user_info
(
event
)
.event-title.d-flex.flex-wrap
=
inline_event_icon
(
event
)
%span
.event-type.d-inline-block.append-right-4
{
class:
event
.
action_name
}
=
event
.
action_name
=
event_wiki_title_html
(
event
)
=
render
"events/event_scope"
,
event:
event
app/views/shared/_event_filter.html.haml
View file @
1d3efeb7
...
...
@@ -15,4 +15,6 @@
=
render_if_exists
'events/epics_filter'
-
if
comments_visible?
=
event_filter_link
EventFilter
::
COMMENTS
,
_
(
'Comments'
),
s_
(
'EventFilterBy|Filter by comments'
)
-
if
@project
.
nil?
||
@project
.
has_wiki?
=
event_filter_link
EventFilter
::
WIKI
,
_
(
'Wiki'
),
s_
(
'EventFilterBy|Filter by wiki'
)
=
event_filter_link
EventFilter
::
TEAM
,
_
(
'Team'
),
s_
(
'EventFilterBy|Filter by team'
)
changelogs/unreleased/30526-be-wiki-activity-on-project-group-user.yml
0 → 100644
View file @
1d3efeb7
---
title
:
Support wiki events in activity streams
merge_request
:
23869
author
:
type
:
changed
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