redmine_extensions 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/easy_settings/edit.html.erb +1 -1
- data/config/locales/cs.yml +1 -0
- data/config/locales/en.yml +2 -1
- data/lib/generators/redmine_extensions/entity/entity_generator.rb +5 -2
- data/lib/generators/redmine_extensions/entity/templates/_form.html.erb.erb +1 -1
- data/lib/generators/redmine_extensions/entity/templates/en.yml.erb +3 -0
- data/lib/generators/redmine_extensions/entity/templates/query.rb.erb +1 -5
- data/lib/generators/redmine_extensions/plugin/plugin_generator.rb +8 -8
- data/lib/generators/redmine_extensions/plugin/templates/Gemfile.erb +1 -1
- data/lib/generators/redmine_extensions/plugin/templates/init.rb.erb +2 -2
- data/lib/redmine_extensions/engine.rb +4 -1
- data/lib/redmine_extensions/redmine_patches/controllers/application_controller_patch.rb +1 -0
- data/lib/redmine_extensions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 522809041f3581f46743acc33b566970816ef331
|
4
|
+
data.tar.gz: 2f5bc4832ae3a5137d7baa8181b23104166265a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbea58638eefc30064982eaca6c6608fd0142c74cd3d864921c6dd5ca8c3cdcdf12d9e525516b00531dec69990dd6e9631286e1431c70a258ba7960d56c217b5
|
7
|
+
data.tar.gz: 45ff9282544268cfa20c6f7e55546475d9ea300c3b1b41214ba7bf21b0ed955d7f8a1bd4506811d74c4b5fde1d998da92c539a991821fb0118586c482572871c
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= form_for([redmine_extensions_engine, @easy_settings]) do |f| %>
|
2
2
|
<%= render "easy_settings/#{@easy_settings.plugin.id}", easy_settings: @easy_settings, settings: @settings, form: f %>
|
3
3
|
|
4
|
-
<%= f.submit class: 'button-2' %>
|
4
|
+
<%= f.submit l(:button_update_easy_settings), class: 'button-2' %>
|
5
5
|
<% end %>
|
data/config/locales/cs.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -48,7 +48,10 @@ module RedmineExtensions
|
|
48
48
|
|
49
49
|
if File.exists?("#{plugin_path}/config/locales/en.yml")
|
50
50
|
append_to_file "#{plugin_path}/config/locales/en.yml" do
|
51
|
-
"\n
|
51
|
+
"\n easy_query:" +
|
52
|
+
"\n name:" +
|
53
|
+
"\n #{model_name_underscored}_query: #{model_name_pluralize_underscored.titleize}" +
|
54
|
+
"\n heading_#{model_name_underscored}_new: New #{model_name_underscored.titleize}" +
|
52
55
|
"\n heading_#{model_name_underscored}_edit: Edit #{model_name_underscored.titleize}" +
|
53
56
|
"\n button_#{model_name_underscored}_new: New #{model_name_underscored.titleize}" +
|
54
57
|
"\n label_#{model_name_pluralize_underscored}: #{@model_name_pluralize_underscored.titleize}" +
|
@@ -104,7 +107,7 @@ module RedmineExtensions
|
|
104
107
|
end
|
105
108
|
|
106
109
|
if File.exists?("#{plugin_path}/init.rb")
|
107
|
-
s = "\nActiveSupport.on_load(:
|
110
|
+
s = "\nActiveSupport.on_load(:easyproject, yield: true) do"
|
108
111
|
s << "\n require '#{plugin_name_underscored}/#{model_name_underscored}_hooks'\n"
|
109
112
|
s << "\n Redmine::AccessControl.map do |map|"
|
110
113
|
s << "\n map.project_module :#{model_name_pluralize_underscored} do |pmap|"
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%- if column_options[:query_type] == 'string' || column_options[:query_type] == 'integer' -%>
|
15
15
|
<%%= f.text_field :<%= column_name %> %>
|
16
16
|
<%- elsif column_options[:query_type] == 'list' || column_options[:query_type] == 'list_optional' -%>
|
17
|
-
<%%= f.select :<%= column_name %>, <%= column_options[:class] %>.all.collect{|x| [x.<%= column_options[:list_class_name] %>, x.id]}, include_blank: true %>
|
17
|
+
<%%= f.select :<%= column_name %>, <%= column_options[:class] %>.all.collect{|x| [x.<%= column_options[:list_class_name] %>, x.id]}.sort, include_blank: true %>
|
18
18
|
<%- elsif column_options[:query_type] == 'text' -%>
|
19
19
|
<%%= f.text_area :<%= column_name %>, :cols => 60, :rows => (<%= model_name_underscored %>.<%= column_name %>.blank? ? 10 : [[10, <%= model_name_underscored %>.<%= column_name %>.length / 50].max, 100].min), :accesskey => accesskey(:edit), :class => 'wiki-edit' %>
|
20
20
|
<%%= wikitoolbar_for '<%= model_name_underscored %>_<%= column_name %>' %>
|
@@ -1,4 +1,7 @@
|
|
1
1
|
en:
|
2
|
+
easy_query:
|
3
|
+
name:
|
4
|
+
<%= model_name_underscored %>_query: <%= model_name_pluralize_underscored.titleize %>
|
2
5
|
heading_<%= model_name_underscored %>_new: New <%= model_name_underscored.titleize %>
|
3
6
|
heading_<%= model_name_underscored %>_edit: Edit <%= model_name_underscored.titleize %>
|
4
7
|
button_<%= model_name_underscored %>_new: New <%= model_name_underscored.titleize %>
|
@@ -2,10 +2,6 @@ class <%= model_name %>Query < EasyQuery
|
|
2
2
|
|
3
3
|
self.queried_class = <%= model_name %>
|
4
4
|
|
5
|
-
def entity
|
6
|
-
<%= model_name %>
|
7
|
-
end
|
8
|
-
|
9
5
|
def initialize_available_filters
|
10
6
|
<%- db_columns.each do |column_name, column_options| -%>
|
11
7
|
<%- if project? && column_name == 'project_id' -%>
|
@@ -25,7 +21,7 @@ class <%= model_name %>Query < EasyQuery
|
|
25
21
|
return @available_columns if @available_columns
|
26
22
|
|
27
23
|
<%- db_columns.each do |column_name, column_options| -%>
|
28
|
-
add_available_column '<%= column_options[:query_column_name] || column_name %>',
|
24
|
+
add_available_column '<%= column_options[:query_column_name] || column_name %>', title: <%= model_name %>.human_attribute_name(:<%= column_name %>)
|
29
25
|
<%- end -%>
|
30
26
|
<%- if acts_as_customizable? -%>
|
31
27
|
@available_columns += <%= model_name %>CustomField.visible.collect {|cf| QueryCustomFieldColumn.new(cf) }
|
@@ -29,10 +29,10 @@ module RedmineExtensions
|
|
29
29
|
empty_directory "#{plugin_path}/config/locales"
|
30
30
|
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}"
|
31
31
|
|
32
|
-
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/
|
33
|
-
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/
|
34
|
-
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/
|
35
|
-
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/
|
32
|
+
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/controllers"
|
33
|
+
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/helpers"
|
34
|
+
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/models"
|
35
|
+
empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/others"
|
36
36
|
|
37
37
|
template 'gitkeep.erb', "#{plugin_path}/app/controllers/.gitkeep"
|
38
38
|
template 'gitkeep.erb', "#{plugin_path}/app/helpers/.gitkeep"
|
@@ -41,7 +41,7 @@ module RedmineExtensions
|
|
41
41
|
template 'gitkeep.erb', "#{plugin_path}/db/migrate/.gitkeep"
|
42
42
|
template 'gitkeep.erb', "#{plugin_path}/assets/images/.gitkeep"
|
43
43
|
template 'gitkeep.erb', "#{plugin_path}/assets/javascripts/.gitkeep"
|
44
|
-
template 'gitkeep.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/
|
44
|
+
template 'gitkeep.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/others/.gitkeep"
|
45
45
|
|
46
46
|
template 'Gemfile.erb', "#{plugin_path}/Gemfile"
|
47
47
|
template 'init.rb.erb', "#{plugin_path}/init.rb"
|
@@ -49,9 +49,9 @@ module RedmineExtensions
|
|
49
49
|
template 'routes.rb.erb', "#{plugin_path}/config/routes.rb"
|
50
50
|
template 'hooks.rb.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/hooks.rb"
|
51
51
|
template 'internals.rb.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/internals.rb"
|
52
|
-
template 'issue_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/
|
53
|
-
template 'issues_controller_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/
|
54
|
-
template 'issues_helper_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/
|
52
|
+
template 'issue_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/models/issue_patch.example"
|
53
|
+
template 'issues_controller_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/controllers/issues_controller_patch.example"
|
54
|
+
template 'issues_helper_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/easy_patch/redmine/helpers/issues_helper_patch.example"
|
55
55
|
end
|
56
56
|
|
57
57
|
hook_for :entity, as: :entity, in: :redmine_extensions, type: :boolean
|
@@ -1 +1 @@
|
|
1
|
-
gem 'redmine_extensions', '~> 0.0.
|
1
|
+
gem 'redmine_extensions', '~> 0.0.21'
|
@@ -3,14 +3,14 @@ Redmine::Plugin.register :<%= plugin_name_underscored %> do
|
|
3
3
|
author ''
|
4
4
|
author_url ''
|
5
5
|
description ''
|
6
|
-
version '<%= Date.today.strftime('%Y
|
6
|
+
version '<%= Date.today.strftime('%Y') %>'
|
7
7
|
|
8
8
|
#into easy_settings goes available setting as a symbol key, default value as a value
|
9
9
|
settings easy_settings: { }
|
10
10
|
end
|
11
11
|
|
12
12
|
|
13
|
-
Dir[File.dirname(__FILE__) + '/lib/<%= plugin_name_underscored %>/
|
13
|
+
Dir[File.dirname(__FILE__) + '/lib/<%= plugin_name_underscored %>/easy_patch/**/*.rb'].each {|file| require_dependency file }
|
14
14
|
|
15
15
|
# this block is executed once just after Redmine is started
|
16
16
|
# means after all plugins are initialized
|
@@ -9,6 +9,7 @@ module RedmineExtensions
|
|
9
9
|
path ||= engine.to_s.underscore.split('/').first
|
10
10
|
Rails.application.routes.draw do
|
11
11
|
mount engine => path
|
12
|
+
resources :easy_settings, only: [:edit]
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
@@ -44,7 +45,9 @@ module RedmineExtensions
|
|
44
45
|
js_dir = app.root.join('public', 'javascripts', 'redmine_extensions')
|
45
46
|
FileUtils.mkdir(js_dir) unless File.directory?(js_dir)
|
46
47
|
Dir.glob( root.join('app', 'assets', 'javascripts', 'redmine_extensions', '*.js') ) do |js_file|
|
47
|
-
|
48
|
+
begin
|
49
|
+
FileUtils.cp(js_file, app.root.join('public', 'javascripts', 'redmine_extensions'))
|
50
|
+
end
|
48
51
|
end
|
49
52
|
end
|
50
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Easy Software Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|