From b44a60889d8f2229ac860b1f630d1a8ece9d2670 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sat, 3 Aug 2024 11:13:55 +0900 Subject: [PATCH 01/11] update redmine versions in the github workflows --- .github/workflows/redmine_plugin.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/redmine_plugin.yml b/.github/workflows/redmine_plugin.yml index c43d5c9..1f07652 100644 --- a/.github/workflows/redmine_plugin.yml +++ b/.github/workflows/redmine_plugin.yml @@ -11,13 +11,15 @@ jobs: fail-fast: false matrix: mat_env: + - '3.3 redmica/redmica@v3.0.1' + - '3.2 redmica/redmica@v2.4.2' - '3.2 redmica/redmica@v2.3.2' - '3.1 redmica/redmica@v2.2.3' - '3.0 redmica/redmica@v2.2.3' - '2.7 redmica/redmica@v2.2.3' - - '3.2 redmine/redmine@5.1.0' - - '3.1 redmine/redmine@5.0.6' - - '3.0 redmine/redmine@5.0.6' + - '3.2 redmine/redmine@5.1.3' + - '3.1 redmine/redmine@5.0.9' + - '3.0 redmine/redmine@5.0.9' - '2.7 redmine/redmine@4.2.11' - '2.6 redmine/redmine@4.2.11' - '2.6 redmine/redmine@4.1.7' @@ -25,7 +27,7 @@ jobs: - '2.5 redmine/redmine@4.0.9' experimental: [false] include: - - mat_env: '3.2 redmica/redmica@master' + - mat_env: '3.3 redmica/redmica@master' experimental: true steps: - run: | From 2f226b5bcc666c1904e1bb1c3e4876be9b8ea1e8 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sat, 3 Aug 2024 01:01:52 +0900 Subject: [PATCH 02/11] Ignore `unloadable` if method missing --- app/controllers/scheduling_polls_controller.rb | 2 +- app/models/scheduling_poll.rb | 2 +- app/models/scheduling_poll_item.rb | 2 +- app/models/scheduling_vote.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/scheduling_polls_controller.rb b/app/controllers/scheduling_polls_controller.rb index 246f95c..ac0c3bc 100644 --- a/app/controllers/scheduling_polls_controller.rb +++ b/app/controllers/scheduling_polls_controller.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true class SchedulingPollsController < ApplicationController - unloadable + unloadable if respond_to?(:unloadable) before_action :set_scheduling_poll, :only => [:edit, :update, :show, :vote] before_action :set_scheduling_poll_by_issue_id, :only => [:show_by_issue] diff --git a/app/models/scheduling_poll.rb b/app/models/scheduling_poll.rb index 48f505c..fe472c1 100644 --- a/app/models/scheduling_poll.rb +++ b/app/models/scheduling_poll.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true class SchedulingPoll < ActiveRecord::Base - unloadable + unloadable if respond_to?(:unloadable) belongs_to :issue has_many :scheduling_poll_items, :dependent => :destroy diff --git a/app/models/scheduling_poll_item.rb b/app/models/scheduling_poll_item.rb index 0d9dc41..9b44143 100644 --- a/app/models/scheduling_poll_item.rb +++ b/app/models/scheduling_poll_item.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true class SchedulingPollItem < ActiveRecord::Base - unloadable + unloadable if respond_to?(:unloadable) belongs_to :scheduling_poll has_many :scheduling_votes, :dependent => :destroy diff --git a/app/models/scheduling_vote.rb b/app/models/scheduling_vote.rb index aa5fe25..8671e98 100644 --- a/app/models/scheduling_vote.rb +++ b/app/models/scheduling_vote.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true class SchedulingVote < ActiveRecord::Base - unloadable + unloadable if respond_to?(:unloadable) belongs_to :user belongs_to :scheduling_poll_item From 40e188ccffe9995f2f2d706de6da23e28a73ea00 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sat, 3 Aug 2024 09:50:36 +0900 Subject: [PATCH 03/11] Use ApplicationRecord instead of ActiveRecord::Base to follow https://www.redmine.org/issues/38975 --- app/models/scheduling_poll.rb | 2 +- app/models/scheduling_poll_item.rb | 2 +- app/models/scheduling_vote.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/scheduling_poll.rb b/app/models/scheduling_poll.rb index fe472c1..71b8b1e 100644 --- a/app/models/scheduling_poll.rb +++ b/app/models/scheduling_poll.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -class SchedulingPoll < ActiveRecord::Base +class SchedulingPoll < (defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base) unloadable if respond_to?(:unloadable) belongs_to :issue diff --git a/app/models/scheduling_poll_item.rb b/app/models/scheduling_poll_item.rb index 9b44143..a493a49 100644 --- a/app/models/scheduling_poll_item.rb +++ b/app/models/scheduling_poll_item.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -class SchedulingPollItem < ActiveRecord::Base +class SchedulingPollItem < (defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base) unloadable if respond_to?(:unloadable) belongs_to :scheduling_poll diff --git a/app/models/scheduling_vote.rb b/app/models/scheduling_vote.rb index 8671e98..6a243c9 100644 --- a/app/models/scheduling_vote.rb +++ b/app/models/scheduling_vote.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -class SchedulingVote < ActiveRecord::Base +class SchedulingVote < (defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base) unloadable if respond_to?(:unloadable) belongs_to :user From d52524166f824863b9c3d3984a174549011e5602 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sat, 3 Aug 2024 12:11:33 +0900 Subject: [PATCH 04/11] add "LoadError: cannot load such file -- blankslate" Issue HACK workaround for older versions to the github workflow --- .github/workflows/redmine_plugin.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/redmine_plugin.yml b/.github/workflows/redmine_plugin.yml index 1f07652..94fcc7d 100644 --- a/.github/workflows/redmine_plugin.yml +++ b/.github/workflows/redmine_plugin.yml @@ -80,6 +80,13 @@ jobs: contents: | gem 'loofah', '~> 2.20.0' if: contains(fromJSON('["2.6 redmine/redmine@4.1.7", "2.6 redmine/redmine@4.0.9", "2.5 redmine/redmine@4.0.9"]'), matrix.mat_env) + - name: "'LoadError: cannot load such file -- blankslate' Issue HACK ref. https://www.redmine.org/issues/40802#note-11" + uses: DamianReeves/write-file-action@v1.2 + with: + path: ./redmine/Gemfile.local + contents: | + gem 'builder', '~> 3.2.4' + if: contains(fromJSON('["3.2 redmica/redmica@v2.4.2", "3.2 redmica/redmica@v2.3.2", "3.1 redmica/redmica@v2.2.3", "3.0 redmica/redmica@v2.2.3", "2.7 redmica/redmica@v2.2.3", "2.6 redmine/redmine@4.1.7", "2.6 redmine/redmine@4.0.9", "2.5 redmine/redmine@4.0.9", "2.6 redmine/redmine@4.2.11", "2.7 redmine/redmine@4.2.11"]'), matrix.mat_env) - name: Before script run: | From f784ce9b632b3f4c8ec10123735d82ac88621d66 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sat, 3 Aug 2024 12:50:49 +0900 Subject: [PATCH 05/11] drop support redmine 4.0 and 4.1 --- .github/workflows/redmine_plugin.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/redmine_plugin.yml b/.github/workflows/redmine_plugin.yml index 94fcc7d..dd5b47e 100644 --- a/.github/workflows/redmine_plugin.yml +++ b/.github/workflows/redmine_plugin.yml @@ -22,9 +22,6 @@ jobs: - '3.0 redmine/redmine@5.0.9' - '2.7 redmine/redmine@4.2.11' - '2.6 redmine/redmine@4.2.11' - - '2.6 redmine/redmine@4.1.7' - - '2.6 redmine/redmine@4.0.9' - - '2.5 redmine/redmine@4.0.9' experimental: [false] include: - mat_env: '3.3 redmica/redmica@master' @@ -73,13 +70,6 @@ jobs: restore-keys: | ${{ runner.os }}-gems- - - name: uninitialized constant Nokogiri::HTML4 Issue HACK ref. https://qiita.com/Mattani/items/c4bcc95a72b69d1c0489 - uses: DamianReeves/write-file-action@v1.2 - with: - path: ./redmine/Gemfile.local - contents: | - gem 'loofah', '~> 2.20.0' - if: contains(fromJSON('["2.6 redmine/redmine@4.1.7", "2.6 redmine/redmine@4.0.9", "2.5 redmine/redmine@4.0.9"]'), matrix.mat_env) - name: "'LoadError: cannot load such file -- blankslate' Issue HACK ref. https://www.redmine.org/issues/40802#note-11" uses: DamianReeves/write-file-action@v1.2 with: From 25c78b35c5705d6cb0a0b1fd127d35835319e785 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sat, 3 Aug 2024 13:36:14 +0900 Subject: [PATCH 06/11] remove DateTime#to_s(:db) and use DateTime as-is Changed because DateTime#to_s(:db) is no longer supported in Rails7 --- test/fixtures/scheduling_polls.yml | 4 ++-- test/fixtures/scheduling_votes.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/fixtures/scheduling_polls.yml b/test/fixtures/scheduling_polls.yml index c102dec..e294546 100644 --- a/test/fixtures/scheduling_polls.yml +++ b/test/fixtures/scheduling_polls.yml @@ -2,8 +2,8 @@ schduling_polls_001: id: 1 issue_id: 1 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> schduling_polls_002: id: 2 issue_id: 2 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> diff --git a/test/fixtures/scheduling_votes.yml b/test/fixtures/scheduling_votes.yml index 2f98684..60a3898 100644 --- a/test/fixtures/scheduling_votes.yml +++ b/test/fixtures/scheduling_votes.yml @@ -4,40 +4,40 @@ scheduling_vote_001: user_id: 1 scheduling_poll_item_id: 1 value: 3 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> scheduling_vote_002: id: 2 user_id: 1 scheduling_poll_item_id: 2 value: 3 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> scheduling_vote_003: id: 3 user_id: 1 scheduling_poll_item_id: 3 value: 3 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> scheduling_vote_004: id: 4 user_id: 2 scheduling_poll_item_id: 1 value: 2 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> scheduling_vote_005: id: 5 user_id: 2 scheduling_poll_item_id: 2 value: 3 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> scheduling_vote_006: id: 6 user_id: 2 scheduling_poll_item_id: 3 value: 4 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> scheduling_vote_007: id: 7 user_id: 3 scheduling_poll_item_id: 1 value: 1 - created_at: <%= 1.minute.ago.to_s(:db) %> + created_at: <%= 1.minute.ago %> From 78cc2b110dc61cc5f064377b900f66409e0a216f Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sat, 3 Aug 2024 13:43:12 +0900 Subject: [PATCH 07/11] update actions/checkout@v4, actions/cache@v4 and DamianReeves/write-file-action@v1.3 to run on node20 --- .github/workflows/redmine_plugin.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/redmine_plugin.yml b/.github/workflows/redmine_plugin.yml index dd5b47e..9955575 100644 --- a/.github/workflows/redmine_plugin.yml +++ b/.github/workflows/redmine_plugin.yml @@ -42,11 +42,11 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ./${{ env.PLUGIN_NAME }} - name: Set up Redmine - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ env.REDMINE_REPOSITORY }} ref: ${{ env.REDMINE_REF }} @@ -55,7 +55,7 @@ jobs: - name: Copy the plugin files to plugin directory run: cp -pr ./${{ env.PLUGIN_NAME }} ./redmine/plugins/${{ env.PLUGIN_NAME }} - name: Create redmine/config/database.yml - uses: DamianReeves/write-file-action@v1.2 + uses: DamianReeves/write-file-action@v1.3 with: path: ./redmine/config/database.yml contents: | @@ -63,7 +63,7 @@ jobs: adapter: sqlite3 database: db/redmine_test.db - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ./redmine/vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('./redmine/**/Gemfile.lock') }} @@ -71,7 +71,7 @@ jobs: ${{ runner.os }}-gems- - name: "'LoadError: cannot load such file -- blankslate' Issue HACK ref. https://www.redmine.org/issues/40802#note-11" - uses: DamianReeves/write-file-action@v1.2 + uses: DamianReeves/write-file-action@v1.3 with: path: ./redmine/Gemfile.local contents: | From a78cf0ee42d86ba8e1595ff2a0c10a7a1e8952f3 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Tue, 26 Nov 2024 21:58:20 +0900 Subject: [PATCH 08/11] introduce tabler-icons for redmine 6.0 --- app/helpers/scheduling_polls_helper.rb | 10 +++++ app/views/scheduling_polls/_form.html.erb | 10 ++++- .../_scheduling_poll_item_form.html.erb | 31 ++++++++++---- app/views/scheduling_polls/show.html.erb | 14 ++++++- assets/images/icons.svg | 42 +++++++++++++++++++ config/icon_source.yml | 14 +++++++ 6 files changed, 109 insertions(+), 12 deletions(-) create mode 100644 assets/images/icons.svg create mode 100644 config/icon_source.yml diff --git a/app/helpers/scheduling_polls_helper.rb b/app/helpers/scheduling_polls_helper.rb index 151b617..afa75e8 100644 --- a/app/helpers/scheduling_polls_helper.rb +++ b/app/helpers/scheduling_polls_helper.rb @@ -46,4 +46,14 @@ def render_date_related_parameter_of_issue(issue) s.html_safe end + if defined? IconsHelper # redmine >= 7.0 + include IconsHelper + def scheduling_icon_with_label(icon_name, label_text, icon_only: false, size: 18, css_class: nil) + label_classes = ["icon-label"] + label_classes << "hidden" if icon_only + plugin = 'redmine_scheduling_poll' + sprite_icon(icon_name, size: size, css_class: css_class, plugin: plugin) + content_tag(:span, label_text, class: label_classes.join(' ')) + end + end + end diff --git a/app/views/scheduling_polls/_form.html.erb b/app/views/scheduling_polls/_form.html.erb index abac286..08e521a 100644 --- a/app/views/scheduling_polls/_form.html.erb +++ b/app/views/scheduling_polls/_form.html.erb @@ -22,7 +22,13 @@ - <%= link_to_function l(:label_add_scheduling_poll_item), "scheduling_polls_add_item(\"#{escape_javascript(add_item_tmpl)}\")", :class => 'icon icon-add', :id => 'scheduling_poll_add_item_link' %> + <% if defined? scheduling_icon_with_label %><%# redmine >= 7.0 %> + <%= link_to_function(scheduling_icon_with_label('add', l(:label_add_scheduling_poll_item)), + "scheduling_polls_add_item(\"#{escape_javascript(add_item_tmpl)}\")", + :class => 'icon icon-add', :id => 'scheduling_poll_add_item_link') %> + <% else %> + <%= link_to_function l(:label_add_scheduling_poll_item), "scheduling_polls_add_item(\"#{escape_javascript(add_item_tmpl)}\")", :class => 'icon icon-add', :id => 'scheduling_poll_add_item_link' %> + <% end %> @@ -44,8 +50,8 @@ function scheduling_polls_update_date_picker(enable) { if (enable) { $("form .scheduling_poll_item_text:not([disabled]):not([readonly])").datepicker({ dateFormat: '#{Setting.plugin_redmine_scheduling_poll["scheduling_poll_item_date_format"]}', + buttonImage: '#{asset_path('calendar.png')}', // TODO // redmine < 7.0 showOn: 'button', buttonImageOnly: true, - buttonImage: '#{path_to_image('/images/calendar.png')}', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true, changeMonth: true, changeYear: true }); diff --git a/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb b/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb index 2a9c4d5..bc5f4b0 100644 --- a/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb +++ b/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb @@ -9,13 +9,28 @@ <%= f_item.hidden_field :position, :value => f_item.index %> - <%= link_to_function image_tag('2uparrow.png', :alt => l(:label_sort_highest), :plugin => 'redmine_scheduling_poll'), - "scheduling_poll_move_item_position(-2, #{f_item.index})", :title => l(:label_sort_highest) %> - <%= link_to_function image_tag('1uparrow.png', :alt => l(:label_sort_higher), :plugin => 'redmine_scheduling_poll'), - "scheduling_poll_move_item_position(-1, #{f_item.index})", :title => l(:label_sort_higher) %> - <%= link_to_function image_tag('1downarrow.png', :alt => l(:label_sort_lower), :plugin => 'redmine_scheduling_poll'), - "scheduling_poll_move_item_position(+1, #{f_item.index})", :title => l(:label_sort_lower) %> - <%= link_to_function image_tag('2downarrow.png', :alt => l(:label_sort_lowest), :plugin => 'redmine_scheduling_poll'), - "scheduling_poll_move_item_position(+2, #{f_item.index})", :title => l(:label_sort_lowest) %> + <% if defined? scheduling_icon_with_label %><%# redmine >= 7.0 %> + <%= link_to_function(scheduling_icon_with_label('arrows-up', l(:label_sort_highest)), + "scheduling_poll_move_item_position(-2, #{f_item.index})", :title => l(:label_sort_highest), + :class => 'icon-only icon-arrows-up') %> + <%= link_to_function(scheduling_icon_with_label('arrow-up', l(:label_sort_higher)), + "scheduling_poll_move_item_position(-1, #{f_item.index})", :title => l(:label_sort_higher), + :class => 'icon-only icon-arrow-up') %> + <%= link_to_function(scheduling_icon_with_label('arrow-down', l(:label_sort_lower)), + "scheduling_poll_move_item_position(+1, #{f_item.index})", :title => l(:label_sort_lower), + :class => 'icon-only icon-arrow-down') %> + <%= link_to_function(scheduling_icon_with_label('arrows-down', l(:label_sort_lowest)), + "scheduling_poll_move_item_position(+2, #{f_item.index})", :title => l(:label_sort_lowest), + :class => 'icon-only icon-arrows-down') %> + <% else %> + <%= link_to_function image_tag('2uparrow.png', :alt => l(:label_sort_highest), :plugin => 'redmine_scheduling_poll'), + "scheduling_poll_move_item_position(-2, #{f_item.index})", :title => l(:label_sort_highest) %> + <%= link_to_function image_tag('1uparrow.png', :alt => l(:label_sort_higher), :plugin => 'redmine_scheduling_poll'), + "scheduling_poll_move_item_position(-1, #{f_item.index})", :title => l(:label_sort_higher) %> + <%= link_to_function image_tag('1downarrow.png', :alt => l(:label_sort_lower), :plugin => 'redmine_scheduling_poll'), + "scheduling_poll_move_item_position(+1, #{f_item.index})", :title => l(:label_sort_lower) %> + <%= link_to_function image_tag('2downarrow.png', :alt => l(:label_sort_lowest), :plugin => 'redmine_scheduling_poll'), + "scheduling_poll_move_item_position(+2, #{f_item.index})", :title => l(:label_sort_lowest) %> + <% end %> diff --git a/app/views/scheduling_polls/show.html.erb b/app/views/scheduling_polls/show.html.erb index a096542..d6ea9a8 100644 --- a/app/views/scheduling_polls/show.html.erb +++ b/app/views/scheduling_polls/show.html.erb @@ -11,7 +11,12 @@
- <%= link_to l(:label_edit_scheduling_poll_items), scheduling_poll_edit_url(@poll), :class => 'icon icon-edit' %> + <% if defined? scheduling_icon_with_label %><%# redmine >= 7.0 %> + <%= link_to(scheduling_icon_with_label('edit', l(:label_edit_scheduling_poll_items)), + scheduling_poll_edit_url(@poll), :class => 'icon icon-edit') %> + <% else %> + <%= link_to l(:label_edit_scheduling_poll_items), scheduling_poll_edit_url(@poll), :class => 'icon icon-edit' %> + <% end %>

<%= @poll.issue.subject %>

@@ -59,7 +64,12 @@
<% if User.current.allowed_to?(:vote_schduling_polls, @poll.issue.project) %>
- <%= link_to_function l(:label_add_comment_with_scheduling_poll_vote), '$("#vote_comment_fields").show();$(this).hide()', :class => 'icon icon-comment' %> + <% if defined? scheduling_icon_with_label %><%# redmine >= 7.0 %> + <%= link_to_function(scheduling_icon_with_label('comment', l(:label_add_comment_with_scheduling_poll_vote)), + '$("#vote_comment_fields").show();$(this).hide()', :class => 'icon icon-comment') %> + <% else %> + <%= link_to_function l(:label_add_comment_with_scheduling_poll_vote), '$("#vote_comment_fields").show();$(this).hide()', :class => 'icon icon-comment' %> + <% end %> +<% include_calendar_headers_tags %> <%= javascript_tag < 0)? false : true; } if (enable) { - $("form .scheduling_poll_item_text:not([disabled]):not([readonly])").datepicker({ + $("form .scheduling_poll_item_text:not([disabled]):not([readonly])").datepicker($.extend(datepickerOptions, { dateFormat: '#{Setting.plugin_redmine_scheduling_poll["scheduling_poll_item_date_format"]}', - buttonImage: '#{asset_path('calendar.png')}', // TODO // redmine < 7.0 - showOn: 'button', buttonImageOnly: true, - showButtonPanel: true, showWeek: true, showOtherMonths: true, - selectOtherMonths: true, changeMonth: true, changeYear: true - }); + showOn: 'button', buttonImageOnly: true + })); } else { $("form .scheduling_poll_item_text").datepicker("destroy"); } diff --git a/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb b/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb index bc5f4b0..4f903b5 100644 --- a/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb +++ b/app/views/scheduling_polls/_scheduling_poll_item_form.html.erb @@ -9,7 +9,7 @@ <%= f_item.hidden_field :position, :value => f_item.index %> - <% if defined? scheduling_icon_with_label %><%# redmine >= 7.0 %> + <% if defined? scheduling_icon_with_label %><%# redmine >= 6.0 %> <%= link_to_function(scheduling_icon_with_label('arrows-up', l(:label_sort_highest)), "scheduling_poll_move_item_position(-2, #{f_item.index})", :title => l(:label_sort_highest), :class => 'icon-only icon-arrows-up') %> diff --git a/app/views/scheduling_polls/show.html.erb b/app/views/scheduling_polls/show.html.erb index d6ea9a8..6642711 100644 --- a/app/views/scheduling_polls/show.html.erb +++ b/app/views/scheduling_polls/show.html.erb @@ -11,7 +11,7 @@
- <% if defined? scheduling_icon_with_label %><%# redmine >= 7.0 %> + <% if defined? scheduling_icon_with_label %><%# redmine >= 6.0 %> <%= link_to(scheduling_icon_with_label('edit', l(:label_edit_scheduling_poll_items)), scheduling_poll_edit_url(@poll), :class => 'icon icon-edit') %> <% else %> @@ -64,7 +64,7 @@
<% if User.current.allowed_to?(:vote_schduling_polls, @poll.issue.project) %>
- <% if defined? scheduling_icon_with_label %><%# redmine >= 7.0 %> + <% if defined? scheduling_icon_with_label %><%# redmine >= 6.0 %> <%= link_to_function(scheduling_icon_with_label('comment', l(:label_add_comment_with_scheduling_poll_vote)), '$("#vote_comment_fields").show();$(this).hide()', :class => 'icon icon-comment') %> <% else %> From a3844a8ae4c9805e26c2102b95f98dc9de337780 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sun, 1 Dec 2024 19:43:44 +0900 Subject: [PATCH 11/11] Update README and init.rb: specify licenses and bump Redmine version requirement to 4.2.0, update plugin version to 6.0.0. --- README.rdoc | 5 +++-- init.rb | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.rdoc b/README.rdoc index 64279eb..5b6d9a6 100644 --- a/README.rdoc +++ b/README.rdoc @@ -24,6 +24,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/cat-in == License -MIT License. -See the 'LICENSE.md' file. +* Codes: MIT License. +* Legacy Icons: famfamfam-silk: {CC-By-2.5}[https://creativecommons.org/licenses/by/2.5/] by Mark James http://www.famfamfam.com/lab/icons/silk/ +* Vector Icons: {Tabler Icons}[https://tabler.io/]: MIT License diff --git a/init.rb b/init.rb index 6da2ad2..c63969b 100644 --- a/init.rb +++ b/init.rb @@ -2,12 +2,12 @@ require File.expand_path('../lib/redmine_scheduling_poll/hooks', __FILE__) Redmine::Plugin.register :redmine_scheduling_poll do - requires_redmine :version_or_higher => '4.0.0' + requires_redmine :version_or_higher => '4.2.0' name 'Scheduling Poll plugin' author '@cat_in_136' description 'provide simple polls to scheduling appointments' - version '5.0.0' + version '6.0.0' url 'https://github.com/cat-in-136/redmine_scheduling_poll' author_url 'https://github.com/cat-in-136/'