redmine_extensions 0.3.7 → 0.3.8

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
  SHA256:
3
- metadata.gz: 2a09c29deceeb65baa0a4b83ea1546cdf8a316535ac6813777889b7aa45d0661
4
- data.tar.gz: 2946755a797aea4a7b5d135d893cc67e6d1b352c565022553e35342c52f1f8a2
3
+ metadata.gz: 43090983135f2872e6d875c01dd8dd14e2fa283a22875523ed333f8db564956d
4
+ data.tar.gz: 5813f361926b6c6593533de210922856cb26c73d0125f426e63a74dadd50b026
5
5
  SHA512:
6
- metadata.gz: bbf4463f41a86b822392978939c9902c31071e05745f419abc50ca1f2d893cd5c1098c009ac4361d3b3078fa6aa2a27710d7d9a7023c823bf4dd9dc908fd9d35
7
- data.tar.gz: 354ce6a7fcd2d02b718e4642280083e4af5592be0542d92ce4a1142e4f53200c8ed53c22917c4e5d375a735396fb8358fe23315306699029b872c13583efdc4e
6
+ metadata.gz: 8b551fb2bdc8d8514893db78f3f190c011149c28d9185febdf85c620cb69d04966c3adea4a362f9d272699a12049a0d3dd802b7adefc6c12856efe5b1ec68ee9
7
+ data.tar.gz: c5332242b8c34ca715bbcddaa410469254d08a0b9e5d8be37744c9579e8fda4f1e8552137dac93bdd7989a21df170cf5d2a4af06bf7f68c3597c8fb706faf4f7
@@ -284,7 +284,7 @@ module RedmineExtensions
284
284
  end
285
285
 
286
286
  content_tag(:span, :class => 'easy-multiselect-tag-container') do
287
- text_field_tag('', '', (options[:html_options] || {}).merge(id: options[:id])) +
287
+ search_field_tag('', '', (options[:html_options] || {}).merge(id: options[:id])) +
288
288
  late_javascript_tag("$('##{options[:id]}').easymultiselect({multiple: #{options[:multiple]}, rootElement: #{options[:rootElement].to_json}, inputName: '#{name}', preload: #{options[:preload]}, combo: #{options[:combo]}, source: #{source}, selected: #{selected_values.to_json}, show_toggle_button: #{options[:show_toggle_button]}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options]||{}).to_json} });")
289
289
  end
290
290
  end
@@ -1,38 +1,38 @@
1
1
  <%%= fields_for :<%= model_name_underscored %>, <%= model_name_underscored %> do |f| %>
2
2
  <%- if project? -%>
3
3
  <%% if <%= model_name_underscored %>.safe_attribute?('project_id') && !@project %>
4
- <p>
5
- <%%= f.label :project_id, ::<%= model_name %>.human_attribute_name(:project_id) %>
6
- <%%= f.select :project_id, Project.allowed_to(:manage_<%= model_name_pluralize_underscored %>).collect{|x| [x.name, x.id]}, include_blank: true %>
7
- </p>
4
+ <p>
5
+ <%%= f.label :project_id, ::<%= model_name %>.human_attribute_name(:project_id) %>
6
+ <%%= f.select :project_id, Project.allowed_to(:manage_<%= model_name_pluralize_underscored %>).collect{|x| [x.name, x.id]}, include_blank: true %>
7
+ </p>
8
8
  <%% end %>
9
9
  <%- end -%>
10
10
  <%- safe_columns.each do |column_name, column_options| -%>
11
11
  <%% if <%= model_name_underscored %>.safe_attribute?('<%= column_name %>') %>
