forked from reubenmallaby/redmine_projects_accordion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
19 lines (16 loc) · 817 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Redmine::Plugin.register :redmine_projects_accordion do
name 'Redmine Projects Accordion plugin'
author 'Reuben Mallaby'
description 'This is a Redmine plugin which will turn the projects page into an accordion view using Accordion js'
version '0.0.1'
url 'http://isic.he-arc.ch'
author_url 'http://isic.he-arc.ch/isic-galerie-institut-equipe/reuben-mallaby'
end
class RedmineProjectsAccordionListener < Redmine::Hook::ViewListener
# Adds javascript and stylesheet tags
def view_layouts_base_html_head(context)
javascript_include_tag('accordion', :plugin => :redmine_projects_accordion) +
javascript_include_tag('redmine_projects_accordion', :plugin => :redmine_projects_accordion) +
stylesheet_link_tag('redmine_projects_accordion', :plugin => :redmine_projects_accordion)
end
end