redmine_extensions 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generators/redmine_extensions/entity/entity_generator.rb +13 -9
- data/lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/edit.html.erb.tt +5 -5
- data/lib/generators/redmine_extensions/entity/templates/app/views/%model_name_pluralize_underscored%/new.html.erb.tt +5 -5
- data/lib/redmine_extensions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a09c29deceeb65baa0a4b83ea1546cdf8a316535ac6813777889b7aa45d0661
|
4
|
+
data.tar.gz: 2946755a797aea4a7b5d135d893cc67e6d1b352c565022553e35342c52f1f8a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbf4463f41a86b822392978939c9902c31071e05745f419abc50ca1f2d893cd5c1098c009ac4361d3b3078fa6aa2a27710d7d9a7023c823bf4dd9dc908fd9d35
|
7
|
+
data.tar.gz: 354ce6a7fcd2d02b718e4642280083e4af5592be0542d92ce4a1142e4f53200c8ed53c22917c4e5d375a735396fb8358fe23315306699029b872c13583efdc4e
|
@@ -57,12 +57,10 @@ module RedmineExtensions
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def copy_templates
|
60
|
-
template '_form.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/_form.html.erb"
|
61
60
|
template '_sidebar.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/_sidebar.html.erb"
|
62
61
|
template 'context_menu.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/context_menu.html.erb"
|
63
62
|
template 'controller.rb.erb', "#{plugin_path}/app/controllers/#{model_name_pluralize_underscored}_controller.rb"
|
64
63
|
template('custom_field.rb.erb', "#{plugin_path}/app/models/#{model_name_underscored}_custom_field.rb") if acts_as_customizable?
|
65
|
-
template 'edit.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/edit.html.erb"
|
66
64
|
template 'edit.js.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/edit.js.erb"
|
67
65
|
|
68
66
|
tests_root = rys ? './spec' : "#{plugin_path}/test"
|
@@ -104,11 +102,10 @@ module RedmineExtensions
|
|
104
102
|
|
105
103
|
template 'migration.rb.erb', "#{plugin_path}/db/migrate/#{Time.now.strftime('%Y%m%d%H%M%S%L')}_create_#{@model_name_pluralize_underscored}.rb"
|
106
104
|
template 'model.rb.erb', "#{plugin_path}/app/models/#{model_name_underscored}.rb"
|
107
|
-
template 'new.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/new.html.erb"
|
108
105
|
template 'new.js.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/new.js.erb"
|
109
106
|
|
110
107
|
if easy?
|
111
|
-
|
108
|
+
easy_model_template '%model_name_underscored%_query.rb'
|
112
109
|
template 'entity_attribute_helper_patch.rb.erb', "#{plugin_path}/extra/easy_patch/easy_extensions/helpers/entity_attribute_helper_patch.rb"
|
113
110
|
|
114
111
|
if File.exists?("#{plugin_path}/extra/easy_patch/easy_extensions/helpers/entity_attribute_helper_patch.rb")
|
@@ -239,15 +236,22 @@ module RedmineExtensions
|
|
239
236
|
template 'show.js.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/show.js.erb"
|
240
237
|
|
241
238
|
# New templates
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
template 'app/views/%model_name_pluralize_underscored%/edit.html.erb'
|
239
|
+
easy_view_template '_%model_name_underscored%.api.rsb'
|
240
|
+
easy_view_template '_form.html.erb'
|
241
|
+
easy_view_template 'new.html.erb'
|
242
|
+
easy_view_template 'edit.html.erb'
|
247
243
|
end
|
248
244
|
|
249
245
|
private
|
250
246
|
|
247
|
+
def easy_model_template(name)
|
248
|
+
template "app/models/#{name}", "#{plugin_path}/app/models/#{name}"
|
249
|
+
end
|
250
|
+
|
251
|
+
def easy_view_template(name)
|
252
|
+
template "app/views/%model_name_pluralize_underscored%/#{name}", "#{plugin_path}/app/views/%model_name_pluralize_underscored%/#{name}"
|
253
|
+
end
|
254
|
+
|
251
255
|
def easy?
|
252
256
|
Redmine::Plugin.installed?(:easy_extensions)
|
253
257
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%%= title l(:heading_<%= model_name_underscored %>_edit) %>
|
2
2
|
|
3
|
-
<%%= render partial: 'form', locals: { <%= model_name_underscored %>: @<%= model_name_underscored %>
|
3
|
+
<%%= render partial: 'form', locals: { <%= model_name_underscored %>: @<%= model_name_underscored %> } %>
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
<%% ### PAGE CUSTOMS ########################################################## %>
|
6
|
+
<%% content_for :sidebar do %>
|
7
|
+
<%%= render partial: '<%= model_name_pluralize_underscored %>/sidebar' %>
|
8
|
+
<%% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%%= title l(:heading_<%= model_name_underscored %>_new) %>
|
2
2
|
|
3
|
-
<%%= render partial: 'form', locals: { <%= model_name_underscored %>: @<%= model_name_underscored %>
|
3
|
+
<%%= render partial: 'form', locals: { <%= model_name_underscored %>: @<%= model_name_underscored %> } %>
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
<%% ### PAGE CUSTOMS ########################################################## %>
|
6
|
+
<%% content_for :sidebar do %>
|
7
|
+
<%%= render partial: '<%= model_name_pluralize_underscored %>/sidebar' %>
|
8
|
+
<%% 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.3.
|
4
|
+
version: 0.3.7
|
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: 2019-11-
|
11
|
+
date: 2019-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|