12
- <p>
13
- <%%= f.label :<%= column_name %>, ::<%= model_name %>.human_attribute_name(:<%= column_name %>) %>
14
- <%- if column_options[:query_type] == 'string' || column_options[:query_type] == 'integer' -%>
15
- <%%= f.text_field :<%= column_name %> %>
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]}.sort, include_blank: true %>
18
- <%- elsif column_options[:query_type] == 'text' -%>
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
- <%%= wikitoolbar_for '<%= model_name_underscored %>_<%= column_name %>' %>
21
- <%- elsif column_options[:query_type] == 'boolean' -%>
22
- <%%= f.radio_button :<%= column_name %>, false %>
23
- <%- else -%>
24
- <%%= f.text_field :<%= column_name %> %>
25
- <%- end -%>
26
- </p>
12
+ <p>
13
+ <%%= f.label :<%= column_name %>, ::<%= model_name %>.human_attribute_name(:<%= column_name %>) %>
14
+ <%- if column_options[:query_type] == 'string' || column_options[:query_type] == 'integer' -%>
15
+ <%%= f.text_field :<%= column_name %> %>
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]}.sort, include_blank: true %>
18
+ <%- elsif column_options[:query_type] == 'text' -%>
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
+ <%%= wikitoolbar_for '<%= model_name_underscored %>_<%= column_name %>' %>
21
+ <%- elsif column_options[:query_type] == 'boolean' -%>
22
+ <%%= f.radio_button :<%= column_name %>, false %>
23
+ <%- else -%>
24
+ <%%= f.text_field :<%= column_name %> %>
25
+ <%- end -%>
26
+ </p>
27
27
  <%% end %>
28
28
  <%- end -%>
29
29
  <% associations.each do |assoc| %>
30
30
  <%- next if assoc[1][:type] == 'has_many' -%>
31
31
  <% association_name = assoc[0] %>
32
- <p>
33
- <%%= f.label l(:label_<%= association_name %>) %>
34
- <%%= f.select :<%= association_name %>_id, <%= association_name.camelcase %>.visible.sorted.map{ |<%= association_name %>| [<%= association_name %>.to_s, <%= association_name %>.id]} %>
35
- </p>
32
+ <p>
33
+ <%%= f.label l(:label_<%= association_name %>) %>
34
+ <%%= f.select :<%= association_name %>_id, <%= association_name.camelcase %>.visible.sorted.map{ |<%= association_name %>| [<%= association_name %>.to_s, <%= association_name %>.id]} %>
35
+ </p>
36
36
  <% end %>
37
37
  <%- if acts_as_customizable? -%>
38
38
  <%% custom_field_values = <%= model_name_underscored %>.visible_custom_field_values %>
@@ -43,6 +43,9 @@
43
43
  <%% end %>
44
44
  <%- end -%>
45
45
  <%- if acts_as_attachable? -%>
46
- <p id="attachments_form"><label><%%= l(:label_attachment_plural) %></label><%%= render :partial => 'attachments/form', :locals => {:container => <%= model_name_underscored %>} %></p>
46
+ <p id="attachments_form">
47
+ <label><%%= l(:label_attachment_plural) %></label>
48
+ <%%= render partial: 'attachments/form', locals: { container: <%= model_name_underscored %> } %>
49
+ </p>
47
50
  <%- end -%>
48
51
  <%% end %>
@@ -1,5 +1,5 @@
1
- <%%= form_tag({}, :data => {:cm_url => context_menu_<%= model_name_pluralize_underscored %>_path}) do -%>
2
- <%%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>
1
+ <%%= form_tag({}, data: {cm_url: context_menu_<%= model_name_pluralize_underscored %>_path}) do %>
2
+ <%%= hidden_field_tag 'back_url', url_for(params: request.query_parameters), id: nil %>
3
3
  <div class="autoscroll">
4
4
  <table class="list odd-even entities">
5
5
  <thead>
@@ -15,55 +15,56 @@
15
15
  </tr>
16
16
  </thead>
17
17
  <tbody>
18
- <%% grouped_query_results(entities, @query) do |entity, group_name, group_count, group_totals| -%>
19
- <%% if group_name %>
20
- <%% reset_cycle %>
21
- <tr class="group open">
22
- <td colspan="<%%= @query.inline_columns.size + 2 %>">
23
- <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
24
- <span class="name"><%%= group_name %></span>
25
- <%% if group_count %>
26
- <span class="count"><%%= group_count %></span>
27
- <%% end %>
28
- <span class="totals"><%%= group_totals %></span>
29
- <%%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
30
- "toggleAllRowGroups(this)", class: 'toggle-all') %>
31
- </td>
32
- </tr>
33
- <%% end %>
34
- <tr id="entity_id_<%%= entity.id %>" class="entity <%%= cycle('odd', 'even') %> hascontextmenu">
35
- <td class="checkbox hide-when-print"><%%= check_box_tag("ids[]", entity.id, false, id: nil) %></td>
36
- <%% @query.inline_columns.each do |column| %>
37
- <%%= content_tag('td', column_content(column, entity), class: column.css_classes) %>
18
+ <%% grouped_query_results(entities, @query) do |entity, group_name, group_count, group_totals| %>
19
+ <%% if group_name %>
20
+ <%% reset_cycle %>
21
+ <tr class="group open">
22
+ <td colspan="<%%= @query.inline_columns.size + 2 %>">
23
+ <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
24
+ <span class="name"><%%= group_name %></span>
25
+ <%% if group_count %>
26
+ <span class="count"><%%= group_count %></span>
27
+ <%% end %>
28
+ <span class="totals"><%%= group_totals %></span>
29
+ <%%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
30
+ 'toggleAllRowGroups(this)', class: 'toggle-all') %>
31
+ </td>
32
+ </tr>
38
33
  <%% end %>
39
- <td class="buttons">
40
- <%% if entity.editable_by?(User.current) -%>
41
- <%%= link_to l(:button_edit), edit_<%= model_name_underscored %>_path(entity),
42
- title: l(:button_edit),
43
- class: 'icon-only icon-edit' %>
44
- <%%= link_to l(:button_delete), <%= model_name_underscored %>_path(entity),
45
- data: {confirm: l(:text_are_you_sure)},
46
- method: :delete,
47
- title: l(:button_delete),
48
- class: 'icon-only icon-del' %>
49
- <%% end -%>
50
- </td>
51
- </tr>
52
- <%% @query.block_columns.each do |column|
53
- if (text = column_content(column, entity)) && text.present? -%>
54
- <tr class="<%%= current_cycle %>">
55
- <td colspan="<%%= @query.inline_columns.size + 1 %>" class="<%%= column.css_classes %>">
56
- <%% if query.block_columns.count > 1 %>
57
- <span><%%= column.caption %></span>
34
+ <tr id="entity_id_<%%= entity.id %>" class="entity <%%= cycle('odd', 'even') %> hascontextmenu">
35
+ <td class="checkbox hide-when-print"><%%= check_box_tag('ids[]', entity.id, false, id: nil) %></td>
36
+ <%% @query.inline_columns.each do |column| %>
37
+ <%%= content_tag('td', column_content(column, entity), class: column.css_classes) %>
38
+ <%% end %>
39
+ <td class="buttons">
40
+ <%% if entity.editable_by?(User.current) %>
41
+ <%%= link_to l(:button_edit), edit_<%= model_name_underscored %>_path(entity),
42
+ title: l(:button_edit),
43
+ class: 'icon-only icon-edit' %>
44
+ <%%= link_to l(:button_delete), <%= model_name_underscored %>_path(entity),
45
+ data: {confirm: l(:text_are_you_sure)},
46
+ method: :delete,
47
+ title: l(:button_delete),
48
+ class: 'icon-only icon-del' %>
58
49
  <%% end %>
59
- <%%= text %>
60
50
  </td>
61
51
  </tr>
62
- <%% end -%>
63
- <%% end -%>
64
- <%% end -%>
52
+ <%% @query.block_columns.each do |column| %>
53
+ <%% if (text = column_content(column, entity)) && text.present? %>
54
+ <tr class="<%%= current_cycle %>">
55
+ <td colspan="<%%= @query.inline_columns.size + 1 %>" class="<%%= column.css_classes %>">
56
+ <%% if query.block_columns.count > 1 %>
57
+ <span><%%= column.caption %></span>
58
+ <%% end %>
59
+ <%%= text %>
60
+ </td>
61
+ </tr>
62
+ <%% end %>
63
+ <%% end %>
64
+ <%% end %>
65
65
  </tbody>
66
66
  </table>
67
67
  </div>
68
- <%% end -%>
69
- <%%= context_menu %>
68
+ <%% end %>
69
+
70
+ <%%= context_menu %>
@@ -1,9 +1,9 @@
1
1
  <ul>
2
- <%% if @<%= model_name_underscored %> && !@<%= model_name_underscored %>.new_record? %>
3
- <li><%%= link_to l(:button_edit), edit_polymorphic_path([@project, @<%= model_name_underscored %>]), title: l(:button_edit), class: 'icon icon-edit button' %></li>
4
- <%% end %>
5
- <%% if @<%= model_name_underscored %>.nil? %>
6
- <li><%%= link_to l(:button_<%= model_name_underscored %>_new), new_polymorphic_path([@project, :<%= model_name_underscored %>]), title: l(:title_<%= model_name_underscored %>_new), class: 'icon icon-add button button-positive' %></li>
7
- <%% end %>
8
- <li><%%= link_to l(:label_<%= model_name_pluralize_underscored %>), polymorphic_path([@project, :<%= model_name_pluralize_underscored %>], set_filter: '1'), title: l(:label_<%= model_name_pluralize_underscored %>), class: 'icon icon-folder button' %></li>
9
- </ul>
2
+ <%% if @<%= model_name_underscored %> && !@<%= model_name_underscored %>.new_record? %>
3
+ <%%= content_tag(:li, link_to(l(:button_edit), edit_polymorphic_path([@project, @<%= model_name_underscored %>]), title: l(:button_edit), class: 'icon icon-edit button')) %>
4
+ <%% end %>
5
+ <%% if @<%= model_name_underscored %>.nil? %>
6
+ <%%= content_tag(:li, link_to(l(:button_<%= model_name_underscored %>_new), new_polymorphic_path([@project, :<%= model_name_underscored %>]), title: l(:title_<%= model_name_underscored %>_new), class: 'icon icon-add button button-positive'))
7
+ <%% end %>
8
+ <%%= content_tag(:li, link_to(l(:label_<%= model_name_pluralize_underscored %>), polymorphic_path([@project, :<%= model_name_pluralize_underscored %>], set_filter: '1'), title: l(:label_<%= model_name_pluralize_underscored %>), class: 'icon icon-folder button')) %>
9
+ </ul>
@@ -1,21 +1,20 @@
1
1
  <ul>
2
- <%% if @<%= model_name_underscored %> -%>
3
- <li><%%= context_menu_link l(:button_edit), edit_<%= model_name_underscored %>_path(@<%= model_name_underscored %>), class: 'icon icon-edit', disabled: !@can[:edit] %></li>
4
- <%% end %>
5
- <%% if @safe_attributes.include? 'status' -%>
2
+ <%% if @<%= model_name_underscored %> %>
3
+ <li><%%= context_menu_link l(:button_edit), edit_<%= model_name_underscored %>_path(@<%= model_name_underscored %>), class: 'icon icon-edit', disabled: !@can[:edit] %></li>
4
+ <%% end %>
5
+ <%% if @safe_attributes.include? 'status' %>
6
6
  <li class="folder">
7
- <a href="#" class="submenu icon icon-issue-status" onclick="return false;"><%%= l(:field_status) -%></a>
7
+ <a href="#" class="submenu icon icon-issue-status" onclick="return false;"><%%= l(:field_status) %></a>
8
8
  <ul>
9
- <%% <%= model_name %>.statuses.keys.each do |s| -%>
9
+ <%% <%= model_name %>.statuses.keys.each do |status| %>
10
10
  <li>
11
- <%%= context_menu_link l("<%= model_name_underscored %>.statuses.#{s}"), bulk_update_<%= model_name_underscored %>_path(id: @<%= model_name_underscored %>_ids, <%= model_name_underscored %>: {status: s}, back_url: @back), method: :put,
12
- selected: (@selected[:status] == s), disabled: !@can[:edit], confirm: l(:text_are_you_sure) %>
11
+ <%%= context_menu_link l("<%= model_name_underscored %>.statuses.#{status}"), bulk_update_<%= model_name_underscored %>_path(id: @<%= model_name_underscored %>_ids, <%= model_name_underscored %>: { status: status }, back_url: @back), method: :put, selected: (@selected[:status] == status), disabled: !@can[:edit], confirm: l(:text_are_you_sure) %>
13
12
  </li>
14
- <%% end -%>
13
+ <%% end %>
15
14
  </ul>
16
15
  </li>
17
16
  <%% end %>
18
- <li><%%= context_menu_link l(:button_delete), <%= model_name_underscored %>_path(id: @<%= model_name_underscored %>_ids, back_url: @back), method: :delete, data: {confirm: l(:text_are_you_sure)}, class: 'icon icon-del', disabled: !@can[:delete] %></li>
17
+ <li><%%= context_menu_link l(:button_delete), <%= model_name_underscored %>_path(id: @<%= model_name_underscored %>_ids, back_url: @back), method: :delete, data: { confirm: l(:text_are_you_sure) }, class: 'icon icon-del', disabled: !@can[:delete] %></li>
19
18
 
20
- <%%= call_hook(:view_<%= model_name_pluralize_underscored %>_context_menu_end, {<%= model_name_underscored %>: @<%= model_name_underscored %>, <%= model_name_pluralize_underscored %>: @<%= model_name_pluralize_underscored %>, can: @can, back: @back, project: @project}) %>
19
+ <%%= call_hook(:view_<%= model_name_pluralize_underscored %>_context_menu_end, { <%= model_name_underscored %>: @<%= model_name_underscored %>, <%= model_name_pluralize_underscored %>: @<%= model_name_pluralize_underscored %>, can: @can, back: @back, project: @project }) %>
21
20
  </ul>
@@ -1,6 +1,6 @@
1
1
  <%%= title l(:heading_<%= model_name_underscored %>_edit) %>
2
2
 
3
- <%%= form_for([@project, @<%= model_name_underscored %>], html: {multipart: <%= acts_as_attachable? %>, id: '<%= model_name_underscored %>_form', class: 'tabular', remote: request.xhr?}) do |f| %>
3
+ <%%= form_for([@project, @<%= model_name_underscored %>], html: { multipart: <%= acts_as_attachable? %>, id: '<%= model_name_underscored %>_form', class: 'tabular', remote: request.xhr? }) do |f| %>
4
4
  <%%= error_messages_for @<%= model_name_underscored %> %>
5
5
 
6
6
  <div class="box">
@@ -15,5 +15,5 @@
15
15
  <%% end %>
16
16
  <%% ### PAGE CUSTOMS ########################################################## %>
17
17
  <%% content_for :sidebar do %>
18
- <%%= render :partial => '<%= model_name_pluralize_underscored %>/sidebar' %>
19
- <%% end %>
18
+ <%%= render partial: '<%= model_name_pluralize_underscored %>/sidebar' %>
19
+ <%% end %>
@@ -2,14 +2,14 @@ var modal = $("#ajax-modal");
2
2
  modal.html("<%%= j render(template: '<%= model_name_pluralize_underscored %>/edit', formats: [:html]) %>");
3
3
  showModal(modal.attr("id"));
4
4
  var submitButton = {
5
- text:"<%%=j l(:button_update) -%>",
6
- title:"<%%=j l(:button_update) -%>",
5
+ text:"<%%=j l(:button_update) %>",
6
+ title:"<%%=j l(:button_update) %>",
7
7
  click: function() {$(this).find('form').submit()},
8
8
  'class': 'button-positive'
9
9
  };
10
10
  var closeButton = {
11
- text: "<%%=j l(:button_close) -%>",
12
- title: "<%%=j l(:button_close) -%>",
11
+ text: "<%%=j l(:button_close) %>",
12
+ title: "<%%=j l(:button_close) %>",
13
13
  click: function() {$(this).dialog('close');},
14
14
  'class': 'button'
15
15
  };
@@ -1,3 +1,3 @@
1
1
  api.array :<%= model_name_pluralize_underscored %>, api_meta(total_count: @entity_count, offset: @offset, limit: @limit) do
2
- render(@entities, {api: api})
3
- end
2
+ render(@entities, { api: api })
3
+ end
@@ -4,7 +4,7 @@
4
4
  <%%= context_menu context_menu_<%= model_name_pluralize_underscored %>_path(project_id: @project) %>
5
5
  <%% content_for :sidebar do %>
6
6
  <%%= render partial: '<%= model_name_pluralize_underscored %>/sidebar' %>
7
- <%%= render partial: 'sidebar/saved_easyqueries_by_type', locals: {query_class: @query.class, project: @project} %>
7
+ <%%= render partial: 'sidebar/saved_easyqueries_by_type', locals: { query_class: @query.class, project: @project } %>
8
8
  <%% end %>
9
9
  <% else %>
10
10
  <div class="contextual">
@@ -27,4 +27,4 @@
27
27
  <span class="pagination"><%%= pagination_links_full @entity_pages, @entity_count %></span>
28
28
  <%% end %>
29
29
  <%% end %>
30
- <% end %>
30
+ <% end %>
@@ -2,8 +2,8 @@ var modal = $("#ajax-modal");
2
2
  modal.html("<%%= j render(template: '<%= model_name_pluralize_underscored %>/index', formats: [:html]) %>");
3
3
  showModal(modal.attr("id"));
4
4
  var closeButton = {
5
- text: "<%%=j l(:button_close) -%>",
6
- title: "<%%=j l(:button_close) -%>",
5
+ text: "<%%=j l(:button_close) %>",
6
+ title: "<%%=j l(:button_close) %>",
7
7
  click: function() {$(this).dialog('close');},
8
8
  'class': 'button'
9
9
  };
@@ -1,10 +1,10 @@
1
1
  <%%= title l(:heading_<%= model_name_underscored %>_new) %>
2
2
 
3
- <%%= form_for([@project, @<%= model_name_underscored %>], html: {multipart: <%= acts_as_attachable? %>, id: '<%= model_name_underscored %>_form', class: 'tabular', remote: request.xhr?}) do |f| %>
3
+ <%%= form_for([@project, @<%= model_name_underscored %>], html: { multipart: <%= acts_as_attachable? %>, id: '<%= model_name_underscored %>_form', class: 'tabular', remote: request.xhr? }) do |f| %>
4
4
  <%%= error_messages_for @<%= model_name_underscored %> %>
5
5
 
6
6
  <div class="box">
7
- <%%= render partial: 'form', locals: {<%= model_name_underscored %>: @<%= model_name_underscored %>} %>
7
+ <%%= render partial: 'form', locals: { <%= model_name_underscored %>: @<%= model_name_underscored %> } %>
8
8
  </div>
9
9
 
10
10
  <%% if !request.xhr? %>
@@ -15,5 +15,5 @@
15
15
  <%% end %>
16
16
  <%% ### PAGE CUSTOMS ########################################################## %>
17
17
  <%% content_for :sidebar do %>
18
- <%%= render :partial => '<%= model_name_pluralize_underscored %>/sidebar' %>
19
- <%% end %>
18
+ <%%= render partial: '<%= model_name_pluralize_underscored %>/sidebar' %>
19
+ <%% end %>
@@ -2,14 +2,14 @@ var modal = $("#ajax-modal");
2
2
  modal.html("<%%= j render(template: '<%= model_name_pluralize_underscored %>/new', formats: [:html]) %>");
3
3
  showModal(modal.attr("id"));
4
4
  var submitButton = {
5
- text:"<%%=j l(:button_create) -%>",
6
- title:"<%%=j l(:button_create) -%>",
5
+ text:"<%%=j l(:button_create) %>",
6
+ title:"<%%=j l(:button_create) %>",
7
7
  click: function() {$(this).find('form').submit()},
8
8
  'class': 'button-positive'
9
9
  };
10
10
  var closeButton = {
11
- text: "<%%=j l(:button_close) -%>",
12
- title: "<%%=j l(:button_close) -%>",
11
+ text: "<%%=j l(:button_close) %>",
12
+ title: "<%%=j l(:button_close) %>",
13
13
  click: function() {$(this).dialog('close');},
14
14
  'class': 'button'
15
15
  };
@@ -22,9 +22,9 @@
22
22
  <%% end %>
23
23
  <%- if acts_as_customizable? -%>
24
24
  <hr />
25
- <%%= render partial: 'redmine_extensions/custom_field_rows', :locals => { :custom_field_values => @<%= model_name_underscored %>.visible_custom_field_values } %>
25
+ <%%= render partial: 'redmine_extensions/custom_field_rows', locals: { custom_field_values: @<%= model_name_underscored %>.visible_custom_field_values } %>
26
26
  <%- end -%>
27
- <%%= call_hook(:view_<%= model_name_pluralize_underscored %>_show_details_bottom, :<%= model_name_underscored %> => @<%= model_name_underscored %>) %>
27
+ <%%= call_hook(:view_<%= model_name_pluralize_underscored %>_show_details_bottom, :<%= model_name_underscored%>: @<%= model_name_underscored %>) %>
28
28
  </table>
29
29
  <%- if description_column? -%>
30
30
  <%% if !@<%= model_name_underscored %>.<%= description_column %>.blank? %>
@@ -38,13 +38,13 @@
38
38
  <%% end %>
39
39
  <%- end -%>
40
40
  <%- if acts_as_attachable? -%>
41
- <%% if @<%= model_name_underscored %>.attachments.any? -%>
41
+ <%% if @<%= model_name_underscored %>.attachments.any? %>
42
42
  <hr />
43
- <%%= link_to_attachments @<%= model_name_underscored %>, :thumbnails => true %>
43
+ <%%= link_to_attachments @<%= model_name_underscored %>, thumbnails: true %>
44
44
  <%% end %>
45
45
  <%- end -%>
46
46
  </div>
47
47
  <%% ### PAGE CUSTOMS ########################################################## %>
48
48
  <%% content_for :sidebar do %>
49
- <%%= render :partial => '<%= model_name_pluralize_underscored %>/sidebar' %>
50
- <%% end %>
49
+ <%%= render partial: '<%= model_name_pluralize_underscored %>/sidebar' %>
50
+ <%% end %>
@@ -2,8 +2,8 @@ var modal = $("#ajax-modal");
2
2
  modal.html("<%%= j render(template: '<%= model_name_pluralize_underscored %>/show', formats: [:html]) %>");
3
3
  showModal(modal.attr("id"));
4
4
  var closeButton = {
5
- text: "<%%=j l(:button_close) -%>",
6
- title: "<%%=j l(:button_close) -%>",
5
+ text: "<%%=j l(:button_close) %>",
6
+ title: "<%%=j l(:button_close) %>",
7
7
  click: function() {$(this).dialog('close');},
8
8
  'class': 'button'
9
9
  };
@@ -1,3 +1,3 @@
1
1
  module RedmineExtensions
2
- VERSION = '0.3.7'
2
+ VERSION = '0.3.8'
3
3
  end
@@ -3,13 +3,13 @@ RSpec.describe 'autocomplete', type: :feature, js: true, logged: :admin do
3
3
  describe 'render' do
4
4
  it 'generate default autocomplete' do
5
5
  visit '/dummy_autocompletes'
6
- expect(page).to have_css('input#default[type="text"]')
6
+ expect(page).to have_css('input#default[type="search"]')
7
7
  expect(page).to have_css('input[type="hidden"][name="default"][value="value1"]', visible: false)
8
8
  end
9
9
 
10
10
  it 'generate autocomplete_field in form_for' do
11
11
  visit '/dummy_autocompletes'
12
- expect(page).to have_css('input#dummy_entities_autocomplete[type="text"]')
12
+ expect(page).to have_css('input#dummy_entities_autocomplete[type="search"]')
13
13
  expect(page).to have_css('input[type="hidden"][name="dummy_entity[array_of_dummies][]"][value="value1"]', visible: false)
14
14
  end
15
15
  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.7
4
+ version: 0.3.8
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-28 00:00:00.000000000 Z
11
+ date: 2019-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails