Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed template type, Set page destroy message

  • Loading branch information...
commit 955da3458f33060f264116497f87fb32c46beed4 1 parent b1e1f60
@jiren jiren authored
View
2  app/controllers/feather_cms/pages_controller.rb
@@ -30,6 +30,7 @@ def create
@page.name = @page.name.parameterize
@page.status = 'draft'
+ @page.template_type = 'html'
if @page.save
redirect_to pages_path
@@ -44,6 +45,7 @@ def update
@page.attributes = params[:page]
@page.name = @page.name.parameterize
@page.status = status
+ @page.template_type = 'html'
if @page.save
redirect_to pages_path
View
4 app/views/feather_cms/pages/_form.html.haml
@@ -16,13 +16,9 @@
%label.control-label{:for => 'layout'} Layout
.controls
= f.select :layout, FeatherCms::Config.layouts
- %label.control-label{:for => 'layout'} Template Type
- .controls
- = f.select :template_type, FeatherCms::Config.template_types
.control-group
%label.control-label{:for => 'textarea'} Content*
.controls
= f.hidden_field :content, :id => 'page_content'
- =# f.text_area :content, :class => 'feather_editor input-xlarge span11', :row => '20'
#epiceditor
= f.submit 'Save', :class => 'btn btn-primary btn-large'
View
2  app/views/feather_cms/pages/index.html.haml
@@ -19,4 +19,4 @@
|
= link_to 'Edit', edit_page_path(page)
|
- = link_to 'Destroy', page_path(page), :method => :delete, :confirm => true
+ = link_to 'Destroy', page_path(page), :method => :delete, :confirm => 'Are you sure?'
View
3  config/routes.rb
@@ -1,8 +1,5 @@
FeatherCms::Engine.routes.draw do
- #match 'page/:type/(:status)' => 'page#page', :as => :feather_page
- #get 'pages' => 'feathers#index', :as => :feather_pages
-
get 'preview/:id' => 'pages#preview', :as => 'page_preview'
resources :pages
View
3  lib/generators/feather_cms/templates/initializer.rb
@@ -3,7 +3,4 @@
c.authentication = {name: 'feather', password: 'password'}
#Note: For before filter
#c.authentication = :authenticate_user!
-
- #c.template_extenstion = 'html' #default : html
- c.template_types = ["html", "haml"]
end
Please sign in to comment.
Something went wrong with that request. Please try again.