hydra-editor 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +8 -25
- data/app/assets/javascripts/hydra-editor/multiForm.js +1 -1
- data/app/assets/stylesheets/hydra-editor/hydra-editor.css +0 -6
- data/app/helpers/concerns/records_helper_behavior.rb +1 -1
- data/app/views/records/_form.html.erb +8 -8
- data/app/views/records/_form_header.html.erb +4 -0
- data/config/routes.rb +1 -1
- data/lib/hydra-editor.rb +1 -2
- data/lib/hydra_editor/engine.rb +3 -0
- data/lib/hydra_editor/version.rb +1 -1
- metadata +62 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6661a8fe832c72842cbacaf90bb26a294a8da3be
|
4
|
+
data.tar.gz: c463048fbe5673bfa3b2f7aef4623b6ca7f9742c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d1e3a97ef5dd7c3aa1b7a4e6ef7116253d21165bcf54c1c00d3d1c10f7c656db3c62ac6cdeed55e5550863033654d7f7872022e9e732246a48a08eeee645e65
|
7
|
+
data.tar.gz: 27c5c1509eb5225c87121bf25dc63c87ffe825b3788ebc3666c07e84c5ed6e49db58774a5264acb100f12c8e84685345bc295a8a20024b5808975df77a1422dd
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# HydraEditor [![Gem Version](https://badge.fury.io/rb/hydra-editor.png)](http://badge.fury.io/rb/hydra-editor) [![Build Status](https://travis-ci.org/projecthydra/hydra-editor.png)](https://travis-ci.org/projecthydra/hydra-editor)
|
1
|
+
# HydraEditor [![Gem Version](https://badge.fury.io/rb/hydra-editor.png)](http://badge.fury.io/rb/hydra-editor) [![Build Status](https://travis-ci.org/projecthydra-labs/hydra-editor.png)](https://travis-ci.org/projecthydra-labs/hydra-editor)
|
2
2
|
|
3
3
|
|
4
4
|
To use add to your gemfile:
|
data/Rakefile
CHANGED
@@ -23,32 +23,15 @@ end
|
|
23
23
|
|
24
24
|
Bundler::GemHelper.install_tasks
|
25
25
|
|
26
|
-
dummy = File.expand_path('../spec/dummy', __FILE__)
|
27
|
-
rakefile = File.join(dummy, 'Rakefile')
|
28
|
-
|
29
|
-
desc "Remove the dummy app"
|
30
|
-
task :clean do
|
31
|
-
sh "rm -rf #{dummy}"
|
32
|
-
end
|
33
|
-
|
34
|
-
desc "Generate the dummy app"
|
35
|
-
task :setup do
|
36
|
-
unless File.exists?("#{dummy}/Rakefile")
|
37
|
-
`rails new #{dummy}`
|
38
|
-
`cp -r spec/support/lib/generators #{dummy}/lib`
|
39
|
-
Dir.chdir(dummy) do
|
40
|
-
puts "Generating test app ..."
|
41
|
-
sh "rails generate test_app"
|
42
|
-
sh "touch public/test.html" # for spec/features/record_editing_spec.rb
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
26
|
require 'rspec/core/rake_task'
|
27
|
+
RSpec::Core::RakeTask.new(:spec)
|
48
28
|
|
49
|
-
|
50
|
-
t.pattern = 'spec/**/*_spec.rb'
|
51
|
-
end
|
29
|
+
require 'engine_cart/rake_task'
|
52
30
|
|
31
|
+
task ci: ['engine_cart:generate'] do
|
32
|
+
ENV['environment'] = "test"
|
33
|
+
# run the tests
|
34
|
+
Rake::Task["spec"].invoke
|
35
|
+
end
|
53
36
|
|
54
|
-
task :
|
37
|
+
task default: :ci
|
@@ -11,7 +11,7 @@
|
|
11
11
|
var cloneElem = $('#'+cloneId).clone();
|
12
12
|
// change the add button to a remove button
|
13
13
|
var plusbttn = cloneElem.find('#'+this.id);
|
14
|
-
plusbttn.html('-<span class="
|
14
|
+
plusbttn.html('-<span class="sr-only">remove this '+ this.name.replace("_", " ") +'</span>');
|
15
15
|
plusbttn.on('click',removeField);
|
16
16
|
|
17
17
|
// remove the help tag on subsequent added fields
|
@@ -76,7 +76,7 @@ module RecordsHelperBehavior
|
|
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
77
|
content_tag('button', class: "#{html_class} btn", id: "additional_#{key}_submit", name: "additional_#{key}") do
|
78
78
|
(symbol +
|
79
|
-
content_tag('span', class: '
|
79
|
+
content_tag('span', class: 'sr-only') do
|
80
80
|
"add another #{key.to_s}"
|
81
81
|
end).html_safe
|
82
82
|
end
|
@@ -1,9 +1,6 @@
|
|
1
1
|
<%= bootstrap_form_for resource, url: record_form_action_url(resource), html: {:class => 'form-inline editor'} do |f| %>
|
2
2
|
<div id="descriptions_display">
|
3
|
-
|
4
|
-
<%= t('hydra_editor.form.title') %>
|
5
|
-
<small class="pull-right"><span class="error">*</span> <%= t('hydra_editor.form.required_fields') %></small>
|
6
|
-
</h2>
|
3
|
+
<%= render 'records/form_header' %>
|
7
4
|
<div class="well">
|
8
5
|
<% f.object.terms_for_editing.each do |term| %>
|
9
6
|
<%= render :partial => "records/edit_field", :locals => {:f => f, :render_req => true, :key => term } %>
|
@@ -11,9 +8,12 @@
|
|
11
8
|
</div> <!-- /well -->
|
12
9
|
</div>
|
13
10
|
<%= hidden_field_tag :type, params[:type] %>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
|
12
|
+
<div class="form-actions">
|
13
|
+
<div class="primary-actions">
|
14
|
+
<%= f.primary 'Save' %>
|
15
|
+
<%= link_to t(:'helpers.action.cancel'), main_app.root_path, class: 'btn btn-link' %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
18
|
<% end %>
|
19
19
|
|
data/config/routes.rb
CHANGED
data/lib/hydra-editor.rb
CHANGED
data/lib/hydra_editor/engine.rb
CHANGED
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,152 +9,180 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 3.2.13
|
21
|
-
- - <
|
21
|
+
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '5.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: 3.2.13
|
31
|
-
- - <
|
31
|
+
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '5.0'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
35
|
+
name: bootstrap_form
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.1.1
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.1.1
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: active-fedora
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 6.3.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 6.3.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: deprecation
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
type: :runtime
|
70
70
|
prerelease: false
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: cancancan
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
type: :runtime
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
90
|
- !ruby/object:Gem::Dependency
|
77
91
|
name: sqlite3
|
78
92
|
requirement: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
type: :development
|
84
98
|
prerelease: false
|
85
99
|
version_requirements: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0'
|
90
104
|
- !ruby/object:Gem::Dependency
|
91
105
|
name: rspec-rails
|
92
106
|
requirement: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
type: :development
|
98
112
|
prerelease: false
|
99
113
|
version_requirements: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
- !ruby/object:Gem::Dependency
|
105
119
|
name: factory_girl_rails
|
106
120
|
requirement: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
type: :development
|
112
126
|
prerelease: false
|
113
127
|
version_requirements: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '0'
|
118
132
|
- !ruby/object:Gem::Dependency
|
119
133
|
name: capybara
|
120
134
|
requirement: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
type: :development
|
126
140
|
prerelease: false
|
127
141
|
version_requirements: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- -
|
143
|
+
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: '0'
|
132
146
|
- !ruby/object:Gem::Dependency
|
133
147
|
name: devise
|
134
148
|
requirement: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- -
|
150
|
+
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
139
153
|
type: :development
|
140
154
|
prerelease: false
|
141
155
|
version_requirements: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - ">="
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '0'
|
146
160
|
- !ruby/object:Gem::Dependency
|
147
161
|
name: hydra-head
|
148
162
|
requirement: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
type: :development
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: engine_cart
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
151
179
|
- !ruby/object:Gem::Version
|
152
180
|
version: '0'
|
153
181
|
type: :development
|
154
182
|
prerelease: false
|
155
183
|
version_requirements: !ruby/object:Gem::Requirement
|
156
184
|
requirements:
|
157
|
-
- -
|
185
|
+
- - ">="
|
158
186
|
- !ruby/object:Gem::Version
|
159
187
|
version: '0'
|
160
188
|
description: A basic metadata editor for hydra-head
|
@@ -164,6 +192,9 @@ executables: []
|
|
164
192
|
extensions: []
|
165
193
|
extra_rdoc_files: []
|
166
194
|
files:
|
195
|
+
- History.md
|
196
|
+
- README.md
|
197
|
+
- Rakefile
|
167
198
|
- app/assets/javascripts/hydra-editor/editMetadata.js
|
168
199
|
- app/assets/javascripts/hydra-editor/hydra-editor.js
|
169
200
|
- app/assets/javascripts/hydra-editor/multiForm.js
|
@@ -175,6 +206,7 @@ files:
|
|
175
206
|
- app/helpers/records_helper.rb
|
176
207
|
- app/views/records/_edit_field.html.erb
|
177
208
|
- app/views/records/_form.html.erb
|
209
|
+
- app/views/records/_form_header.html.erb
|
178
210
|
- app/views/records/choose_type.html.erb
|
179
211
|
- app/views/records/edit.html.erb
|
180
212
|
- app/views/records/edit_fields/_default.html.erb
|
@@ -187,9 +219,6 @@ files:
|
|
187
219
|
- lib/hydra_editor/engine.rb
|
188
220
|
- lib/hydra_editor/version.rb
|
189
221
|
- lib/tasks/hydra-editor_tasks.rake
|
190
|
-
- Rakefile
|
191
|
-
- README.md
|
192
|
-
- History.md
|
193
222
|
homepage: http://github.com/projecthydra/hydra-editor
|
194
223
|
licenses: []
|
195
224
|
metadata: {}
|
@@ -199,17 +228,17 @@ require_paths:
|
|
199
228
|
- lib
|
200
229
|
required_ruby_version: !ruby/object:Gem::Requirement
|
201
230
|
requirements:
|
202
|
-
- -
|
231
|
+
- - ">="
|
203
232
|
- !ruby/object:Gem::Version
|
204
233
|
version: '0'
|
205
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
235
|
requirements:
|
207
|
-
- -
|
236
|
+
- - ">="
|
208
237
|
- !ruby/object:Gem::Version
|
209
238
|
version: '0'
|
210
239
|
requirements: []
|
211
240
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.2.2
|
213
242
|
signing_key:
|
214
243
|
specification_version: 4
|
215
244
|
summary: A basic metadata editor for hydra-head
|