protected_record_manager 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/protected_record_manager/change_request.css +7 -0
- data/app/helpers/protected_record_manager/change_requests_helper.rb +9 -0
- data/app/views/protected_record_manager/change_requests/index.html.erb +30 -7
- data/lib/protected_record_manager/version.rb +1 -1
- metadata +4 -9
- data/test/dummy/log/development.log +0 -1
- data/test/dummy/log/test.log +0 -1
- data/test/unit/helpers/protected_record_manager/change_requests_helper_test.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84693404904f04eb62754f7a4b2a5ec5db783055
|
4
|
+
data.tar.gz: 26490babc58f677d0a3045d3dc34b869406fa392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0991511c53be014b543feb5f662a71d59a77945e08019387e8c7838e95d86dafbef04132df47dbefafea0c158a80aa88578e6dbab9baf758f558412b38f2fd7
|
7
|
+
data.tar.gz: b574c7ca3bc1df38e99df834cd160c1402ebae8a2bc86ae904e8a61a677f15701d0078abbfafc98f9069e167b6ef6c4a1c277e30da189469b2e256d304dcd1e7
|
@@ -1,4 +1,13 @@
|
|
1
1
|
module ProtectedRecordManager
|
2
2
|
module ChangeRequestsHelper
|
3
|
+
def change_count(change_request)
|
4
|
+
requested_changes = JSON.parse change_request.requested_changes
|
5
|
+
|
6
|
+
return requested_changes.keys.count
|
7
|
+
end
|
8
|
+
|
9
|
+
def requested_changes(change_request)
|
10
|
+
JSON.parse change_request.requested_changes
|
11
|
+
end
|
3
12
|
end
|
4
13
|
end
|
@@ -2,10 +2,13 @@
|
|
2
2
|
|
3
3
|
<table>
|
4
4
|
<tr>
|
5
|
+
<th>Request</th>
|
5
6
|
<th>User</th>
|
6
7
|
<th>Record Type</th>
|
7
8
|
<th>Record ID</th>
|
8
|
-
<th>
|
9
|
+
<th>Column</th>
|
10
|
+
<th>From</th>
|
11
|
+
<th>To</th>
|
9
12
|
|
10
13
|
<th></th>
|
11
14
|
<th></th>
|
@@ -13,12 +16,32 @@
|
|
13
16
|
|
14
17
|
<% @change_requests.each do |change_request| %>
|
15
18
|
<tr>
|
16
|
-
<td><%= change_request.
|
17
|
-
<td
|
18
|
-
<td
|
19
|
-
<td><%= change_request.
|
20
|
-
|
21
|
-
|
19
|
+
<td rowspan=<%=change_count(change_request) %> class='centered'><%= change_request.id %>
|
20
|
+
<td rowspan=<%=change_count(change_request) %>><%= change_request.user.email %></td>
|
21
|
+
<td rowspan=<%=change_count(change_request) %>><%= change_request.recordable_type %></td>
|
22
|
+
<td rowspan=<%=change_count(change_request) %> class='centered'><%= change_request.recordable_id %></td>
|
23
|
+
<% requested_changes(change_request).each do |column, change| %>
|
24
|
+
<% if requested_changes(change_request).keys.first == column %>
|
25
|
+
<td><%= column %></td>
|
26
|
+
<% change.each do |point| %>
|
27
|
+
<td><%= point %></td>
|
28
|
+
<% end %>
|
29
|
+
<td rowspan=<%=change_count(change_request) %>>
|
30
|
+
<%= link_to 'Show', change_request_path(change_request) %>
|
31
|
+
</td>
|
32
|
+
<td rowspan=<%=change_count(change_request) %>>
|
33
|
+
<%= link_to 'Edit', edit_change_request_path(change_request) %>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<% else %>
|
37
|
+
<tr>
|
38
|
+
<td><%= column %></td>
|
39
|
+
<% change.each do |point| %>
|
40
|
+
<td><%= point %></td>
|
41
|
+
<% end %>
|
42
|
+
</tr>
|
43
|
+
<% end %>
|
44
|
+
<% end %>
|
22
45
|
</tr>
|
23
46
|
<% end %>
|
24
47
|
</table>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protected_record_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tad Hosford
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1.
|
33
|
+
version: 0.1.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1.
|
40
|
+
version: 0.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,6 +62,7 @@ extra_rdoc_files: []
|
|
62
62
|
files:
|
63
63
|
- app/assets/javascripts/protected_record_manager/application.js
|
64
64
|
- app/assets/stylesheets/protected_record_manager/application.css
|
65
|
+
- app/assets/stylesheets/protected_record_manager/change_request.css
|
65
66
|
- app/helpers/protected_record_manager/application_helper.rb
|
66
67
|
- app/helpers/protected_record_manager/change_requests_helper.rb
|
67
68
|
- app/controllers/protected_record_manager/change_requests_controller.rb
|
@@ -113,10 +114,7 @@ files:
|
|
113
114
|
- test/dummy/config/locales/en.yml
|
114
115
|
- test/dummy/config.ru
|
115
116
|
- test/dummy/README.rdoc
|
116
|
-
- test/dummy/log/development.log
|
117
|
-
- test/dummy/log/test.log
|
118
117
|
- test/unit/helpers/protected_record_manager/protected_records_helper_test.rb
|
119
|
-
- test/unit/helpers/protected_record_manager/change_requests_helper_test.rb
|
120
118
|
- test/protected_record_manager_test.rb
|
121
119
|
homepage: http://github.com/rthbound/protected_record_manager
|
122
120
|
licenses:
|
@@ -175,8 +173,5 @@ test_files:
|
|
175
173
|
- test/dummy/config/locales/en.yml
|
176
174
|
- test/dummy/config.ru
|
177
175
|
- test/dummy/README.rdoc
|
178
|
-
- test/dummy/log/development.log
|
179
|
-
- test/dummy/log/test.log
|
180
176
|
- test/unit/helpers/protected_record_manager/protected_records_helper_test.rb
|
181
|
-
- test/unit/helpers/protected_record_manager/change_requests_helper_test.rb
|
182
177
|
- test/protected_record_manager_test.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
Connecting to database specified by database.yml
|
data/test/dummy/log/test.log
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Connecting to database specified by database.yml
|