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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7ac333edb2cc8180083916b31b0427f4d21b24f
4
- data.tar.gz: 9229dd36b4d816a8e3ee17429b4f66a6a0c9b12f
3
+ metadata.gz: 522809041f3581f46743acc33b566970816ef331
4
+ data.tar.gz: 2f5bc4832ae3a5137d7baa8181b23104166265a6
5
5
  SHA512:
6
- metadata.gz: 5c46f1ee46fcaa2746e96fb2bc8cfb38f9fbb9d6f7596d41365bb2e192f49b81cf1c1f0c672f15a2ef4f9f7b13f5ab8fc4e810662e531234f84a576cda311885
7
- data.tar.gz: e5c2521b4c39108aa090369cf1af674f59642e9a49d1f9cf411c173d798f45751a5f2cb26fbf9771720e81a427e3f6cf309a671bc1e8d0dc8d830856fb2232cc
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 %>
@@ -1,2 +1,3 @@
1
1
  cs:
2
2
  nothing: Nothing
3
+ button_update_easy_settings: Upravit nastavení
@@ -1,2 +1,3 @@
1
1
  en:
2
- nothing: Nothing
2
+ nothing: Nothing
3
+ button_update_easy_settings: Update settings
@@ -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 heading_#{model_name_underscored}_new: New #{model_name_underscored.titleize}" +
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(:active_record) do"
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 %>', caption: <%= model_name %>.human_attribute_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}/redmine_patch/controllers"
33
- empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/redmine_patch/helpers"
34
- empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/redmine_patch/models"
35
- empty_directory "#{plugin_path}/lib/#{plugin_name_underscored}/redmine_patch/others"
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}/redmine_patch/others/.gitkeep"
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}/redmine_patch/models/issue_patch.example"
53
- template 'issues_controller_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/redmine_patch/controllers/issues_controller_patch.example"
54
- template 'issues_helper_patch.example.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/redmine_patch/helpers/issues_helper_patch.example"
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.12'
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.01.01') %>'
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 %>/redmine_patch/*/*.rb'].each {|file| require file }
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
- FileUtils.cp(js_file, app.root.join('public', 'javascripts', 'redmine_extensions'))
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
@@ -6,6 +6,7 @@ module RedmineExtensions
6
6
  base.send(:include, InstanceMethods)
7
7
 
8
8
  base.class_eval do
9
+ helper_method :easy_extensions?
9
10
  end
10
11
  end
11
12
 
@@ -1,3 +1,3 @@
1
1
  module RedmineExtensions
2
- VERSION = '0.0.22'
2
+ VERSION = '0.0.23'
3
3
  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.22
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-03-18 00:00:00.000000000 Z
11
+ date: 2016-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails