-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to define title and slug of page parts
Fix specs with slug support Use params[:slug] for page_part_field render Validate presence of title in PagePart model Add slug locales in FR and EN Fix page_part_dialog JS Change new_page_part_save errors text Fix visual_editor_add_image specs with the adding of :slug param (thanks @parndt) slug should be able to default to title.to_param (thanks @parndt) Set default slug before validation Deprecate old api for title_matches? and part_with_title methods Add feature and deprecations in changelog Add speakingurl-rails gem Rewrite page part title to slug using speakingurl Credit @simi for page part title feature Move speakingurl dependency to pages Precompile speakingurl only if new page part config is enable Q&A of @parndt fix speaking url load fix permitted params for page parts
- Loading branch information
1 parent
9c7a7f2
commit 040300c
Showing
17 changed files
with
113 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<div class='page_part' id='<%= new_part ? "page_part_new_#{part_index}" : part.to_param %>'> | ||
<%= hidden_field_tag "page[parts_attributes][#{part_index}][title]", part.title if new_part %> | ||
<%= hidden_field_tag "page[parts_attributes][#{part_index}][slug]", part.slug if new_part %> | ||
<%= text_area_tag "page[parts_attributes][#{part_index}][body]", part.body, :rows => 20, :class => 'visual_editor widest' %> | ||
<%= hidden_field_tag "page[parts_attributes][#{part_index}][position]", part_index %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
pages/db/migrate/20150130044643_add_slug_to_refinery_page_parts.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class AddSlugToRefineryPageParts < ActiveRecord::Migration | ||
def change | ||
rename_column :refinery_page_parts, :title, :slug | ||
add_column :refinery_page_parts, :title, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,4 @@ module Admin | |
require 'friendly_id' | ||
require 'seo_meta' | ||
require 'babosa' | ||
require 'speakingurl-rails' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters