forked from HugoHasenbein/redmine_all_thumbnails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
61 lines (54 loc) · 2.33 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# encoding: utf-8
#
# Redmine plugin to show all files as file icons or thumbnails
#
# Copyright © 2018 Stephan Wenzel <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
# **1.0.6** supports redmine 5+
# **1.0.5** supports redmine 4+
# **1.0.4** enhanced visual appearance of config dialog
# - cleaned up and simplified code
# - added configuration choice to unselect images and pdf for icons
# **1.0.3** enhanced compatibility with other preview plugins
# - added icon for eml-files (email) to icon set 2
# **1.0.2** Moved parts of code to enhance compatibility with other plugins
# - separated functionality from Redmine Thumbnail PDF
# - separated functionality from Redmine Preview PDF
# - added setup choice to either use SVG (fast) or PNG (more compatible) as thumbnails / icons
#
# **1.0.1** Running on Redmine 3.4.6
require 'redmine'
Redmine::Plugin.register :redmine_all_thumbnails do
name 'Redmine All Thumbnails'
author 'Stephan Wenzel'
description 'This is a plugin for Redmine to show all files as file icons or thumnails'
version '1.0.6'
url 'https://github.com/HugoHasenbein/redmine_all_thumbnails'
author_url 'https://github.com/HugoHasenbein/redmine_all_thumbnails'
settings :default => {'use_icon_set' => 'Icons-Square-O',
'use_svg' => '1',
'image_icons' => '1',
'pdf_icons' => '1'
},
:partial => 'settings/redmine_all_thumbnails/plugin_settings'
end
REDMINE_ALL_THUMBNAILS_CONVERT_BIN =
( Redmine::Configuration['imagemagick_convert_command'] ||
'convert'
).freeze
require_relative "lib/redmine_all_thumbnails"