forked from thorsten-de/redmine_user_import
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
28 lines (22 loc) · 1.12 KB
/
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'
require_dependency 'custom_fields_helper'
require 'csv_parser'
require 'login_generator'
Redmine::Plugin.register :redmine_user_import do
name 'Redmine User Import plugin'
author 'Hiroyuki SHIRAKAWA, Thorsten-Michael Deinert'
description 'User import from csv'
version '0.2.0'
url 'https://github.com/thorsten-de/redmine_user_import'
author_url 'http://twitter.com/#!/shrkwh, http://d.hatena.ne.jp/shrkw/'
# permission :import_user_csv, :user_import => :index
# caption localization does not work.
menu :admin_menu, :user_import, { :controller => 'user_import', :action => 'index' }, :caption => :user_import, after: :users, :if => Proc.new {User.current.admin?}, :html => {:class => 'icon groups'}
end
class IncludeSelect2ViewListener < Redmine::Hook::ViewListener
# Adds javascript and stylesheet tags
def view_layouts_base_html_head(context)
javascript_include_tag('https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js') +
stylesheet_link_tag('https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css')
end
end