Skip to content

Commit 9ffd20f

Browse files
authored
Merge pull request #167 from arBmind/feature/redmine_6_support
Redmine 6 support
2 parents f36654a + 56264e3 commit 9ffd20f

File tree

196 files changed

+20449
-1025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+20449
-1025
lines changed

.github/data/Gemfile.local.5.1.2

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/data/Gemfile.local.5.1.6

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/data/Gemfile.local.6.0.3

Whitespace-only changes.

.github/workflows/main.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Specs
22

3-
on: [push, pull_request]
3+
on: [ push, pull_request ]
44

55
jobs:
66
specs:
@@ -9,8 +9,8 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
redmine: [ '5.1.2', '5.1.6' ]
13-
ruby: [ '2.7.7', '3.2.7' ]
12+
redmine: [ '6.0.3' ]
13+
ruby: [ '3.2.7', '3.3.7' ]
1414
database: [ 'sqlite3', 'postgresql', 'mysql2' ]
1515

1616
services:
@@ -33,38 +33,38 @@ jobs:
3333
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3434

3535
steps:
36-
- uses: ruby/setup-ruby@v1
37-
with:
38-
ruby-version: ${{ matrix.ruby }}
36+
- uses: ruby/setup-ruby@v1
37+
with:
38+
ruby-version: ${{ matrix.ruby }}
3939

40-
- name: Install redmine
41-
run: wget https://github.com/redmine/redmine/archive/${{ matrix.redmine }}.tar.gz -qO- | tar -C $GITHUB_WORKSPACE -xz --strip=1 --show-transformed -f -
40+
- name: Install redmine
41+
run: wget https://github.com/redmine/redmine/archive/${{ matrix.redmine }}.tar.gz -qO- | tar -C $GITHUB_WORKSPACE -xz --strip=1 --show-transformed -f -
4242

43-
- uses: actions/checkout@v4
44-
with:
45-
path: 'plugins/redmine_hourglass'
43+
- uses: actions/checkout@v4
44+
with:
45+
path: 'plugins/redmine_hourglass'
4646

47-
- name: Create database config
48-
run: |
49-
cp $GITHUB_WORKSPACE/plugins/redmine_hourglass/.github/data/${{ matrix.database }}_database.yml $GITHUB_WORKSPACE/config/database.yml
50-
cp $GITHUB_WORKSPACE/plugins/redmine_hourglass/.github/data/Gemfile.local.${{ matrix.redmine }} $GITHUB_WORKSPACE/Gemfile.local
47+
- name: Create database config
48+
run: |
49+
cp $GITHUB_WORKSPACE/plugins/redmine_hourglass/.github/data/${{ matrix.database }}_database.yml $GITHUB_WORKSPACE/config/database.yml
50+
cp $GITHUB_WORKSPACE/plugins/redmine_hourglass/.github/data/Gemfile.local.${{ matrix.redmine }} $GITHUB_WORKSPACE/Gemfile.local
5151
52-
- name: Install dependencies
53-
run: |
54-
bundle config set --local without 'rmagick'
55-
bundle install --jobs=3 --retry=3
52+
- name: Install dependencies
53+
run: |
54+
bundle config set --local without 'rmagick'
55+
bundle install --jobs=3 --retry=3
5656
57-
- name: Setup database and plugin
58-
run: |
59-
bundle exec rake db:create
60-
bundle exec rake db:migrate
61-
bundle exec rake redmine:load_default_data REDMINE_LANG=en
62-
bundle exec rake generate_secret_token
63-
bundle exec rake redmine:plugins:migrate
64-
env:
65-
RAILS_ENV: test
57+
- name: Setup database and plugin
58+
run: |
59+
bundle exec rake db:create
60+
bundle exec rake db:migrate
61+
bundle exec rake redmine:load_default_data REDMINE_LANG=en
62+
bundle exec rake generate_secret_token
63+
bundle exec rake redmine:plugins:migrate
64+
env:
65+
RAILS_ENV: test
6666

67-
- name: Run specs
68-
run: bundle exec rake --trace redmine:plugins:hourglass:spec
69-
env:
70-
RAILS_ENV: test
67+
- name: Run specs
68+
run: bundle exec rake --trace redmine:plugins:hourglass:spec
69+
env:
70+
RAILS_ENV: test

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1919
### Fixed
2020
- [please add bug fixes]
2121

22+
## [1.6.0] - TBA
23+
24+
Upgrade to support Redmine 6. (No Redmine 5 support)
25+
26+
### Added
27+
- Support for Redmine 6
28+
- New SVG icons
29+
- Custom task for asset compilation
30+
- Swagger documentation for time entries
31+
32+
### Changed
33+
- Upgraded Gems to support Rails 7
34+
- Select All Toggle as Checkbox
35+
- Fixed Swagger API documentations for OpenAPI
36+
37+
### Fixed
38+
- Submit button layout bug
39+
2240
## [1.3.0] - 2025-03-23
2341

2442
Upgraded to support Redmine 5. (No Redmine 4 support)

Gemfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ source 'https://rubygems.org'
33
# asset pipeline
44
gem 'uglifier'
55
gem 'coffee-script', '~> 2.4.1'
6-
gem 'sass', '~> 3.5.1'
7-
gem 'sprockets', '~> 3.7.2', require: 'sprockets/railtie'
6+
gem 'sassc-embedded', '~> 1.80.4'
7+
gem 'sprockets', '~> 4.2.1'
88

99
# access control
10-
gem 'pundit', '~> 1.1.0'
10+
gem 'pundit', '~> 2.5.0'
1111

