-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COR-217: Content Publishable #341
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7d2c3f7
Add Publishable to ContentType - Clean up old fields
ElliottAYoung 30ab6e2
Apply a Default of False to Publishable
ElliottAYoung a41f1d1
Add publishable to seed task
ElliottAYoung 0715a2f
Remove old publish state data from ContentItem
ElliottAYoung 66664be
Create PublushState and associate with ContentItem
ElliottAYoung aeb612c
Buttons are now representative of Publish State
ElliottAYoung 6772547
Publish State updates from submit buttons in form
ElliottAYoung 1891131
States now working exactly as expected - refactoring into cells
ElliottAYoung b0728f9
Create Working Cell System for Publish State Buttons
ElliottAYoung 9002179
Spin Down Publish State in lieu of a State Machine
ElliottAYoung 3f73642
Set up Initial States with Transitions State Machine
ElliottAYoung d741689
Able to publish from form submission
ElliottAYoung 2806945
model is not longer an instance variable
ElliottAYoung afe5742
Refactor buttons for publish state and editing
ElliottAYoung 6554a1f
Add Default state for ContentItems
ElliottAYoung 34eb610
Change 'Save as Default' button to work with default state
ElliottAYoung 47cf2a6
Do away with button cells
ElliottAYoung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= link_to edit_content_type_content_item_path(content_type.id, content_item.id), class: 'mdl-button mdl-js-button mdl-button--icon' do | ||
%i{ class: 'material-icons' } | ||
create |
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,15 @@ | ||
class ButtonsCell < Cell::ViewModel | ||
def edit_button | ||
render | ||
end | ||
|
||
private | ||
|
||
def content_item | ||
model | ||
end | ||
|
||
def content_type | ||
content_item.content_type | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
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
5 changes: 5 additions & 0 deletions
5
db/migrate/20160916145613_add_publishable_boolean_to_content_type.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,5 @@ | ||
class AddPublishableBooleanToContentType < ActiveRecord::Migration | ||
def change | ||
add_column :content_types, :publishable, :boolean, default: false | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
db/migrate/20160916145740_remove_unnecessary_fields_from_content_type.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,7 @@ | ||
class RemoveUnnecessaryFieldsFromContentType < ActiveRecord::Migration | ||
def change | ||
remove_column :content_types, :taggable_with_tags?, :boolean | ||
remove_column :content_types, :taggable_with_keywords?, :boolean | ||
remove_column :content_types, :is_published, :boolean | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
db/migrate/20160919153329_remove_old_state_data_from_content_items.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,7 @@ | ||
class RemoveOldStateDataFromContentItems < ActiveRecord::Migration | ||
def change | ||
remove_column :content_items, :publish_state, :string | ||
remove_column :content_items, :published_at, :datetime | ||
remove_column :content_items, :expired_at, :datetime | ||
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddStateToContentItems < ActiveRecord::Migration | ||
def change | ||
add_column :content_items, :state, :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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a good candidate for an entire class.. I'd just nest it in the view, since it's not complex business logic nor does it utilize its own model