phcpress 7.1.2 → 8.0.0b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +15 -15
- data/Rakefile +1 -1
- data/app/assets/config/phcpress_manifest.js +1 -1
- data/app/assets/javascripts/phcpress/application.js +1 -1
- data/app/assets/stylesheets/phcpress/application.scss +1 -1
- data/app/controllers/phcpress/api/v1/categories_controller.rb +4 -4
- data/app/controllers/phcpress/api/v1/posts_controller.rb +4 -4
- data/app/controllers/phcpress/application_controller.rb +4 -4
- data/app/controllers/phcpress/articles/posts_controller.rb +12 -12
- data/app/controllers/phcpress/frontend/articles_controller.rb +5 -5
- data/app/controllers/phcpress/modules/categories_controller.rb +12 -12
- data/app/controllers/phcpress/modules/connections_controller.rb +12 -12
- data/app/helpers/phcpress/application_helper.rb +1 -1
- data/app/jobs/phcpress/application_job.rb +1 -1
- data/app/mailers/phcpress/application_mailer.rb +1 -1
- data/app/models/phcpress/api/v1/category.rb +1 -1
- data/app/models/phcpress/api/v1/post.rb +1 -1
- data/app/models/phcpress/application_record.rb +1 -1
- data/app/models/phcpress/articles.rb +1 -1
- data/app/models/phcpress/articles/post.rb +5 -5
- data/app/models/phcpress/frontend.rb +1 -1
- data/app/models/phcpress/frontend/article.rb +1 -1
- data/app/models/phcpress/modules.rb +1 -1
- data/app/models/phcpress/modules/category.rb +1 -1
- data/app/models/phcpress/modules/connection.rb +3 -3
- data/app/uploaders/phcpress/pstimage_uploader.rb +2 -2
- data/app/views/layouts/components/backend/footer/_footer.html.erb +2 -2
- data/app/views/layouts/components/backend/navigation/_navigation.html.erb +5 -5
- data/app/views/layouts/components/backend/topbar/_topbar.html.erb +1 -1
- data/app/views/layouts/phcpress/frontend.html.erb +1 -1
- data/app/views/phcpress/api/v1/categories/index.json.rabl +1 -1
- data/app/views/phcpress/api/v1/posts/index.json.rabl +1 -1
- data/app/views/phcpress/articles/posts/_form.html.erb +3 -3
- data/app/views/phcpress/articles/posts/edit.html.erb +1 -1
- data/app/views/phcpress/articles/posts/index.html.erb +1 -1
- data/app/views/phcpress/articles/posts/new.html.erb +1 -1
- data/app/views/phcpress/articles/posts/show.html.erb +1 -1
- data/app/views/phcpress/frontend/articles/index.html.erb +3 -3
- data/app/views/phcpress/frontend/articles/show.html.erb +3 -3
- data/app/views/phcpress/modules/categories/_form.html.erb +3 -3
- data/app/views/phcpress/modules/categories/edit.html.erb +1 -1
- data/app/views/phcpress/modules/categories/index.html.erb +2 -2
- data/app/views/phcpress/modules/categories/new.html.erb +1 -1
- data/app/views/phcpress/modules/categories/show.html.erb +1 -1
- data/app/views/phcpress/modules/connections/_form.html.erb +3 -3
- data/app/views/phcpress/modules/connections/edit.html.erb +1 -1
- data/app/views/phcpress/modules/connections/index.html.erb +2 -2
- data/app/views/phcpress/modules/connections/new.html.erb +1 -1
- data/app/views/phcpress/modules/connections/show.html.erb +3 -3
- data/config/routes.rb +5 -5
- data/config/tinymce.yml +1 -1
- data/db/migrate/20160716182848_create_phcpress_modules_categories.rb +7 -7
- data/db/migrate/20160720181307_create_phcpress_articles_posts.rb +7 -7
- data/db/migrate/20160720235314_create_phcpress_modules_connections.rb +7 -7
- data/lib/phcpress.rb +1 -1
- data/lib/phcpress/engine.rb +8 -8
- data/lib/phcpress/version.rb +2 -2
- data/lib/tasks/phcpress_tasks.rake +1 -1
- metadata +168 -204
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f05f3d828eed770408f6de2524c7aaa08c79bfe4
|
4
|
+
data.tar.gz: 054ff3c552a23bfe2b3c74f830fcc66a32cc881d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c777aeb737d6c349d39850eae681e9be5f41d332ce4fe3f488d94c2079261987947accd6a278a1edac780bdc27b096dfd121d08bfcb545d47c211a3283649a0f
|
7
|
+
data.tar.gz: 199e8ff5f0319b45dec653f1e48f588cbd33eff478c4168e28b3b74f1818eaa155f340ed5cc0384b1f36f583fc605f74a56ff640b08a663db9358a2c90601f92
|
data/MIT-LICENSE
CHANGED
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
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.
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -6,41 +6,41 @@
|
|
6
6
|
|
7
7
|
### PHCPress(7) (News/Blog Engine) Documentation
|
8
8
|
PHCPress(7) rails CMS engine to manage your website's articles, categories and media.
|
9
|
-
|
9
|
+
|
10
10
|
* Website article posts with WYSIWYG editor.
|
11
11
|
* Upload images locally or use any popular cloud service.
|
12
12
|
* Customizable article categories module included.
|
13
|
-
|
13
|
+
|
14
14
|
#### Step 1 - Add PHCPress to your gemfile and run command
|
15
|
-
|
15
|
+
|
16
16
|
gem 'phcpress', '~> 7.0'
|
17
17
|
bundle install
|
18
|
-
|
18
|
+
|
19
19
|
#### Step 2 - Copy PHCPress Database Tables
|
20
20
|
To copy PHCPress' requried database migrations, copy each command individually to your terminal's command line.
|
21
|
-
|
21
|
+
|
22
22
|
rails phcpress:install:migrations
|
23
23
|
rails db:migrate
|
24
|
-
|
24
|
+
|
25
25
|
#### Step 3 - Mount PHCPress & Add Routes
|
26
26
|
Mount PHCPress by adding code below to your routes file.
|
27
|
-
|
27
|
+
|
28
28
|
mount Phcpress::Engine, :at => '/'
|
29
|
-
|
29
|
+
|
30
30
|
#### Step 4 - Recompile Assets
|
31
31
|
To properly function re-compile your application's assets to copy over requried files.
|
32
|
-
|
32
|
+
|
33
33
|
rails assets:clobber
|
34
34
|
rails assets:precompile
|
35
|
-
|
35
|
+
|
36
36
|
#### Step 5 - Generate Contact Form View (Customization)
|
37
37
|
All PHCPress views and layouts can be overwritten by copying files to your application.
|
38
|
-
|
39
|
-
rails generate phcpress:views
|
40
|
-
|
38
|
+
|
39
|
+
rails generate phcpress:views
|
40
|
+
|
41
41
|
#### How to Setup Image Uploads
|
42
42
|
PHCPress default Carrierwave settings can be overwritten.
|
43
|
-
|
43
|
+
|
44
44
|
- [How to Override PHCPress Uploader](https://github.com/PHCNetworks/phc-press/wiki/Image-Uploader---Override)
|
45
45
|
- [How to Override Cloudinary Uploader](https://github.com/PHCNetworks/phc-press/wiki/Image-Uploader-(Cloudinary))
|
46
|
-
- [Critical Security Updates](https://github.com/PHCNetworks/phc-press/wiki/Critical-Security-Updates)
|
46
|
+
- [Critical Security Updates](https://github.com/PHCNetworks/phc-press/wiki/Critical-Security-Updates)
|
data/Rakefile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
//= link_directory ../javascripts/phcpress .js
|
2
|
-
//= link_directory ../stylesheets/phcpress .scss
|
2
|
+
//= link_directory ../stylesheets/phcpress .scss
|
@@ -1,2 +1,2 @@
|
|
1
1
|
// Load PHCAdmin3 Javascript
|
2
|
-
//= require phc_admins_main_three
|
2
|
+
//= require phc_admins_main_three
|
@@ -1,2 +1,2 @@
|
|
1
1
|
// Load PHCAdmin3 Styles
|
2
|
-
@import "phc_admins_style_three";
|
2
|
+
@import "phc_admins_style_three";
|
@@ -2,14 +2,14 @@ require_dependency "phcpress/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpress
|
4
4
|
class Api::V1::CategoriesController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Only Responds to API Requests
|
7
7
|
respond_to :json
|
8
|
-
|
8
|
+
|
9
9
|
# Article Category API
|
10
10
|
def index
|
11
11
|
@modules_categories = Modules::Category.order('catname ASC')
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
@@ -2,14 +2,14 @@ require_dependency "phcpress/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpress
|
4
4
|
class Api::V1::PostsController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Only Responds to API Requests
|
7
7
|
respond_to :json
|
8
|
-
|
8
|
+
|
9
9
|
# Article Category API
|
10
10
|
def index
|
11
11
|
@articles_posts = Articles::Post.order('psttitle ASC')
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Phcpress
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
-
|
3
|
+
|
4
4
|
# Security
|
5
5
|
protect_from_forgery with: :exception
|
6
|
-
|
6
|
+
|
7
7
|
# Load Helpers
|
8
8
|
helper Phctitleseo::Engine.helpers
|
9
9
|
helper Phcnotifi::Engine.helpers
|
10
|
-
|
10
|
+
|
11
11
|
end
|
12
|
-
end
|
12
|
+
end
|
@@ -2,28 +2,28 @@ require_dependency "phcpress/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpress
|
4
4
|
class Articles::PostsController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Filters & Security
|
7
7
|
before_action :set_articles_post, only: [:show, :edit, :update, :destroy]
|
8
|
-
|
8
|
+
|
9
9
|
# Article Index
|
10
10
|
def index
|
11
11
|
@articles_posts = Articles::Post.all
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
# Article Show
|
15
15
|
def show
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
# Article New
|
19
19
|
def new
|
20
20
|
@articles_post = Articles::Post.new
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
# Article Edit
|
24
24
|
def edit
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
# POST
|
28
28
|
def create
|
29
29
|
@articles_post = Articles::Post.new(articles_post_params)
|
@@ -34,7 +34,7 @@ module Phcpress
|
|
34
34
|
render :new
|
35
35
|
end
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
# PATCH/PUT
|
39
39
|
def update
|
40
40
|
if @articles_post.update(articles_post_params)
|
@@ -44,24 +44,24 @@ module Phcpress
|
|
44
44
|
render :edit
|
45
45
|
end
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
# DELETE
|
49
49
|
def destroy
|
50
50
|
@articles_post.destroy
|
51
51
|
redirect_to articles_posts_url, notice: 'Post was successfully destroyed.'
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
private
|
55
|
-
|
55
|
+
|
56
56
|
# Common Callbacks
|
57
57
|
def set_articles_post
|
58
58
|
@articles_post = Articles::Post.find(params[:id])
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
# Params Whitelist
|
62
62
|
def articles_post_params
|
63
63
|
params.require(:articles_post).permit(:psttitle, :psttext, :pststatus, :pstimage, :remove_pstimage, category_ids: [])
|
64
64
|
end
|
65
|
-
|
65
|
+
|
66
66
|
end
|
67
67
|
end
|
@@ -2,19 +2,19 @@ require_dependency "phcpress/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpress
|
4
4
|
class Frontend::ArticlesController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Security & Filters
|
7
7
|
layout '/layouts/phcpress/frontend.html.erb'
|
8
|
-
|
8
|
+
|
9
9
|
# Article Index
|
10
10
|
def index
|
11
11
|
@articles_index = Articles::Post.all
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
# Single Article Post
|
15
15
|
def show
|
16
16
|
@articles_single = Articles::Post.find(params[:id])
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
@@ -2,28 +2,28 @@ require_dependency "phcpress/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpress
|
4
4
|
class Modules::CategoriesController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Security and Filters
|
7
7
|
before_action :set_modules_category, only: [:show, :edit, :update, :destroy]
|
8
|
-
|
8
|
+
|
9
9
|
# Categories Index
|
10
10
|
def index
|
11
11
|
@modules_categories = Modules::Category.all
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
# Categories Show
|
15
15
|
def show
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
# Categories New
|
19
19
|
def new
|
20
20
|
@modules_category = Modules::Category.new
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
# Categories Edit
|
24
24
|
def edit
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
# POST
|
28
28
|
def create
|
29
29
|
@modules_category = Modules::Category.new(modules_category_params)
|
@@ -33,7 +33,7 @@ module Phcpress
|
|
33
33
|
render :new
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
# PATCH/PUT
|
38
38
|
def update
|
39
39
|
if @modules_category.update(modules_category_params)
|
@@ -42,24 +42,24 @@ module Phcpress
|
|
42
42
|
render :edit
|
43
43
|
end
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
# DELETE
|
47
47
|
def destroy
|
48
48
|
@modules_category.destroy
|
49
49
|
redirect_to modules_categories_url, notice: 'Category was successfully destroyed.'
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
private
|
53
|
-
|
53
|
+
|
54
54
|
# Common Callbacks
|
55
55
|
def set_modules_category
|
56
56
|
@modules_category = Modules::Category.find(params[:id])
|
57
57
|
end
|
58
|
-
|
58
|
+
|
59
59
|
# Whitelist
|
60
60
|
def modules_category_params
|
61
61
|
params.require(:modules_category).permit(:catname)
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
end
|
65
65
|
end
|
@@ -2,28 +2,28 @@ require_dependency "phcpress/application_controller"
|
|
2
2
|
|
3
3
|
module Phcpress
|
4
4
|
class Modules::ConnectionsController < ApplicationController
|
5
|
-
|
5
|
+
|
6
6
|
# Security and Filters
|
7
7
|
before_action :set_modules_connection, only: [:show, :edit, :update, :destroy]
|
8
|
-
|
8
|
+
|
9
9
|
# Connections Index
|
10
10
|
def index
|
11
11
|
@modules_connections = Modules::Connection.all
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
# Connections Show
|
15
15
|
def show
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
# Connections New
|
19
19
|
def new
|
20
20
|
@modules_connection = Modules::Connection.new
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
# Connections Edit
|
24
24
|
def edit
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
# POST
|
28
28
|
def create
|
29
29
|
@modules_connection = Modules::Connection.new(modules_connection_params)
|
@@ -33,7 +33,7 @@ module Phcpress
|
|
33
33
|
render :new
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
# PATCH/PUT
|
38
38
|
def update
|
39
39
|
if @modules_connection.update(modules_connection_params)
|
@@ -42,24 +42,24 @@ module Phcpress
|
|
42
42
|
årender :edit
|
43
43
|
end
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
# DELETE
|
47
47
|
def destroy
|
48
48
|
@modules_connection.destroy
|
49
49
|
redirect_to modules_connections_url, notice: 'Connection was successfully destroyed.'
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
private
|
53
|
-
|
53
|
+
|
54
54
|
# Common Callbacks
|
55
55
|
def set_modules_connection
|
56
56
|
@modules_connection = Modules::Connection.find(params[:id])
|
57
57
|
end
|
58
|
-
|
58
|
+
|
59
59
|
# Whitelist
|
60
60
|
def modules_connection_params
|
61
61
|
params.require(:modules_connection).permit(:post_id, :category_id)
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
end
|
65
65
|
end
|