Skip to content

Commit

Permalink
Merge commit 'core/blog-content-model' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Jul 13, 2010
2 parents b184274 + 3a0966d commit 76d120a
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions vendor/modules/blog/app/views/blog/manage/post.rhtml
Expand Up @@ -80,6 +80,16 @@
<%= f.text_field :permalink, :label => 'Permalink (Leave blank to have one created for you)', :vertical => true, :style => 'width:100%;', :noun => 'Permalink' %>
<%= f.text_field :author, :vertical => true, :style=>'width:100%' %>
<%= f.editor_area :body, :vertical => true, :required => true, :rows => 35, :style=>'width:100%', :content_filter => @blog.content_filter %>
<% if @blog.content_model -%>
<%= f.header "Custom Fields (%s)" / @blog.content_model.name %>
<% cms_subfields_for 'entry[data_model]', @entry.data_model do |cf| -%>
<% @blog.content_model.content_model_fields.each do |field| -%>
<%= field.form_field(cf, :vertical => true) %>
<% end -%>
<% end -%>
<% end -%>
<%= f.header "Additional Fields" %>
<%= f.text_field :preview_title, :vertical => true, :size => 80, :label => 'Preview Title (Optional)' %>
<%= f.editor_area :preview, :vertical => true, :rows => 12, :label => 'Preview (Optional)', :style=>'width:100%', :content_filter => @blog.content_filter %>
Expand Down Expand Up @@ -125,22 +135,6 @@
<% end -%>
<%= f.datetime_field :published_at, :label => '',:unstyled => true, :blank => true, :disabled => !(@entry.status == 'published' && ( !@entry.published_at || @entry.published_at > Time.now ) ) %>
</div>

<% if @blog.content_model -%>
<div class='sidebar_header'>
<%= @blog.content_model.name %>
</div>
<div class='sidebar_group'>
<table>
<% cms_subfields_for 'entry[data_model]', @entry.data_model do |cf| -%>
<% @blog.content_model.content_model_fields.each do |field| -%>
<%= field.form_field(cf, :vertical => true) %>
<% end -%>
</table>
<% end -%>
</div>
<% end -%>

<div align='center'>
<table>
<%= f.submit_tag @entry.id ? 'Update Entry' : 'Create Entry',:unstyled => true %>
Expand Down

0 comments on commit 76d120a

Please sign in to comment.