1212
# this is useful for unix based systems which don't have a js runtime installed
1313
# if you are on windows and this makes problems, simply remove the line
1414
# gem 'therubyracer', :platform => :ruby
1515

1616
# views
17-
gem 'slim', '~> 3.0.8'
18-
gem 'js-routes', '~> 2.2.4'
19-
gem 'momentjs-rails', '>= 2.10.7'
17+
gem 'slim', '~> 5.2.1'
18+
gem 'js-routes', '~> 2.3.5'
19+
# gem 'momentjs-rails', '>= 2.10.7'
2020

21-
gem 'rswag', '~> 2.5.1' # api docs
21+
gem 'rswag', '~> 2.16.0' # api docs
2222
gem 'rspec-core'
2323
gem 'rqrcode' unless dependencies.any? { |d| d.name == 'rqrcode' }
2424

2525
group :development, :test do
26-
gem 'rspec-rails', '~> 5.1.2'
26+
gem 'rspec-rails', '~> 7.1.1'
2727
gem 'factory_bot_rails'
2828
gem 'zonebie'
2929
gem 'database_cleaner'

app/assets/javascripts/lists.coffee

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
toggleAllCheckBoxes = (event) ->
2-
event.preventDefault()
3-
$boxes = $(@).closest('table').find('input[type=checkbox]')
4-
all_checked = true
5-
$boxes.each -> all_checked = all_checked && $(@).prop('checked')
2+
checked = $(this).prop('checked')
3+
$boxes = $(@).closest('table').find('tbody input[type=checkbox]')
64
$boxes.each ->
75
$(@)
8-
.prop('checked', !all_checked)
6+
.prop('checked', checked)
97
.parents('tr')
10-
.toggleClass('context-menu-selection', !all_checked)
8+
.toggleClass('context-menu-selection', checked)
119

1210
multiFormParameters = ($form) ->
1311
entries = {}
@@ -112,7 +110,7 @@ window.contextMenuShow = (event) ->
112110
$ ->
113111
$list = $('.hourglass-list')
114112
$list
115-
.on 'click', '.checkbox a', toggleAllCheckBoxes
113+
.on 'change', '.toggle-selection', toggleAllCheckBoxes
116114
.on 'ajax:success', '.js-show-inline-form', showInlineForm
117115
.on 'ajax:error', '.js-show-inline-form', processErrorPageResponse
118116
.on 'click', '.js-hide-inline-form', hideInlineForm

app/assets/javascripts/redmine_integrations.coffee

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ showStartDialog = (e) ->
7878
if $startDialogContent.length isnt 0
7979
e.preventDefault()
8080
e.stopPropagation()
81+
link = e.currentTarget
8182
hourglass.Utils.showDialog $startDialogContent.data('content'), [
8283
{
8384
text: $startDialogContent.data('button-ok-text')
84-
click: -> startDialogApplyHandler.call(@, e.target)
85+
click: -> startDialogApplyHandler.call(@, link)
8586
}
8687
{
8788
text: $startDialogContent.data('button-cancel-text')
@@ -125,7 +126,8 @@ window.toggleOperator = (field) ->
125126
window.oldToggleOperator field
126127

127128
$ ->
128-
$('#content > .contextual >:nth-child(2)').after $('.js-issue-action').removeClass('hidden')
129+
$('#content > .contextual >:nth-child(2)').after $('.js-issue-action');
130+
$('#content > .contextual >.js-issue-action').removeClass 'hidden';
129131

130132
$('.hourglass-quick').replaceWith $('.js-account-menu-link').removeClass('hidden')
131133

@@ -142,4 +144,3 @@ $ ->
142144
options.data = $.param list_type: $contextMenuTarget.data('list-type')
143145
$contextMenuTarget.find('.context-menu-selection').each ->
144146
options.data += "&ids[]=#{@id}"
145-

app/assets/stylesheets/application.scss

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
white-space: nowrap;
5252
text-align: center;
5353

54+
&.create-form td {
55+
padding: 0;
56+
}
57+
5458
&:hover {
5559
td.actions a {
5660
visibility: visible;
@@ -70,10 +74,17 @@
7074
&.actions {
7175
text-align: right;
7276
a {
73-
padding: 2px 16px;
74-
background-repeat: no-repeat;
75-
background-position: 10px 0;
77+
padding: 0 2px;
7678
visibility: hidden;
79+
80+
span.icon {
81+
display: inline-block;
82+
width: 16px;
83+
height: 16px;
84+
vertical-align: text-bottom;
85+
padding: 0;
86+
margin-right: 5px;
87+
}
7788
}
7889
}
7990
}
@@ -96,6 +107,10 @@
96107
}
97108
}
98109

110+
input[type="submit"] {
111+
height: 24px;
112+
}
113+
99114
#query_form {
100115
#filters-table {
101116
tr.filter {

app/assets/stylesheets/global.scss

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,11 @@
1717
}
1818
}
1919

20-
.icon-hourglass-start {
21-
background-image: image-url('icons/time_start.png');
20+
.context-menu-selection svg.icon-svg, #top-menu svg.icon-svg {
21+
stroke: #fff;
2222
}
23-
24-
.icon-hourglass-stop {
25-
background-image: image-url('icons/time_stop.png');
26-
}
27-
28-
.icon-hourglass-continue {
29-
background-image: image-url('icons/time_continue.png');
30-
}
31-
32-
.icon-hourglass-join {
33-
background-image: image-url('icons/arrow_join.png');
23+
.context-menu-selection a:hover svg.icon-svg {
24+
stroke: #c61a1a;
3425
}
3526

3627
.flash {

0 commit comments

Comments
 (0)