hydra-editor 0.0.1 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 485ad6a61a209f14ea02123a1d2c4d7e211f6370
|
4
|
+
data.tar.gz: ffae1f8424ce1a0478a4c0054ccc20cf1e4a19c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d53ed374df9271eea953254dbd4845d13639dc56e4316602039e5543f3cfd28ff165abce67010d3d8f86be275e057da57b5df79dcb1c713e881007bcee2a1d
|
7
|
+
data.tar.gz: 57a0b8ab3547a469d40b24f9f0fd2dcc2da91a29058b1a25008a7f7a3b4e40ec50ab17a81febfb522ac07932e3c880de925f9eb04d964c33d4e30a84289f7191
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% render_req ||= true # render_req is true for single file edit, false for batch edit%>
|
2
2
|
<div class="control-group">
|
3
|
-
<% vals =
|
4
|
-
<% if render_req &&
|
3
|
+
<% vals = record[key] %>
|
4
|
+
<% if render_req && record.required?(key) %>
|
5
5
|
<% tmp = '<span class="error">*</span>' + field_label(key) %>
|
6
6
|
<%= f.label key, tmp.html_safe, :class=>"control-label" %>
|
7
7
|
<% else %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<% vals.to_ary.each_with_index do |v, index| %>
|
12
|
-
<%= render_edit_field_partial(key, f:f, v: v, index: index, render_req: render_req) %>
|
12
|
+
<%= render_edit_field_partial(key, record: record, f:f, v: v, index: index, render_req: render_req) %>
|
13
13
|
<% end %>
|
14
14
|
</div><!-- /control-group -->
|
15
15
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<%= bootstrap_form_for
|
1
|
+
<%= bootstrap_form_for record, :url=>record.new_record? ? hydra_editor.records_path : hydra_editor.record_path(record), html: {:class => 'form-inline editor'} do |f| %>
|
2
2
|
<div id="descriptions_display">
|
3
3
|
<h2 class="non lower">Descriptions <small class="pull-right"><span class="error">*</span> indicates required fields</small> </h2>
|
4
4
|
<div class="well">
|
5
|
-
<%
|
6
|
-
<%= render :partial => "edit_field", :locals => {:f =>f, :render_req => true, :key => term } %>
|
5
|
+
<% record.terms_for_editing.each do |term| %>
|
6
|
+
<%= render :partial => "records/edit_field", :locals => {record: record, :f =>f, :render_req => true, :key => term } %>
|
7
7
|
<% end %>
|
8
8
|
</div><!-- /well -->
|
9
9
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="controls" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
|
2
|
-
<% required = render_req && (index == 0) &&
|
3
|
-
<%= text_field_tag "#{
|
4
|
-
<% unless
|
2
|
+
<% required = render_req && (index == 0) && record.required?(key) %>
|
3
|
+
<%= text_field_tag "#{record.class.model_name.underscore}[#{key.to_s}][]", v, :id => "#{record.class.model_name.underscore}_#{key.to_s}", :class => "input-large", :required => required %>
|
4
|
+
<% unless record.class.unique?(key) %>
|
5
5
|
<%= render :partial=>"records/edit_fields/suffix", :locals=>{key: key, index: index} %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
data/lib/hydra_editor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: active-fedora
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 6.3.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 6.3.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: sqlite3
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|