commontator 0.1.46
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +35 -0
- data/Rakefile +40 -0
- data/app/assets/images/commontator/downvote.png +0 -0
- data/app/assets/images/commontator/downvote_hover.png +0 -0
- data/app/assets/images/commontator/upvote.png +0 -0
- data/app/assets/images/commontator/upvote_hover.png +0 -0
- data/app/assets/stylesheets/commontator/application.css +13 -0
- data/app/assets/stylesheets/commontator/application.css~ +88 -0
- data/app/assets/stylesheets/commontator/comments.css +86 -0
- data/app/assets/stylesheets/commontator/comments.css~ +90 -0
- data/app/assets/stylesheets/commontator/threads.css +13 -0
- data/app/assets/stylesheets/commontator/threads.css~ +13 -0
- data/app/controllers/commontator/application_controller.rb +18 -0
- data/app/controllers/commontator/application_controller.rb~ +16 -0
- data/app/controllers/commontator/comments_controller.rb +143 -0
- data/app/controllers/commontator/comments_controller.rb~ +143 -0
- data/app/controllers/commontator/subscriptions_controller.rb +42 -0
- data/app/controllers/commontator/subscriptions_controller.rb~ +40 -0
- data/app/controllers/commontator/threads_controller.rb +42 -0
- data/app/controllers/commontator/threads_controller.rb~ +43 -0
- data/app/helpers/commontator/application_helper.rb +11 -0
- data/app/helpers/commontator/application_helper.rb~ +11 -0
- data/app/helpers/commontator/comments_helper.rb +47 -0
- data/app/helpers/commontator/comments_helper.rb~ +58 -0
- data/app/helpers/commontator/commontable_helper.rb~ +9 -0
- data/app/helpers/commontator/commontator_helper.rb +8 -0
- data/app/helpers/commontator/commontator_helper.rb~ +8 -0
- data/app/helpers/commontator/subscriptions_helper.rb +8 -0
- data/app/helpers/commontator/subscriptions_helper.rb~ +8 -0
- data/app/helpers/commontator/threads_helper.rb +21 -0
- data/app/helpers/commontator/threads_helper.rb~ +32 -0
- data/app/mailers/commontator/subscription_mailer.rb~ +38 -0
- data/app/mailers/commontator/subscriptions_mailer.rb +51 -0
- data/app/mailers/commontator/subscriptions_mailer.rb~ +51 -0
- data/app/models/commontator/comment.rb +84 -0
- data/app/models/commontator/comment.rb~ +84 -0
- data/app/models/commontator/subscription.rb +21 -0
- data/app/models/commontator/subscription.rb~ +21 -0
- data/app/models/commontator/thread.rb +138 -0
- data/app/models/commontator/thread.rb~ +141 -0
- data/app/views/commontator/comments/_actions.html.erb +32 -0
- data/app/views/commontator/comments/_actions.html.erb~ +33 -0
- data/app/views/commontator/comments/_body.html.erb +7 -0
- data/app/views/commontator/comments/_body.html.erb~ +8 -0
- data/app/views/commontator/comments/_form.html.erb +20 -0
- data/app/views/commontator/comments/_form.html.erb~ +21 -0
- data/app/views/commontator/comments/_show.html.erb +41 -0
- data/app/views/commontator/comments/_show.html.erb~ +45 -0
- data/app/views/commontator/comments/_votes.html.erb +60 -0
- data/app/views/commontator/comments/_votes.html.erb~ +62 -0
- data/app/views/commontator/comments/create.js.erb +15 -0
- data/app/views/commontator/comments/create.js.erb~ +15 -0
- data/app/views/commontator/comments/delete.js.erb +15 -0
- data/app/views/commontator/comments/delete.js.erb~ +15 -0
- data/app/views/commontator/comments/destroy.js.erb~ +1 -0
- data/app/views/commontator/comments/edit.html.erb +6 -0
- data/app/views/commontator/comments/edit.html.erb~ +6 -0
- data/app/views/commontator/comments/edit.js.erb +5 -0
- data/app/views/commontator/comments/edit.js.erb~ +5 -0
- data/app/views/commontator/comments/new.html.erb +8 -0
- data/app/views/commontator/comments/new.html.erb~ +8 -0
- data/app/views/commontator/comments/new.js.erb +12 -0
- data/app/views/commontator/comments/new.js.erb~ +12 -0
- data/app/views/commontator/comments/update.js.erb +7 -0
- data/app/views/commontator/comments/update.js.erb~ +7 -0
- data/app/views/commontator/comments/vote.js.erb +5 -0
- data/app/views/commontator/comments/vote.js.erb~ +5 -0
- data/app/views/commontator/commontator/_thread.html.erb +14 -0
- data/app/views/commontator/commontator/_thread.html.erb~ +15 -0
- data/app/views/commontator/subscriptions/_subscription_link.html.erb +12 -0
- data/app/views/commontator/subscriptions/_subscription_link.html.erb~ +12 -0
- data/app/views/commontator/subscriptions/create.js.erb +5 -0
- data/app/views/commontator/subscriptions/create.js.erb~ +3 -0
- data/app/views/commontator/subscriptions/destroy.js.erb +5 -0
- data/app/views/commontator/subscriptions/destroy.js.erb~ +3 -0
- data/app/views/commontator/subscriptions/index.html.erb +16 -0
- data/app/views/commontator/subscriptions/index.html.erb~ +16 -0
- data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb +14 -0
- data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb~ +14 -0
- data/app/views/commontator/threads/_show.html.erb +26 -0
- data/app/views/commontator/threads/_show.html.erb~ +26 -0
- data/app/views/commontator/threads/show.html.erb +3 -0
- data/app/views/commontator/threads/show.js.erb +6 -0
- data/app/views/layouts/commontator/application.html.erb +14 -0
- data/config/initializers/commontator.rb +7 -0
- data/config/routes.rb +24 -0
- data/config/routes.rb~ +22 -0
- data/db/migrate/0_install_commontator.rb +40 -0
- data/db/migrate/0_install_commontator.rb~ +40 -0
- data/lib/commontator.rb +66 -0
- data/lib/commontator.rb~ +66 -0
- data/lib/commontator/acts_as_commontable.rb +39 -0
- data/lib/commontator/acts_as_commontable.rb~ +42 -0
- data/lib/commontator/acts_as_commontator.rb +28 -0
- data/lib/commontator/acts_as_commontator.rb~ +37 -0
- data/lib/commontator/commontable_config.rb +13 -0
- data/lib/commontator/commontator_config.rb +13 -0
- data/lib/commontator/engine.rb +5 -0
- data/lib/commontator/routes.rb~ +37 -0
- data/lib/commontator/version.rb +3 -0
- data/lib/commontator/version.rb~ +3 -0
- data/test/commontator_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +16 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +204 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/functional/comment_thread_subscriptions_controller_test.rb~ +125 -0
- data/test/functional/comments_controller_test.rb +181 -0
- data/test/functional/comments_controller_test.rb~ +184 -0
- data/test/functional/subscriptions_controller_test.rb +122 -0
- data/test/functional/subscriptions_controller_test.rb~ +122 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/comment_test.rb +35 -0
- data/test/unit/comment_test.rb~ +38 -0
- data/test/unit/comment_thread_subscription_test.rb~ +18 -0
- data/test/unit/comment_thread_test.rb~ +60 -0
- data/test/unit/helpers/comment_thread_subscriptions_helper_test.rb~ +7 -0
- data/test/unit/helpers/comments_helper_test.rb +4 -0
- data/test/unit/helpers/comments_helper_test.rb~ +7 -0
- data/test/unit/helpers/subscriptions_helper_test.rb +4 -0
- data/test/unit/helpers/subscriptions_helper_test.rb~ +4 -0
- data/test/unit/subscription_test.rb +15 -0
- data/test/unit/subscription_test.rb~ +15 -0
- data/test/unit/thread_test.rb +57 -0
- data/test/unit/thread_test.rb~ +57 -0
- metadata +301 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2012 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Common Tator
|
2
|
+
|
3
|
+
A Rails engine for comments
|
4
|
+
This is not ready for use yet. We recommend you do not use this gem until it is done.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'commontator'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install commontator
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
TODO: Write usage instructions here
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
|
26
|
+
1. Fork it
|
27
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
28
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
29
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
30
|
+
5. Create new Pull Request
|
31
|
+
|
32
|
+
## License
|
33
|
+
|
34
|
+
This engine is distributed under the terms of the MIT license.
|
35
|
+
See the MIT-LICENSE file for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'Commontator'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
require 'rake/testtask'
|
31
|
+
|
32
|
+
Rake::TestTask.new(:test) do |t|
|
33
|
+
t.libs << 'lib'
|
34
|
+
t.libs << 'test'
|
35
|
+
t.pattern = 'test/**/*_test.rb'
|
36
|
+
t.verbose = false
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
task :default => :test
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
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 vendor/assets/stylesheets of plugins, if any, 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 top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,88 @@
|
|
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 vendor/assets/stylesheets of plugins, if any, 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 top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
14
|
+
|
15
|
+
.comment {
|
16
|
+
font-size: 12px;
|
17
|
+
font-weight: normal;
|
18
|
+
font-style: normal;
|
19
|
+
margin-top: 15px;
|
20
|
+
margin-bottom: 15px;
|
21
|
+
border-left: 1px solid;
|
22
|
+
border-top: 1px solid;
|
23
|
+
padding: 8px;
|
24
|
+
padding-left: 15px;
|
25
|
+
border-color: #ddd;
|
26
|
+
color: #000;
|
27
|
+
background-color: #fff;
|
28
|
+
clear:both;
|
29
|
+
}
|
30
|
+
|
31
|
+
.comment_actions {
|
32
|
+
float:right;
|
33
|
+
}
|
34
|
+
|
35
|
+
.comment_actions a {
|
36
|
+
display:inline;
|
37
|
+
}
|
38
|
+
|
39
|
+
.comment_body_div {
|
40
|
+
float: left;
|
41
|
+
}
|
42
|
+
|
43
|
+
.comment_body {
|
44
|
+
clear:both;
|
45
|
+
margin:3px;
|
46
|
+
padding-left:8px;
|
47
|
+
padding-bottom:6px;
|
48
|
+
padding-top: 8px;
|
49
|
+
float: left;
|
50
|
+
}
|
51
|
+
|
52
|
+
.comment_body pre { /* When showing comments, allow <pre> to wrap */
|
53
|
+
white-space: pre-wrap; /* css-3 */
|
54
|
+
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
55
|
+
white-space: -pre-wrap; /* Opera 4-6 */
|
56
|
+
white-space: -o-pre-wrap; /* Opera 7 */
|
57
|
+
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
58
|
+
}
|
59
|
+
|
60
|
+
.comment_profile_picture {
|
61
|
+
float:left;
|
62
|
+
padding-top: 8px;
|
63
|
+
height:auto;
|
64
|
+
}
|
65
|
+
|
66
|
+
.comment_timestamp {
|
67
|
+
color: #777;
|
68
|
+
}
|
69
|
+
|
70
|
+
.comment_votes {
|
71
|
+
float:right;
|
72
|
+
}
|
73
|
+
|
74
|
+
.new_comment_div textarea {
|
75
|
+
width: 100%;
|
76
|
+
}
|
77
|
+
|
78
|
+
.thread_new_comment {
|
79
|
+
display:none;
|
80
|
+
}
|
81
|
+
|
82
|
+
.thread_new_comment_body {
|
83
|
+
width: 100%;
|
84
|
+
}
|
85
|
+
|
86
|
+
.thread_new_comment_link {
|
87
|
+
float:left;
|
88
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
.comment {
|
2
|
+
font-size: 12px;
|
3
|
+
font-weight: normal;
|
4
|
+
font-style: normal;
|
5
|
+
|
6
|
+
border-top: 1px solid;
|
7
|
+
border-left: 1px solid;
|
8
|
+
|
9
|
+
margin-top: 15px;
|
10
|
+
margin-bottom: 15px;
|
11
|
+
|
12
|
+
padding-top: 8px;
|
13
|
+
padding-left: 15px;
|
14
|
+
|
15
|
+
color: #000;
|
16
|
+
border-color: #ddd;
|
17
|
+
background-color: #fff;
|
18
|
+
}
|
19
|
+
|
20
|
+
.comment_actions {
|
21
|
+
float: right;
|
22
|
+
}
|
23
|
+
|
24
|
+
.comment_body p {
|
25
|
+
margin: 0px;
|
26
|
+
|
27
|
+
overflow: hidden;
|
28
|
+
}
|
29
|
+
|
30
|
+
.comment_body {
|
31
|
+
margin-left: 55px;
|
32
|
+
margin-top: -60px;
|
33
|
+
margin-right: 45px;
|
34
|
+
|
35
|
+
padding: 8px;
|
36
|
+
}
|
37
|
+
|
38
|
+
.comment_profile_picture img {
|
39
|
+
margin-top: 5px;
|
40
|
+
}
|
41
|
+
|
42
|
+
.comment_timestamp {
|
43
|
+
color: #777;
|
44
|
+
}
|
45
|
+
|
46
|
+
.comment_votes {
|
47
|
+
float: right;
|
48
|
+
}
|
49
|
+
|
50
|
+
.comment_votes input,
|
51
|
+
.comment_votes img {
|
52
|
+
border: none;
|
53
|
+
background-color: transparent;
|
54
|
+
padding: 0px;
|
55
|
+
margin: 5px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.comment_upvote {
|
59
|
+
display: table;
|
60
|
+
}
|
61
|
+
|
62
|
+
.comment_upvote form {
|
63
|
+
display: table-cell;
|
64
|
+
}
|
65
|
+
|
66
|
+
.comment_downvote {
|
67
|
+
display: table;
|
68
|
+
}
|
69
|
+
|
70
|
+
.comment_downvote form {
|
71
|
+
display: table-cell;
|
72
|
+
}
|
73
|
+
|
74
|
+
.comment_upvote_count {
|
75
|
+
display: table-cell;
|
76
|
+
vertical-align: middle;
|
77
|
+
|
78
|
+
padding-top: 1px;
|
79
|
+
}
|
80
|
+
|
81
|
+
.comment_downvote_count {
|
82
|
+
display: table-cell;
|
83
|
+
vertical-align: middle;
|
84
|
+
|
85
|
+
padding-bottom: 7px;
|
86
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
.comment {
|
2
|
+
font-size: 12px;
|
3
|
+
font-weight: normal;
|
4
|
+
font-style: normal;
|
5
|
+
|
6
|
+
border-top: 1px solid;
|
7
|
+
border-left: 1px solid;
|
8
|
+
|
9
|
+
margin-top: 15px;
|
10
|
+
margin-bottom: 15px;
|
11
|
+
|
12
|
+
padding-top: 8px;
|
13
|
+
padding-left: 15px;
|
14
|
+
|
15
|
+
color: #000;
|
16
|
+
border-color: #ddd;
|
17
|
+
background-color: #fff;
|
18
|
+
}
|
19
|
+
|
20
|
+
.comment_actions {
|
21
|
+
float: right;
|
22
|
+
}
|
23
|
+
|
24
|
+
.comment_body p {
|
25
|
+
margin: 0px;
|
26
|
+
|
27
|
+
overflow: hidden;
|
28
|
+
}
|
29
|
+
|
30
|
+
.comment_body {
|
31
|
+
margin-left: 55px;
|
32
|
+
margin-top: -60px;
|
33
|
+
margin-right: 45px;
|
34
|
+
|
35
|
+
padding: 8px;
|
36
|
+
}
|
37
|
+
|
38
|
+
.comment_profile_picture img {
|
39
|
+
margin-top: 5px;
|
40
|
+
}
|
41
|
+
|
42
|
+
.comment_timestamp {
|
43
|
+
color: #777;
|
44
|
+
}
|
45
|
+
|
46
|
+
.comment_votes {
|
47
|
+
float: right;
|
48
|
+
}
|
49
|
+
|
50
|
+
.comment_votes input,
|
51
|
+
.comment_votes img {
|
52
|
+
border: none;
|
53
|
+
background-color: transparent;
|
54
|
+
padding: 0px;
|
55
|
+
margin: 5px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.comment_upvote {
|
59
|
+
display: table;
|
60
|
+
}
|
61
|
+
|
62
|
+
.comment_upvote form {
|
63
|
+
display: table-cell;
|
64
|
+
}
|
65
|
+
|
66
|
+
.comment_downvote {
|
67
|
+
display: table;
|
68
|
+
}
|
69
|
+
|
70
|
+
.comment_downvote form {
|
71
|
+
display: table-cell;
|
72
|
+
}
|
73
|
+
|
74
|
+
.comment_upvote_count {
|
75
|
+
display: table-cell;
|
76
|
+
vertical-align: middle;
|
77
|
+
|
78
|
+
padding-top: 1px;
|
79
|
+
}
|
80
|
+
|
81
|
+
.comment_downvote_count {
|
82
|
+
display: table-cell;
|
83
|
+
vertical-align: middle;
|
84
|
+
|
85
|
+
padding-bottom: 7px;
|
86
|
+
}
|
87
|
+
|
88
|
+
.thread_new_comment textarea {
|
89
|
+
width: 100%;
|
90
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Commontator
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
before_filter :get_commontator
|
4
|
+
|
5
|
+
protected
|
6
|
+
|
7
|
+
def get_commontator
|
8
|
+
@commontator = send Commontator.current_user_method
|
9
|
+
raise SecurityTransgression unless (@commontator.nil? || @commontator.is_commontator)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_thread
|
13
|
+
@thread = params[:thread_id].blank? ? \
|
14
|
+
Commontator::Thread.find(params[:id]) : \
|
15
|
+
Commontator::Thread.find(params[:thread_id])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Commontator
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
before_filter :get_commontator
|
4
|
+
|
5
|
+
protected
|
6
|
+
|
7
|
+
def get_commontator
|
8
|
+
@commontator = send Commontator.current_user_method
|
9
|
+
raise SecurityTransgression unless (@commontator.nil? || @commontator.is_commontator)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_thread
|
13
|
+
@thread = params[:thread_id].blank? ? Commontator::Thread.find(params[:thread_id]) : Commontator::Thread.find(params[:id])
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|