forked from mathieu-mbru/redmine_tiny_features
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Masquer les membres sur la page d'apercu d'un projet
- Loading branch information
Showing
8 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Deface::Override.new :virtual_path => 'projects/show', | ||
:name => 'hide-members-on-project-overview', | ||
:surround => "erb[loud]:contains('members_box')", | ||
:text => <<-EOS | ||
<% if !Setting["plugin_redmine_tiny_features"]["hide_members_section_in_overview_project"].present? %> | ||
<%= render_original %> | ||
<% end %> | ||
EOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
require "spec_helper" | ||
|
||
RSpec.describe "ProjectController", type: :system do | ||
|
||
fixtures :users, :user_preferences, :projects, :members, :roles, :member_roles | ||
|
||
before do | ||
log_user('admin', 'admin') | ||
end | ||
|
||
describe "Option to hide/show the members section on the overview page of each project" do | ||
let(:project_test) { Project.find(1) } | ||
|
||
it "Should hide members section when the option is activated" do | ||
|
||
Setting.send "plugin_redmine_tiny_features=", { | ||
"hide_members_section_in_overview_project" => "1", | ||
} | ||
|
||
visit "/projects/#{project_test.identifier}" | ||
expect(page).to_not have_selector('div.members') | ||
|
||
end | ||
|
||
it "Should display members section when the option is deactivated" do | ||
|
||
Setting.send "plugin_redmine_tiny_features=", { | ||
"hide_members_section_in_overview_project" => "", | ||
} | ||
|
||
visit "/projects/#{project_test.identifier}" | ||
expect(page).to have_selector('div.members') | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters