hydra-editor 0.3.0 → 0.4.0
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/app/assets/javascripts/hydra-editor/multiForm.js +1 -1
- data/app/helpers/concerns/records_helper_behavior.rb +1 -1
- data/app/views/records/_edit_field.html.erb +1 -1
- data/app/views/records/edit_fields/_default.html.erb +4 -4
- data/app/views/records/edit_fields/_suffix.html.erb +7 -6
- data/lib/hydra_editor/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: c5937ac78d43f5fd201c63ef427ea0d6ea92a5dd
|
4
|
+
data.tar.gz: 3d49662b8bee6eec6e6b9a432dc4049dc8584832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0f9dbe37836743e76b213ecba5f70c7fa6802767ca9f904553c303fd2a359074ea1cd1f4800483b620f19ca47bceeb0dd965eeb6f7679fee974540a578ab5b5
|
7
|
+
data.tar.gz: b2bb49f551f84ce0967bc757efcbdf2eabc60610310a25f2d5263fb5f589ec369ff7923ce74f47bfa8dc4beba98a9b8b423dd66cf3c4927fdd635ce7fecdb5c3
|
@@ -74,7 +74,7 @@ module RecordsHelperBehavior
|
|
74
74
|
|
75
75
|
def more_or_less_button(key, html_class, symbol)
|
76
76
|
# TODO, there could be more than one element with this id on the page, but the fuctionality doesn't work without it.
|
77
|
-
content_tag('button', class: "#{html_class} btn", id: "additional_#{key}_submit", name: "additional_#{key}") do
|
77
|
+
content_tag('button', class: "#{html_class} btn btn-default", id: "additional_#{key}_submit", name: "additional_#{key}") do
|
78
78
|
(symbol +
|
79
79
|
content_tag('span', class: 'sr-only') do
|
80
80
|
"add another #{key.to_s}"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% render_req ||= true # render_req is true for single file edit, false for batch edit%>
|
2
|
-
<div class="
|
2
|
+
<div class="form-group">
|
3
3
|
<% vals = f.object[key] %>
|
4
4
|
<% if render_req && f.object.required?(key) %>
|
5
5
|
<% tmp = '<span class="error">*</span>' + field_label(key) %>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<div class="
|
2
|
-
<% required = render_req &&
|
3
|
-
<%= text_field_tag "#{ActiveModel::Naming.singular(f.object)}[#{key.to_s}][]", v,
|
1
|
+
<div class="input-group" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
|
2
|
+
<% required = render_req && index == 0 && f.object.required?(key) %>
|
3
|
+
<%= text_field_tag "#{ActiveModel::Naming.singular(f.object)}[#{key.to_s}][]", v, id: "#{ActiveModel::Naming.singular(f.object)}_#{key.to_s}", class: "form-control", required: required %>
|
4
4
|
<% unless f.object.class.unique?(key) %>
|
5
|
-
<%= render
|
5
|
+
<%= render "records/edit_fields/suffix", {key: key, index: index} %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
8
8
|
<div id="additional_<%= key %>_elements"></div>
|
@@ -1,6 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<span class="input-group-btn field-controls">
|
2
|
+
<% if index == 0 %>
|
3
|
+
<%= add_field(key) %>
|
4
|
+
<% else %>
|
5
|
+
<%= subtract_field(key) %>
|
6
|
+
<% end %>
|
7
|
+
</span>
|
data/lib/hydra_editor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-07-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|