tcast / cms_admin2

Rails 4 Content Management System (CMS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cms_admin2

Rails 4 / Twitter Bootstrap 3 CMS. Pages, posts and users.


Default Credentials

User: admin@example.com

Pass: password


Introduction

CMS_Admin2 is a simple approach to content management. The system revolves around Pages and Posts. Each Page can have many posts and posts can be anything (blog posts, products, events, etc…).

Custom Post Type

Posts is a general term used for anything that can belong to a page. In order to post products on a ‘store’ page, you will have to create a partial titled ‘_form_for_store.html.erb’ in the view/admin/posts folder. Create a migration to add the desired fields to posts and add the fields to the form partial with the Simple Form format. Now when creating or editing a product your custom form partial will be rendered in place of the default form.


Custom Page Modules

There are five pre-defined module positions within each page.

page_top

page_bottom

after_posts

side_left

side_right

To utilize these positions, create a partial file in the ‘page_modules’ view folder with the same name as the page. An example is included for the home page.

If custom objects are needed for your page module, then create a method in the pages controller under private with the same name as the page. When the corresponding page is loaded, so will the custom objects within this method. The home page structure is laid out as an example.


Custom Post List for Specific Page

To customize the post list layout for a page, create a file in the “posts/list” folder with the format “_list_for_example.html.erb”, where “example” would be the page name.


Custom Post Show Layout

The default post layout is nice but it only displays the default post parameters. To show a custom layout create a file in “posts/show” called “_show_example.html.erb”, where “example” is the name of the parent page.


Main Dependencies: Twitter Bootstrap, Devise, RedCloth, Simple Form, Acts as List, Paperclip, Friendly Id.


The MIT License (MIT)

Copyright © 2014 PushVendor

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Rails 4 Content Management System (CMS)