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
b5decb21
Commit
b5decb21
authored
Oct 21, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide project activity tabs when features are disabled
parent
b328c788
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
3 deletions
+64
-3
CHANGELOG.md
CHANGELOG.md
+34
-0
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+6
-0
app/views/shared/_event_filter.html.haml
app/views/shared/_event_filter.html.haml
+6
-3
spec/features/projects/features_visibility_spec.rb
spec/features/projects/features_visibility_spec.rb
+18
-0
No files found.
CHANGELOG.md
View file @
b5decb21
...
@@ -57,6 +57,40 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -57,6 +57,40 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Fix and improve
`Sortable.highest_label_priority`
. !7165
-
Fix and improve
`Sortable.highest_label_priority`
. !7165
-
Fixed sticky merge request tabs when sidebar is pinned. !7167
-
Fixed sticky merge request tabs when sidebar is pinned. !7167
-
Only remove right connector of first build of last stage. !7179
-
Only remove right connector of first build of last stage. !7179
-
Backups do not fail anymore when using tar on annex and custom_hooks only. !5814
-
Adds user project membership expired event to clarify why user was removed (Callum Dryden)
-
Hides project activity tabs when features are disabled
-
Trim leading and trailing whitespace on project_path (Linus Thiel)
-
Prevent award emoji via notes for issues/MRs authored by user (barthc)
-
Adds an optional path parameter to the Commits API to filter commits by path (Luis HGO)
-
Fix extra space on Build sidebar on Firefox !7060
-
Fix mobile layout issues in admin user overview page !7087
-
Fix HipChat notifications rendering (airatshigapov, eisnerd)
-
Add hover to trash icon in notes !7008 (blackst0ne)
-
Fix sidekiq stats in admin area (blackst0ne)
-
Removed delete branch tooltip !6954
-
Escape ref and path for relative links !6050 (winniehell)
-
Fixed link typo on /help/ui to Alerts section. !6915 (Sam Rose)
-
Fix filtering of milestones with quotes in title (airatshigapov)
-
Refactor less readable existance checking code from CoffeeScript !6289 (jlogandavison)
-
Update mail_room and enable sentinel support to Reply By Email (!7101)
-
Simpler arguments passed to named_route on toggle_award_url helper method
-
Fix typo in framework css class. !7086 (Daniel Voogsgerd)
-
New issue board list dropdown stays open after adding a new list
-
Fix: Backup restore doesn't clear cache
-
API: Fix project deploy keys 400 and 500 errors when adding an existing key. !6784 (Joshua Welsh)
-
Replace jquery.cookie plugin with js.cookie !7085
-
Use MergeRequestsClosingIssues cache data on Issue#closed_by_merge_requests method
-
Fix Sign in page 'Forgot your password?' link overlaps on medium-large screens
-
Show full status link on MR & commit pipelines
-
Fix documents and comments on Build API
`scope`
-
Fix applying labels for GitHub-imported MRs
-
Fix importing MR comments from GitHub
-
Refactor email, use setter method instead AR callbacks for email attribute (Semyon Pupkov)
-
Shortened merge request modal to let clipboard button not overlap
## 8.13.2
-
Fix builds dropdown overlapping bug !7124
## 8.13.1 (2016-10-25)
## 8.13.1 (2016-10-25)
...
...
app/helpers/events_helper.rb
View file @
b5decb21
...
@@ -39,6 +39,12 @@ module EventsHelper
...
@@ -39,6 +39,12 @@ module EventsHelper
end
end
end
end
def
event_filter_visible
(
key
)
return
true
unless
@project
return
@project
.
feature_available?
(
:repository
,
current_user
)
end
def
event_preposition
(
event
)
def
event_preposition
(
event
)
if
event
.
push?
||
event
.
commented?
||
event
.
target
if
event
.
push?
||
event
.
commented?
||
event
.
target
"at"
"at"
...
...
app/views/shared/_event_filter.html.haml
View file @
b5decb21
%ul
.nav-links.event-filter.scrolling-tabs
%ul
.nav-links.event-filter.scrolling-tabs
=
event_filter_link
EventFilter
.
all
,
'All'
=
event_filter_link
EventFilter
.
all
,
'All'
=
event_filter_link
EventFilter
.
push
,
'Push events'
-
if
event_filter_visible
(
:repository
)
=
event_filter_link
EventFilter
.
merged
,
'Merge events'
=
event_filter_link
EventFilter
.
push
,
'Push events'
=
event_filter_link
EventFilter
.
comments
,
'Comments'
-
if
event_filter_visible
(
:merge_requests
)
=
event_filter_link
EventFilter
.
merged
,
'Merge events'
-
if
event_filter_visible
(
:issues
)
=
event_filter_link
EventFilter
.
comments
,
'Comments'
=
event_filter_link
EventFilter
.
team
,
'Team'
=
event_filter_link
EventFilter
.
team
,
'Team'
spec/features/projects/features_visibility_spec.rb
View file @
b5decb21
...
@@ -164,5 +164,23 @@ describe 'Edit Project Settings', feature: true do
...
@@ -164,5 +164,23 @@ describe 'Edit Project Settings', feature: true do
expect
(
page
).
to
have_content
"Customize your workflow!"
expect
(
page
).
to
have_content
"Customize your workflow!"
end
end
it
"hides project activity tabs"
do
select
"Disabled"
,
from:
"project_project_feature_attributes_repository_access_level"
select
"Disabled"
,
from:
"project_project_feature_attributes_issues_access_level"
select
"Disabled"
,
from:
"project_project_feature_attributes_wiki_access_level"
click_button
"Save changes"
wait_for_ajax
visit
activity_namespace_project_path
(
project
.
namespace
,
project
)
page
.
within
(
".event-filter"
)
do
expect
(
page
).
to
have_selector
(
"a"
,
count:
2
)
expect
(
page
).
not_to
have_content
(
"Push events"
)
expect
(
page
).
not_to
have_content
(
"Merge events"
)
expect
(
page
).
not_to
have_content
(
"Comments"
)
end
end
end
end
end
end
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