some adjustments
Oleg
committed Sep 05, 2011
commit 68cf43796e5c9f9e6f8e5f8179229d4b16b933cc
Showing 8
changed files with
7 additions
and 4 deletions
README.md
+1
-1
| @@ | @@ -49,7 +49,7 @@ Once you have a layout, you may start creating pages and populating content. It' |
| For more information please [see Wiki pages](https://github.com/twg/comfortable-mexican-sofa/wiki). | |
| - |  |
| + |  |
| ComfortableMexicanSofa is released under the [MIT license](https://github.com/twg/comfortable-mexican-sofa/raw/master/LICENSE) | |
app/controllers/cms_content_controller.rb
+2
-2
| @@ | @@ -54,11 +54,11 @@ protected |
| return unless ComfortableMexicanSofa.config.enable_fixtures | |
| ComfortableMexicanSofa::Fixtures.import_all(@cms_site.hostname) | |
| end | |
| - | |
| + | |
| def load_cms_page | |
| @cms_page = @cms_site.pages.published.find_by_full_path!("/#{params[:cms_path]}") | |
| return redirect_to(@cms_page.target_page.full_path) if @cms_page.target_page | |
| - | |
| + | |
| rescue ActiveRecord::RecordNotFound | |
| if @cms_page = @cms_site.pages.published.find_by_full_path('/404') | |
| render_html(404) | |
app/views/cms_admin/sites/index.html.erb
+1
-0
| @@ | @@ -7,6 +7,7 @@ |
| <div class='item'> | |
| <div class='icon'></div> | |
| <div class='action_links'> | |
| + | <%= link_to t('.select'), cms_admin_site_pages_path(site) %> |
| <%= link_to t('.edit'), edit_cms_admin_site_path(site) %> | |
| <%= link_to t('.delete'), cms_admin_site_path(site), :method => :delete, :confirm => t('.are_you_sure') %> | |
| </div> | |
config/locales/en.yml
+1
-0
| @@ | @@ -101,6 +101,7 @@ en: |
| index: | |
| title: Sites | |
| new_link: Create New Site | |
| + | select: Select Site |
| edit: Edit | |
| delete: Delete | |
| are_you_sure: Are you sure you want to delete this site? | |
config/locales/es.yml
+1
-0
| @@ | @@ -101,6 +101,7 @@ es: |
| index: | |
| title: Listado de Sitios | |
| new_link: Crear nuevo Sitio | |
| + | select: Select Site |
| edit: Editar | |
| delete: Eliminar | |
| are_you_sure: ¿Está seguro de que desea eliminar este sitio? | |
doc/page_editing.png
+0
-0
doc/preview.png
+0
-0
test/functional/cms_admin/pages_controller_test.rb
+1
-1
| @@ | @@ -340,7 +340,7 @@ class CmsAdmin::PagesControllerTest < ActionController::TestCase |
| assert_equal 0, page_one.position | |
| assert_equal 1, page_two.position | |
| - | post :reorder, :site_id => cms_sites(:default), :page => [page_two.id, page_one.id] |
| + | post :reorder, :site_id => cms_sites(:default), :cms_page => [page_two.id, page_one.id] |
| assert_response :success | |
| page_one.reload | |
| page_two.reload | |