forked from cforce/projects_tree_view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
28 lines (21 loc) · 898 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'redmine'
# Patches to the Redmine core.
require 'dispatcher'
Redmine::Plugin.register :projects_tree_view do
name 'Projects Tree View plugin'
author 'Chris Peterson and github contributors'
description 'This is a Redmine plugin which will turn the projects page into a tree view'
version '0.0.5'
settings :default => {
'show_project_progress' => true
}, :partial => 'settings/project_tree_settings'
end
class ProjectsTreeViewListener < Redmine::Hook::ViewListener
# Adds javascript and stylesheet tags
def view_layouts_base_html_head(context)
javascript_include_tag('projects_tree_view', :plugin => :projects_tree_view) +
stylesheet_link_tag('projects_tree_view', :plugin => :projects_tree_view)
end
end
require File.dirname(__FILE__) + '/lib/projectstreeview_projects_helper_patch'
ProjectsHelper.send(:include, ProjectstreeviewProjectsHelperPatch)