Open
Conversation
Breaks the admin write and edit code into two separate templates and functions.
Owner
|
Logan, great work. As you mentioned there is dup code in the views, what would it take to have them both running off a single view (for easy updates In the future)? |
Collaborator
Author
|
To merge the two templates into one template you'd need to pass an instance of StdClass object for the item table into the Write view. You'd also need to show/hide portions of the templates depending on the type of page you were displaying. To me the biggest draw back would be updating Write::index() to create the item StdClass and then assigning it all of the table columns. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The majority of this code are updates for CI 2.1 from the original LifePress code base.
The core changes that took place in this pull request is the ability to modify the slug of a posted item. This pull request does not address the following
It breaks the edit/write tool for items into 2 separate views and controller functions. There is now a separate router rule servicing requests. These changes made it possible to streamline and clean up the controller level, though there is duplicate code that should be refactored at the view level.
References #13