Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (53 sloc) 2.17 KB
require 'redmine'
# Hooks
require 'todo_issues_hook'
# Patches to the Redmine core
require 'dispatcher'
Dispatcher.to_prepare do
require_dependency 'project'
require_dependency 'user'
#application.rb changed names between rails verisons - hack for backwards compatibility
require_dependency 'application_controller'
rescue MissingSourceFile
require_dependency 'application'
#This file loads some associations into the core redmine classes, like associations to todos.
require 'patch_redmine_classes'
require 'todo_issues_controller_patch'
# Add module to Project.
Project.send(:include, TodosProjectPatch)
# Add module to User, once.
User.send(:include, TodosUserPatch)
IssuesController.send(:include, TodoIssuesControllerPatch)
Redmine::Plugin.register :redmine_todos_plugin do
name 'Redmine Todo Lists plugin'
author 'David Lyons'
description 'A plugin to create and manage agile-esque todo lists on a per project basis.'
version ''
settings :default => {
'todos_auto_complete_parent' => false
}, :partial => 'settings/settings'
project_module :todo_lists do
permission :view_todos, {:todos => [:index, :show] }
permission :edit_todos,
{:todos => [:create, :destroy, :new, :toggle_complete, :sort, :edit, :update],
:issues => [:create, :destroy, :new, :toggle_complete, :sort, :edit, :update]}
permission :use_personal_todos,
{:mytodos => [:index,:destroy, :new, :create, :toggle_complete, :index, :sort, :edit, :update]}
menu :top_menu, :mytodos, { :controller => 'mytodos', :action => 'index' },
:caption => :my_todos_title,
:if => {
User.current.allowed_to?(:use_personal_todos, nil, :global => true)
menu :project_menu, :todos, {:controller => 'todos', :action => 'index'},
:caption => :label_todo_plural, :after => :new_issue, :param => :project_id
activity_provider :todos, :default => false
#fix required to make the plugin work in devel mode with rails 2.2
# as per
load_paths.each do |path|
Jump to Line
Something went wrong with that request. Please try again.