forked from MischaTheEvil/projects_tree_view
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
25 lines (20 loc) · 762 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
require 'redmine'
# Patches to the Redmine core.
require 'dispatcher'
require 'projectstreeview_projects_helper_patch'
Dispatcher.to_prepare do
ProjectsHelper.send(:include, ProjectstreeviewProjectsHelperPatch)
end
Redmine::Plugin.register :projects_tree_view do
name 'Projects Tree View plugin'
author 'Chris Peterson'
description 'This is a Redmine plugin which will turn the projects page into a tree view'
version '0.0.4'
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