Open akohlsmith opened 11 years ago
I managed to get it working with some #rails help.
did a gem install prototype-rails
to install the gem, then added
gem "prototype-rails"
to the Redmine Gemfile. Now that Redmine knows about it, I added
require 'prototype-rails'
to the list of requires in the plugin init.rb file. Now it will let me get into the issues reminder page, but I can't add any reminders, presumably because the query is empty and I can't add one.
Just tried to see if a public custom query would show up, and it crashes out since rails 3.2 does not have link_to_remote
; I changed it to link_to
based on this and it seems to work!
Patch attached.
diff --git a/app/views/reminders/index.html.erb b/app/views/reminders/index.html.erb
index dc9e010..86a4bdd 100644
--- a/app/views/reminders/index.html.erb
+++ b/app/views/reminders/index.html.erb
@@ -20,7 +20,7 @@
"$('reminder-#{reminder.id}-edit').show(); return false;",
:class => 'icon icon-edit'
%>
- <%= link_to_remote(l(:button_delete), { :url => {:controller => 'reminders', :action => 'destroy', :id => reminder},
+ <%= link_to(l(:button_delete), { :url => {:controller => 'reminders', :action => 'destroy', :id => reminder},
:method => :delete,
:confirm => l(:reminder_delete_confirmation)
}, :title => l(:button_delete),
diff --git a/init.rb b/init.rb
index 40612d9..278d01f 100644
--- a/init.rb
+++ b/init.rb
@@ -1,5 +1,6 @@
require 'redmine'
require 'active_support/core_ext'
+require 'prototype-rails'
# This plugin should be reloaded in development mode.
if Rails.env == 'development'
even after patching the plugin there are errors. :(
For example it isn't possible to change a reminder - nothing happens
or delete a reminder - 403 Error after http:host/reminders?confirm=Wollen+sie+diese+Erinnerung+wirklich+löschen%3F&method=delete&url[action]=destroy&url[controller]=reminders&url[id]=1
Fixed delete function for Redmine 2.5.1.stable (Rails 3)
diff --git a/app/views/reminders/index.html.erb b/app/views/reminders/index.html.erb
index c1fe610..d25d210 100644
--- a/app/views/reminders/index.html.erb
+++ b/app/views/reminders/index.html.erb
@@ -20,11 +20,10 @@
"$('reminder-#{reminder.id}-edit').show(); return false;",
:class => 'icon icon-edit'
%>
- <%= link_to(l(:button_delete), { :url => {:controller => 'reminders', :action => 'destroy', :id => reminder},
- :method => :delete,
- :confirm => l(:reminder_delete_confirmation)
- }, :title => l(:button_delete),
- :class => 'icon icon-del') %>
+ <%= link_to l(:button_delete),
+ {:controller => 'reminders', :action => :destroy, :id => reminder},
+ {:confirm => l(:reminder_delete_confirmation), :method => :delete, :remote => true, :title => l(:button_delete), :class => 'icon icon-del'}
+ %>
</td>
</tr>
<tr id="reminder-<%= reminder.id %>-edit" style="display:none">
rake db:migrate_plugins
creates the table correctly (the README saysdb:migrate:plugins
).I can enable the module for a project, but when I click on the new "issues reminder" tab for the project, I get an HTTP 500 error and the production.log has the following and an ugly backtrace:
This is because
remote_function
was removed from Rails 3.1.