aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog/posts/_form.html.erb
diff options
context:
space:
mode:
authorMichael Gall <michael@wakeless.net>2011-05-31 11:38:28 +1000
committerPhilip Arndt <parndt@gmail.com>2011-05-31 13:53:56 +1200
commit60fc7839f8b6227951eed454442b69836840df01 (patch)
treeb34f4b00c7d8616635480befeb5200b68dfacca7 /app/views/admin/blog/posts/_form.html.erb
parent7bb8b056f5b181cfdc88afa60799f3a669d9913f (diff)
downloadrefinerycms-blog-60fc7839f8b6227951eed454442b69836840df01.tar.gz
refinerycms-blog-60fc7839f8b6227951eed454442b69836840df01.tar.bz2
refinerycms-blog-60fc7839f8b6227951eed454442b69836840df01.zip
Add page-like tab functionality
Diffstat (limited to 'app/views/admin/blog/posts/_form.html.erb')
-rw-r--r--app/views/admin/blog/posts/_form.html.erb29
1 files changed, 27 insertions, 2 deletions
diff --git a/app/views/admin/blog/posts/_form.html.erb b/app/views/admin/blog/posts/_form.html.erb
index 7bcca84..7d95052 100644
--- a/app/views/admin/blog/posts/_form.html.erb
+++ b/app/views/admin/blog/posts/_form.html.erb
@@ -11,8 +11,33 @@
</div>
<div class='field'>
- <%= f.label :body -%>
- <%= f.text_area :body, :rows => 20, :class => 'wymeditor widest' -%>
+ <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
+ <ul id='page_parts'>
+ <li class='ui-state-default'>
+ <%= link_to "Body", "#page_part_body" %>
+ </li>
+ <% Refinery::Blog.tabs.each_with_index do |tab, tab_index| %>
+ <li class='ui-state-default' id="custom_<%= tab.name %>_tab">
+ <%= link_to tab.name.titleize, "#custom_tab_#{tab_index}" %>
+ </li>
+ <% end %>
+ </ul>
+
+ <div id='page_part_editors'>
+
+ <% part_index = -1 %>
+ <%= render :partial => 'form_part',
+ :locals => {
+ :f => f,
+ :part_index => (part_index += 1),
+ } -%>
+ <% Refinery::Blog.tabs.each_with_index do |tab, tab_index| %>
+ <div class='page_part' id='<%= "custom_tab_#{tab_index}" %>'>
+ <%= render :partial => tab.partial, :locals => {:f => f} %>
+ </div>
+ <% end %>
+ </div>
+ </div>
</div>
<div class='field'>