Skip to content
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

Layout not set correctly for a subpage when loading in admin #1710

Closed
wiegerhofstra opened this issue May 28, 2012 · 2 comments
Closed

Layout not set correctly for a subpage when loading in admin #1710

wiegerhofstra opened this issue May 28, 2012 · 2 comments

Comments

@wiegerhofstra
Copy link

The layout option is not set correctly for a subpage when loading options in admin, it now automatically sets the parent template setting, instead of loading it's own. Something that is fine for when you create the subpage, but afterwards it should load its own value.

I think the problem lies in pages/app/views/refinery/admin/pages/_form_advanced_options.html.erb on line 30

<% if @page.parent_id? %>
  <%= f.select(:layout_template, @valid_layout_templates, {:selected => @page.parent.layout_template}) %>
<% else %>
  <%= f.select(:layout_template, @valid_layout_templates) %>
<% end %>
@parndt
Copy link
Member

parndt commented May 28, 2012

Man that is such un-DRY code we've written.

I understand what you mean though - we need a test case for this particular bug.

@ugisozols
Copy link
Member

#1712

ugisozols added a commit that referenced this issue May 30, 2012
ugisozols added a commit that referenced this issue May 30, 2012
ugisozols added a commit that referenced this issue May 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants