bootstrap_feedbacker 0.4.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +40 -44
  4. data/Rakefile +5 -34
  5. data/app/assets/javascripts/controllers/bootstrap_feedbacker/remarks_controller.js +10 -0
  6. data/app/controllers/bootstrap_feedbacker/application_controller.rb +2 -0
  7. data/app/controllers/bootstrap_feedbacker/remarks_controller.rb +17 -9
  8. data/app/helpers/bootstrap_feedbacker/modals_helper.rb +11 -0
  9. data/app/mailers/bootstrap_feedbacker/feedback_mailer.rb +2 -0
  10. data/app/models/bootstrap_feedbacker/remark.rb +2 -0
  11. data/app/views/bootstrap_feedbacker/remarks/_close_button.html.erb +1 -0
  12. data/app/views/bootstrap_feedbacker/remarks/_error.erb +6 -0
  13. data/app/views/bootstrap_feedbacker/remarks/_form.html.erb +5 -10
  14. data/app/views/bootstrap_feedbacker/remarks/_new.html.erb +17 -0
  15. data/app/views/bootstrap_feedbacker/remarks/_thank_you.html.erb +6 -0
  16. data/config/importmap.rb +1 -0
  17. data/config/locales/bootstrap_feedbacker.en.yml +9 -1
  18. data/config/routes.rb +3 -1
  19. data/lib/bootstrap_feedbacker/engine.rb +18 -0
  20. data/lib/bootstrap_feedbacker/settings.rb +9 -5
  21. data/lib/bootstrap_feedbacker/version.rb +3 -1
  22. data/lib/bootstrap_feedbacker.rb +2 -3
  23. metadata +20 -106
  24. data/app/assets/javascripts/bootstrap_feedbacker/application.js +0 -13
  25. data/app/assets/javascripts/bootstrap_feedbacker/remarks.js +0 -2
  26. data/app/assets/stylesheets/bootstrap_feedbacker/application.css +0 -15
  27. data/app/assets/stylesheets/bootstrap_feedbacker/remarks.css +0 -4
  28. data/app/assets/stylesheets/scaffold.css +0 -56
  29. data/app/helpers/bootstrap_feedbacker/application_helper.rb +0 -4
  30. data/app/helpers/bootstrap_feedbacker/remarks_helper.rb +0 -4
  31. data/app/views/bootstrap_feedbacker/remarks/_button_with_modal.html.erb +0 -6
  32. data/app/views/bootstrap_feedbacker/remarks/_modal.html.erb +0 -14
  33. data/app/views/bootstrap_feedbacker/remarks/create.js.erb +0 -11
  34. data/app/views/layouts/bootstrap_feedbacker/application.html.erb +0 -14
  35. data/lib/tasks/bootstrap_feedbacker_tasks.rake +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e1d1602da5d354c04b813c843fd3844af9ac3c66bf61dddea4b46b77e28850b
4
- data.tar.gz: b3461aa7213814394180f223da149c29d52449386951618295fbe74bf0cf92c9
3
+ metadata.gz: a0763e8f5de9a484cef61e29ff04d6c514feb7638a3d8be70c0f19b5942305bd
4
+ data.tar.gz: 3028c1838f0d5431b183521b3d88930f9ba486a79f76a5d24e7f02d9c95bdcf2
5
5
  SHA512:
6
- metadata.gz: 1e6affa84cbea3d3b26ceb8bb6601bf79555a6d4e495e4f0c04513ed91c8510132aef215b4ad6fbe7a297702f304c1e735d9d32918e31a13f9a0e679d40508c4
7
- data.tar.gz: 171e8ec8c3da4a8c4dd33b05510715ddf4e9a4a4b523a403849d48ecb70e684edd7c021a9ee1f31bb5d199da216c8788820ae6c8c0f7f6d4ed2967df98a2d35d
6
+ metadata.gz: 3a8d440c55358f40da87e6c0e5d91083da8a60029dae50ff36755af2d8d18412d671c39ae7741febac7539404dd34235f1a153ddae1bb48a5a14d6366e013031
7
+ data.tar.gz: 309c785527e8d1cdeb72305affbb37fc4194d9b5988d256af185dec8535934a380f3152bfb1ee5d4b34120193e03bd3888f353d77aa88b3c52280a83d3f4a20f
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2015 WWIDEA, Inc.
1
+ Copyright 2015-2022 Brightways Learning, Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,65 +1,61 @@
1
- [![Gem Version](https://badge.fury.io/rb/boostrap_feedbacker.png)](http://badge.fury.io/rb/bootstrap_feedbacker)
1
+ [![Gem Version](https://badge.fury.io/rb/bootstrap_feedbacker.png)](http://badge.fury.io/rb/bootstrap_feedbacker)
2
2
  [![Code Climate](https://codeclimate.com/github/wwidea/bootstrap_feedbacker.png)](https://codeclimate.com/github/wwidea/bootstrap_feedbacker)
3
3
 
4
+ # BootstrapFeedbacker
5
+ BootstrapFeedbacker provides a modal form to collect user feedback and sends it in an email including the current page URL to the configured email address.
4
6
 
5
- ### BoostrapFeedbacker
6
- BoostrapFeedbacker provides a tab for users to contact developers from within the application
7
+ ## Requirements
7
8
 
8
- ### Assumptions
9
+ * Rails 6.0 or higher with Import Maps, Turbo Frames, and Stimulus
10
+ * Bootstrap version 4
11
+ * **User** model with an **email** attribute
12
+ * **current_user** method defined in **ApplicationController**
9
13
 
10
- BoostrapFeedbacker assumes that you're using...
14
+ ## Installation
11
15
 
12
- * At least Rails 4.2.2
13
- * The Rails Asset Pipeline
14
- * Jquery
15
- * Bootstrap
16
-
17
- That you have a User class(can be configured to use a different class name) with email and name methods (name can be configured to something else)
18
- and probably some other things that we've failed to mention.
19
-
20
- Installation
21
-
22
- Add the following to your Gemfile.
23
-
24
- ```gem 'bootstrap_feedbacker'```
16
+ 1. Add the `bootstrap_feedbacker` gem to your Gemfile:
17
+ ```ruby
18
+ gem "bootstrap_feedbacker"
19
+ ```
25
20
 
26
- Run bundle install
21
+ 2. Run `bundle install`.
27
22
 
28
- Add the following line at at appropriate position in your application layout.
23
+ 3. Run `rails bootstrap_feedbacker:install:migrations`.
29
24
 
30
- ```<%= render partial: 'bootstrap_feedbacker/remarks/button_with_modal' unless current_user.is_guest? %>```
31
-
32
- OR: If you only want the modal, and want to use your own button, use:
25
+ 4. Run `rails db:migrate` to add the **bootstrap_feedbacker_remarks** table to your schema.
33
26
 
34
- ```<%= render partial: 'bootstrap_feedbacker/remarks/modal' unless current_user.is_guest? %>```
27
+ 5. Mount the engine in your **routes.rb** file:
28
+ ```ruby
29
+ mount BootstrapFeedbacker::Engine, at: '/bootstrap_feedbacker'
30
+ ```
35
31
 
36
- Then do something like this:
37
-
38
- ```link_to("Feedback", "#", data: { toggle: 'modal', target: '#modalFeedbackForm'})```
32
+ 6. Add the bootstrap feedbacker link and modal container to a view file:
33
+ ```erb
34
+ <%= bootstrap_feedbacker_link %>
35
+ <%= bootstrap_feedbacker_modal %>
36
+ ```
39
37
 
38
+ ## Configure
40
39
 
41
- Run ```rake bootstrap_feedbacker:install:migrations``` to add migration to your app, and then run ```rake db:migrate``` to add the remarks table.
40
+ Create `config/initializersbootstrap_feedbacker.rb` and set your email address:
42
41
 
43
- Create feedbacker.rb in config/initializers and add the following line.
42
+ ```ruby
43
+ BootstrapFeedbacker::SETTINGS.email_to = 'support@yourdomain.com'
44
+ ```
44
45
 
45
- ```BootstrapFeedbacker::SETTINGS.email_to = 'support@yourdomain.com'```
46
+ Or set your email address and override any of these default settings:
46
47
 
47
- OR
48
- ```
48
+ ```ruby
49
49
  BootstrapFeedbacker::SETTINGS.update do |settings|
50
- settings.email_to = 'support@yourdomain.com'
51
- settings.user_name_method = :name # default value
52
- settings.email_prefix = '[FEEDBACKER]' # default value
50
+ settings.email_to = 'support@yourdomain.com'
51
+ settings.email_prefix = '[FEEDBACKER]' # default
52
+ settings.modal_content_id = 'bootstrap_feedbacker_remark_modal_content' # default
53
+ settings.modal_id = 'bootstrap_feedbacker_remark_modal' # default
54
+ settings.user_class = 'User' # default
55
+ settings.user_name_method = :name # default
53
56
  end
54
57
  ```
55
58
 
56
- Mount the gem in your routes file:
57
- ```
58
- mount BootstrapFeedbacker::Engine => "/bootstrap_feedbacker"
59
- ```
60
-
61
- Contributions
62
-
63
- If have improvements to contribute to this gem, please feel free to fork, commit with tests (if applicable), and then send a pull request. Thank You!
59
+ ## License
64
60
 
65
- Copyright (c) 2009-2013 WWIDEA, Inc. released under the MIT license
61
+ Bootstrap Feedbacker is released under the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,37 +1,8 @@
1
- begin
2
- require 'bundler/setup'
3
- rescue LoadError
4
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
- end
1
+ require "bundler/setup"
6
2
 
7
- require 'rdoc/task'
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
8
5
 
9
- RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'BootstrapFeedbacker'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.rdoc')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
15
- end
6
+ load "rails/tasks/statistics.rake"
16
7
 
17
- APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
- load 'rails/tasks/engine.rake'
19
-
20
-
21
- load 'rails/tasks/statistics.rake'
22
-
23
-
24
-
25
- Bundler::GemHelper.install_tasks
26
-
27
- require 'rake/testtask'
28
-
29
- Rake::TestTask.new(:test) do |t|
30
- t.libs << 'lib'
31
- t.libs << 'test'
32
- t.pattern = 'test/**/*_test.rb'
33
- t.verbose = false
34
- end
35
-
36
-
37
- task default: :test
8
+ require "bundler/gem_tasks"
@@ -0,0 +1,10 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ // Connects to data-controller="bootstrap-feedbacker--remarks"
4
+ export default class extends Controller {
5
+ static targets = [ "modal" ]
6
+
7
+ modalTargetConnected(element) {
8
+ $(element).modal('show')
9
+ }
10
+ }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapFeedbacker
2
4
  class ApplicationController < ::ApplicationController
3
5
  end
@@ -1,25 +1,33 @@
1
- require_dependency "bootstrap_feedbacker/application_controller"
1
+ # frozen_string_literal: true
2
2
 
3
3
  module BootstrapFeedbacker
4
4
  class RemarksController < ApplicationController
5
+ def new
6
+ @remark = BootstrapFeedbacker::Remark.new
7
+ render_update(SETTINGS.modal_id, partial: 'new')
8
+ end
5
9
 
6
- # POST /remarks
7
10
  def create
8
- @remark = Remark.new(remark_params.merge(user_id: current_user.id))
9
- @remark.source_url = request.env['HTTP_REFERER'] || "no referrer"
11
+ @remark = Remark.new(remark_params)
10
12
  if @remark.save
11
13
  FeedbackMailer.feedback(@remark).deliver_now
12
- respond_to do |format|
13
- format.js
14
- end
14
+ render_update(SETTINGS.modal_content_id, partial: 'thank_you')
15
+ else
16
+ render_update(SETTINGS.modal_content_id, partial: 'error', status: :unprocessable_entity)
15
17
  end
16
18
  end
17
19
 
18
20
  private
19
21
 
20
- # Only allow a trusted parameter "white list" through.
21
22
  def remark_params
22
- params.require(:remark).permit(:content)
23
+ params.require(:remark).permit(:content).merge(
24
+ user_id: current_user.id,
25
+ source_url: request.env['HTTP_REFERER'] || 'no referrer'
26
+ )
27
+ end
28
+
29
+ def render_update(dom_id, partial:, status: :ok)
30
+ render(turbo_stream: turbo_stream.update(dom_id, partial: partial), status:)
23
31
  end
24
32
  end
25
33
  end
@@ -0,0 +1,11 @@
1
+ module BootstrapFeedbacker
2
+ module ModalsHelper
3
+ def bootstrap_feedbacker_link(name: 'Feedback', **html_options)
4
+ link_to(name, bootstrap_feedbacker.new_remark_path, 'data-turbo-stream': true, **html_options)
5
+ end
6
+
7
+ def bootstrap_feedbacker_modal
8
+ tag.div(id: BootstrapFeedbacker::SETTINGS.modal_id)
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapFeedbacker
2
4
  class FeedbackMailer < ActionMailer::Base
3
5
  def feedback(remark)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapFeedbacker
2
4
  class Remark < ActiveRecord::Base
3
5
  belongs_to :user, class_name: BootstrapFeedbacker::SETTINGS.user_class
@@ -0,0 +1 @@
1
+ <button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
@@ -0,0 +1,6 @@
1
+ <div class="modal-body text-danger">
2
+ <%= t('.message') %>
3
+ </div>
4
+ <div class="modal-footer">
5
+ <%= render('close_button') %>
6
+ </div>
@@ -1,17 +1,12 @@
1
- <%= form_for @remark, url: "#{bootstrap_feedbacker.remarks_path}", remote: true do |f| %>
1
+ <%= form_for(@remark) do |f| %>
2
2
  <div class="modal-body">
3
3
  <div class="mb-2">
4
- <%= t("bootstrap_feedbacker.greeting") %>
4
+ <%= t('.greeting') %>
5
5
  </div>
6
- <%= f.text_area :content, class: 'form-control'%>
6
+ <%= f.text_area :content, class: "form-control" %>
7
7
  </div>
8
8
  <div class="modal-footer">
9
- <div id='feedback_submit_button'>
10
- <%= f.submit 'Submit Feedback', class: 'btn btn-success' %>
11
- <button type="button" class="btn btn-info" data-dismiss="modal">Close</button>
12
- </div>
13
- <div id="feedback_thank_you_message" style="display:none" class="text-success">
14
- Thank you for your feedback!
15
- </div>
9
+ <%= f.submit('Submit Feedback', class: "btn btn-success") %>
10
+ <%= render('close_button') %>
16
11
  </div>
17
12
  <% end %>
@@ -0,0 +1,17 @@
1
+ <div data-controller="bootstrap-feedbacker--remarks">
2
+ <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalFeedbackLabel" data-bootstrap-feedbacker--remarks-target="modal">
3
+ <div class="modal-dialog" role="document">
4
+ <div class="modal-content">
5
+ <div class="modal-header">
6
+ <h4 class="modal-title" id="modalFeedbackLabel"><%= t('.title') %></h4>
7
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
8
+ <span aria-hidden="true">&times;</span>
9
+ </button>
10
+ </div>
11
+ <%= tag.div id: BootstrapFeedbacker::SETTINGS.modal_content_id do %>
12
+ <%= render('form') %>
13
+ <% end %>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="modal-body text-success">
2
+ <%= t('.message') %>
3
+ </div>
4
+ <div class="modal-footer">
5
+ <%= render('close_button') %>
6
+ </div>
@@ -0,0 +1 @@
1
+ pin_all_from File.expand_path("../app/assets/javascripts/controllers", __dir__), under: "controllers"
@@ -1,4 +1,12 @@
1
1
  ---
2
2
  en:
3
3
  bootstrap_feedbacker:
4
- greeting: What's on your mind?
4
+ remarks:
5
+ error:
6
+ message: An error occured saving your feedback. Please try again.
7
+ form:
8
+ greeting: What's on your mind?
9
+ new:
10
+ title: Feedback
11
+ thank_you:
12
+ message: Thank you for your feedback!
data/config/routes.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  BootstrapFeedbacker::Engine.routes.draw do
2
- resources :remarks, only: :create
4
+ resources :remarks, only: %i(new create)
3
5
  end
@@ -1,5 +1,23 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapFeedbacker
2
4
  class Engine < ::Rails::Engine
3
5
  isolate_namespace BootstrapFeedbacker
6
+
7
+ config.to_prepare do
8
+ ::ApplicationController.helper(ModalsHelper)
9
+ end
10
+
11
+ initializer "bootstrap_feedbacker.assets" do
12
+ if Rails.application.config.respond_to?(:assets)
13
+ Rails.application.config.assets.precompile += %w( controllers/bootstrap_feedbacker/remarks_controller.js )
14
+ end
15
+ end
16
+
17
+ initializer "bootstrap_feedbacker.importmap", before: "importmap" do |app|
18
+ if Rails.application.respond_to?(:importmap)
19
+ app.config.importmap.paths << Engine.root.join("config/importmap.rb")
20
+ end
21
+ end
4
22
  end
5
23
  end
@@ -1,18 +1,22 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapFeedbacker
2
4
  class Settings
3
- attr_accessor :email_to, :email_prefix, :user_name_method, :user_class
4
-
5
+ attr_accessor :email_to, :email_prefix, :modal_content_id, :modal_id, :user_name_method, :user_class
6
+
5
7
  def initialize
6
8
  self.email_to = ''
7
9
  self.email_prefix = '[FEEDBACKER]'
8
- self.user_class = "User"
10
+ self.modal_content_id = 'bootstrap_feedbacker_remark_modal_content'
11
+ self.modal_id = 'bootstrap_feedbacker_remark_modal'
12
+ self.user_class = 'User'
9
13
  self.user_name_method = :name
10
14
  end
11
-
15
+
12
16
  def update
13
17
  yield self
14
18
  end
15
19
  end
16
-
20
+
17
21
  SETTINGS = Settings.new
18
22
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapFeedbacker
2
- VERSION = "0.4.3"
4
+ VERSION = "0.6.0"
3
5
  end
@@ -1,8 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bootstrap_feedbacker/engine"
2
4
  require "bootstrap_feedbacker/settings"
3
5
 
4
- require "bootstrap"
5
- require "jquery-rails"
6
-
7
6
  module BootstrapFeedbacker
8
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_feedbacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Baldwin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-24 00:00:00.000000000 Z
12
+ date: 2023-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,100 +17,16 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '5.0'
20
+ version: 6.0.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '5.0'
28
- - !ruby/object:Gem::Dependency
29
- name: sassc-rails
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: '2.1'
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: '2.1'
42
- - !ruby/object:Gem::Dependency
43
- name: jquery-rails
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: 4.0.4
49
- type: :runtime
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 4.0.4
56
- - !ruby/object:Gem::Dependency
57
- name: bootstrap
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: 4.1.1
63
- type: :runtime
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: 4.1.1
70
- - !ruby/object:Gem::Dependency
71
- name: pry
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: sqlite3
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: 1.4.0
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: 1.4.0
98
- - !ruby/object:Gem::Dependency
99
- name: mini_racer
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: 0.2.0
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: 0.2.0
112
- description: Feedbacker provides a modal window with a button on side of every page
113
- on a site for users to send feedback to the site.
27
+ version: 6.0.0
28
+ description: Bootstrap Feedbacker opens a modal window for users to send application
29
+ feedback over email that includes the referring url.
114
30
  email:
115
31
  - baldwina@brightwayslearning.org
116
32
  executables: []
@@ -120,23 +36,19 @@ files:
120
36
  - MIT-LICENSE
121
37
  - README.md
122
38
  - Rakefile
123
- - app/assets/javascripts/bootstrap_feedbacker/application.js
124
- - app/assets/javascripts/bootstrap_feedbacker/remarks.js
125
- - app/assets/stylesheets/bootstrap_feedbacker/application.css
126
- - app/assets/stylesheets/bootstrap_feedbacker/remarks.css
127
- - app/assets/stylesheets/scaffold.css
39
+ - app/assets/javascripts/controllers/bootstrap_feedbacker/remarks_controller.js
128
40
  - app/controllers/bootstrap_feedbacker/application_controller.rb
129
41
  - app/controllers/bootstrap_feedbacker/remarks_controller.rb
130
- - app/helpers/bootstrap_feedbacker/application_helper.rb
131
- - app/helpers/bootstrap_feedbacker/remarks_helper.rb
42
+ - app/helpers/bootstrap_feedbacker/modals_helper.rb
132
43
  - app/mailers/bootstrap_feedbacker/feedback_mailer.rb
133
44
  - app/models/bootstrap_feedbacker/remark.rb
134
45
  - app/views/bootstrap_feedbacker/feedback_mailer/feedback.html.erb
135
- - app/views/bootstrap_feedbacker/remarks/_button_with_modal.html.erb
46
+ - app/views/bootstrap_feedbacker/remarks/_close_button.html.erb
47
+ - app/views/bootstrap_feedbacker/remarks/_error.erb
136
48
  - app/views/bootstrap_feedbacker/remarks/_form.html.erb
137
- - app/views/bootstrap_feedbacker/remarks/_modal.html.erb
138
- - app/views/bootstrap_feedbacker/remarks/create.js.erb
139
- - app/views/layouts/bootstrap_feedbacker/application.html.erb
49
+ - app/views/bootstrap_feedbacker/remarks/_new.html.erb
50
+ - app/views/bootstrap_feedbacker/remarks/_thank_you.html.erb
51
+ - config/importmap.rb
140
52
  - config/locales/bootstrap_feedbacker.en.yml
141
53
  - config/routes.rb
142
54
  - db/migrate/20150901232221_create_bootstrap_feedbacker_remarks.rb
@@ -145,11 +57,13 @@ files:
145
57
  - lib/bootstrap_feedbacker/engine.rb
146
58
  - lib/bootstrap_feedbacker/settings.rb
147
59
  - lib/bootstrap_feedbacker/version.rb
148
- - lib/tasks/bootstrap_feedbacker_tasks.rake
149
60
  homepage: https://github.com/wwidea/bootstrap_feedbacker
150
61
  licenses:
151
62
  - MIT
152
- metadata: {}
63
+ metadata:
64
+ homepage_uri: https://github.com/wwidea/bootstrap_feedbacker
65
+ source_code_uri: https://github.com/wwidea/bootstrap_feedbacker
66
+ rubygems_mfa_required: 'true'
153
67
  post_install_message:
154
68
  rdoc_options: []
155
69
  require_paths:
@@ -158,15 +72,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
72
  requirements:
159
73
  - - ">="
160
74
  - !ruby/object:Gem::Version
161
- version: '0'
75
+ version: 2.7.0
162
76
  required_rubygems_version: !ruby/object:Gem::Requirement
163
77
  requirements:
164
78
  - - ">="
165
79
  - !ruby/object:Gem::Version
166
80
  version: '0'
167
81
  requirements: []
168
- rubygems_version: 3.3.10
82
+ rubygems_version: 3.4.5
169
83
  signing_key:
170
84
  specification_version: 4
171
- summary: Sitewide Feedback form pinned to sidewall as verticle tab.
85
+ summary: User feedback form in a Bootstrap modal.
172
86
  test_files: []
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,2 +0,0 @@
1
- // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,4 +0,0 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
@@ -1,56 +0,0 @@
1
- body { background-color: #fff; color: #333; }
2
-
3
- body, p, ol, ul, td {
4
- font-family: verdana, arial, helvetica, sans-serif;
5
- font-size: 13px;
6
- line-height: 18px;
7
- }
8
-
9
- pre {
10
- background-color: #eee;
11
- padding: 10px;
12
- font-size: 11px;
13
- }
14
-
15
- a { color: #000; }
16
- a:visited { color: #666; }
17
- a:hover { color: #fff; background-color:#000; }
18
-
19
- div.field, div.actions {
20
- margin-bottom: 10px;
21
- }
22
-
23
- #notice {
24
- color: green;
25
- }
26
-
27
- .field_with_errors {
28
- padding: 2px;
29
- background-color: red;
30
- display: table;
31
- }
32
-
33
- #error_explanation {
34
- width: 450px;
35
- border: 2px solid red;
36
- padding: 7px;
37
- padding-bottom: 0;
38
- margin-bottom: 20px;
39
- background-color: #f0f0f0;
40
- }
41
-
42
- #error_explanation h2 {
43
- text-align: left;
44
- font-weight: bold;
45
- padding: 5px 5px 5px 15px;
46
- font-size: 12px;
47
- margin: -7px;
48
- margin-bottom: 0px;
49
- background-color: #c00;
50
- color: #fff;
51
- }
52
-
53
- #error_explanation ul li {
54
- font-size: 12px;
55
- list-style: square;
56
- }
@@ -1,4 +0,0 @@
1
- module BootstrapFeedbacker
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module BootstrapFeedbacker
2
- module RemarksHelper
3
- end
4
- end
@@ -1,6 +0,0 @@
1
- <!-- Button trigger modal -->
2
- <button type="button" id='feedbackButton' class="btn btn-warning feedback_button_position" data-toggle="modal" data-target="#modalFeedbackForm">
3
- Feedback
4
- </button>
5
-
6
- <%= render partial: 'bootstrap_feedbacker/remarks/modal' %>
@@ -1,14 +0,0 @@
1
- <div class="modal fade" id="modalFeedbackForm" tabindex="-1" role="dialog" aria-labelledby="modalFeedbackLabel">
2
- <div class="modal-dialog" role="document">
3
- <div class="modal-content">
4
- <div class="modal-header">
5
- <h4 class="modal-title" id="modalFeedbackLabel">Feedback</h4>
6
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
7
- <span aria-hidden="true">&times;</span>
8
- </button>
9
- </div>
10
- <% @remark = BootstrapFeedbacker::Remark.new %>
11
- <%= render partial: 'bootstrap_feedbacker/remarks/form' %>
12
- </div>
13
- </div>
14
- </div>
@@ -1,11 +0,0 @@
1
- $('#feedback_submit_button').hide();
2
- $('#feedback_thank_you_message').fadeIn('500')
3
- setTimeout(function() {
4
- $('#feedback_thank_you_message').fadeOut('500');
5
- $('#modalFeedbackForm').modal("hide");
6
- setTimeout(function(){
7
- $('#feedback_submit_button').show();
8
- $('#remark_content').val("");
9
- },
10
- 1000);
11
- }, 2000);
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>BootstrapFeedbacker</title>
5
- <%= stylesheet_link_tag "bootstrap_feedbacker/application", media: "all" %>
6
- <%= javascript_include_tag "bootstrap_feedbacker/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :bootstrap_feedbacker do
3
- # # Task goes here
4
- # end