Skip to content

Commit

Permalink
Better adaptation to Redmine 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RosselloAzcom committed Dec 15, 2019
1 parent aebd7f2 commit 86de72c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.buildpath
.byebug_history
.metadata/
.project
Gemfile.lock
config/
coverage/
db/
files/
log/
public/
test/html_reports/
tmp/

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Redmine Better Overview

Compatible with Redmine 2.6.x-3.4.x.
Compatible with Redmine 4.0.x.

Provides a better projects overview.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- replace 'ul li:last-of-type' namespaced -->
<div class="custom box">
<h3><%= custom_field.name %></h3>
<h3 class="cf_<%= custom_field.id %>"><%= custom_field.name %></h3>
<%= formatted %>
</div>
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
version '1.0.0'
url 'https://github.com/maxrossello/redmine_better_overview.git'
author_url 'https://github.com/maxrossello'
requires_redmine :version_or_higher => '2.6.0'
requires_redmine :version_or_higher => '4.0.0'
end

Rails.configuration.to_prepare do
Expand Down
7 changes: 4 additions & 3 deletions test/functional/projects_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ def test_show_should_display_homepage_in_a_box
end

def test_show_should_display_visible_custom_fields_in_a_box
ProjectCustomField.find_by_name('Development status').update_attribute :visible, true
cf = ProjectCustomField.find_by_name('Development status')
cf.update_attribute :visible, true
get :show, :params => {
:id => 'ecookbook'
}
assert_response :success

assert_select '.box h3', :text => /Development status/
assert_select '.custom', :text => /Stable/
assert_select ".box h3.cf_#{cf.id}", :text => /#{cf.name}/
assert_select '.custom.box', :text => /Stable/
end

def test_show_should_not_display_blank_custom_fields_with_multiple_values
Expand Down

0 comments on commit 86de72c

Please sign in to comment.