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: 571d39b6d853b20a3baf98bc1d1caf420023706c
4
- data.tar.gz: 6ac9a10325b875a13436ed242ec16be90af61437
3
+ metadata.gz: 485ad6a61a209f14ea02123a1d2c4d7e211f6370
4
+ data.tar.gz: ffae1f8424ce1a0478a4c0054ccc20cf1e4a19c0
5
5
  SHA512:
6
- metadata.gz: aa37e1d8040349218d33d67d62e33f43f495dabdc0a61caf2800e990e8347e8854aa6d8e3566ff419bdaf9a4a3f1781d4f0ad9557cd3768c474e27f61329be61
7
- data.tar.gz: d5f804f41cb7b3d8fc043e54f1977b51110666e37ea3fced3acaed258b1d86d3e42a4e5c0cbadf5f0f504df3c87068307dd7e2fdb03010bb122b2a7fa029d1bd
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 = @record[key] %>
4
- <% if render_req && @record.required?(key) %>
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 @record, :url=>@record.new_record? ? hydra_editor.records_path : hydra_editor.record_path(@record), html: {:class => 'form-inline editor'} do |f| %>
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
- <% @record.terms_for_editing.each do |term| %>
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,3 +1,3 @@
1
1
  <h1>Edit <%= Array(@record.title).first %></h1>
2
- <%= render :partial=>'form' %>
2
+ <%= render :partial=>'form', locals: {record: @record} %>
3
3
 
@@ -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) && @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) %>
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>
@@ -1,3 +1,3 @@
1
1
  module HydraEditor
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-13 00:00:00.000000000 Z
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