aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
Commit message (Collapse)AuthorAgeFilesLines
* Update blog main views to not render body_content right.Harald Eilertsen2013-12-254-0/+57
|
* Move the side_body stuff to the right sidebar.Harald Eilertsen2013-12-252-6/+8
|
* Add tests for sidebar helper.Harald Eilertsen2013-12-251-1/+1
| | | | Also fixes DOM id of sidebar modules with spaces in their title.
* Refactor filtering of sidebar modules to helper.Harald Eilertsen2013-12-252-2/+2
| | | | Also strip out modules with empty bodies.
* More sidebar module fixes.Harald Eilertsen2013-12-255-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | There was some problems with the approach in the previous commits. - render_collection (render @sidebar_modules in our case) requires that all objects return the same partial path. Ours may not do that, so we wrote our own `render_sidebar_modules`-helper. - The way render_partial finds the correct path to the partial is to append what's returned by to_partial_path with whatever root the parent view is in. That would require duplication of the partials under all the different engines namespaces. Our `render_sidebar_modules` does it differently, and just looks up the partial according to the root namespace. This means the sidebar_module code can move back under the root application so we don't mess up the refinery namespaces. - Finally found the proper way to link to a blog_post so that it works from all namespaces. The correct way is: refinery.blog_post_path(post) This works in views (and presumably helpers,) but not in controllers which is why we struggled with it before.
* Clean up sidebar modules.Harald Eilertsen2013-12-254-14/+15
| | | | | | | | | | | | | | Rewrite the _sidebar_module partial to render only one module, and to not make any assumptions about the contents of a module. (Except that it has a title and a body.) Move the actual module logic into model classes, and use the ActiveModel magic to have it find it's own partial. Now we have the view logic for each module in it's own partial that in turn renders as part of the _sidebar_module partial. Only implementation this far is the blog-category module listing the latest blog entries within each category.
* Populate home page with blog entries.Harald Eilertsen2013-12-241-0/+20
| | | | | | I would like to just render the refinery/blog/index template for this, but I did not find a way to do it, so I copied it instead. May need to revisit this if upgrading to a new refinery or blog engine.
* Display sidebar position in backend category list.Harald Eilertsen2013-12-231-0/+20
|
* Only render sidebar modules if present.Harald Eilertsen2013-12-231-1/+2
|
* Use blog category position to populate sidebars.Harald Eilertsen2013-12-232-2/+2
|
* Add sidebar_position field to blog categories.Harald Eilertsen2013-12-231-0/+24
|
* Add read more link to sidebar items.Harald Eilertsen2013-12-231-0/+1
|
* Move markup from decorator to template.Harald Eilertsen2013-12-231-3/+3
| | | | | Note to self, use model decorators to massage model data, but leave the markup to the views where it belong.
* Add sidebar_module partial and SidebarPostDecorator class.Harald Eilertsen2013-12-232-8/+11
| | | | | | | | | | | | | Also did some code cleanup in PagesControllerDecorator::populate_sidebars. The controller will now populate left and right sidebars (only left for now,) while the SidebarPostDecorator will provide the markup for each post that is to be shown in a sidebar. The plan is to further expand the system with other Sidebar- Decorators, so each item can be rendered using the same in the partial.
* Begin automatic filling of sidebars with content.Harald Eilertsen2013-11-141-1/+8
| | | | | List blog categories and 10 most resent posts in each category in the left sidebar.
* Basic simple styling.Harald Eilertsen2013-10-204-0/+36
|
* Initial commit.Harald Eilertsen2013-01-251-0/+25