-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathinit.rb
More file actions
executable file
·24 lines (21 loc) · 787 Bytes
/
init.rb
File metadata and controls
executable file
·24 lines (21 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'redmine'
require 'uv'
require 'ultraviolet_syntax_patch'
Redmine::Plugin.register :redmine_ultraviolet do
name "Redmine Ultraviolet Syntax highlighting plugin"
author "Chris Gahan"
description "Uses Textmate's syntaxes highlighters to highlight files in the source code repository."
version "0.0.3"
# Create a dropdown list in the UI so the user can pick a theme.
if UserCustomField.table_exists?
unless UserCustomField.find_by_name('Ultraviolet Theme')
UserCustomField.create(
:name => 'Ultraviolet Theme',
:default_value => Uv::DEFAULT_THEME,
:possible_values => Uv::THEMES, # see ultraviolet_syntax_patch.rb
:field_format => 'list',
:is_required => true
)
end
end
end