noodall-form-builder 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/app/controllers/noodall/admin/form_responses_controller.rb +7 -6
- data/app/models/noodall/form_response.rb +1 -1
- data/app/views/noodall/admin/form_responses/index.html.erb +10 -1
- data/lib/noodall/form_builder/routes.rb +2 -1
- data/lib/noodall/form_builder/version.rb +1 -1
- data/public/images/admin/spam-flag.png +0 -0
- metadata +5 -5
- data/public/images/admin/spam.png +0 -0
data/.gitignore
CHANGED
@@ -59,12 +59,13 @@ module Noodall
|
|
59
59
|
|
60
60
|
def mark_as_spam
|
61
61
|
@response = @form.responses.find(params[:id])
|
62
|
-
|
63
|
-
@
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
62
|
+
@response.mark_as_spam!
|
63
|
+
redirect_to(noodall_admin_form_form_responses_url(@form))
|
64
|
+
end
|
65
|
+
|
66
|
+
def mark_as_not_spam
|
67
|
+
@response = @form.responses.find(params[:id])
|
68
|
+
@response.approve!
|
68
69
|
redirect_to(noodall_admin_form_form_responses_url(@form))
|
69
70
|
end
|
70
71
|
|
@@ -13,6 +13,7 @@
|
|
13
13
|
<th>Name</th>
|
14
14
|
<th>Fields</th>
|
15
15
|
<th width="100">Date</th>
|
16
|
+
<th width="150">Spam</th>
|
16
17
|
<th width="45">Delete</th>
|
17
18
|
</tr>
|
18
19
|
</thead>
|
@@ -22,8 +23,15 @@
|
|
22
23
|
<td class="edit"><%= mail_to response.email, h(response.name) %></td>
|
23
24
|
<td><%= @form.fields.collect{|f| "<strong>#{f.name}:</strong> #{response.string_value(f.underscored_name)}" }.join(", ").html_safe %></td>
|
24
25
|
<td><%= h response.created_at.to_formatted_s(:long_dot) %></td>
|
26
|
+
<td class="spam <%= 'flagged' unless response.approved %>">
|
27
|
+
<% if response.approved %>
|
28
|
+
<%= link_to "Spam?", mark_as_spam_noodall_admin_form_form_response_path(@form, response), :method => :put %>
|
29
|
+
<% else %>
|
30
|
+
<%= link_to "Not Spam?", mark_as_not_spam_noodall_admin_form_form_response_path(@form, response), :method => :put %>
|
31
|
+
<% end %>
|
32
|
+
</td>
|
25
33
|
<td><%= link_to 'Delete', noodall_admin_form_form_response_path(@form, response), :confirm => 'Are you sure?', :method => :delete, :class => 'delete', :title => 'Delete this response' %>
|
26
|
-
|
34
|
+
</td>
|
27
35
|
</tr>
|
28
36
|
<% end %>
|
29
37
|
</tbody>
|
@@ -32,6 +40,7 @@
|
|
32
40
|
<th>Name</th>
|
33
41
|
<th>Fields</th>
|
34
42
|
<th width="100">Date</th>
|
43
|
+
<th width="150">Spam</th>
|
35
44
|
<th width="45">Delete</th>
|
36
45
|
</tr>
|
37
46
|
</tfoot>
|
Binary file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-form-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors: []
|
13
13
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-09 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -124,7 +124,7 @@ files:
|
|
124
124
|
- lib/noodall/form_builder/routes.rb
|
125
125
|
- lib/noodall/form_builder/version.rb
|
126
126
|
- noodall-form-builder.gemspec
|
127
|
-
- public/images/admin/spam.png
|
127
|
+
- public/images/admin/spam-flag.png
|
128
128
|
- public/javascripts/admin/formbuilder.js
|
129
129
|
- spec/dummy/Rakefile
|
130
130
|
- spec/dummy/app/controllers/application_controller.rb
|
Binary file
|