diff --git a/app/helpers/fam_fam_fam_helper.rb b/app/helpers/fam_fam_fam_helper.rb
new file mode 100644
index 0000000..a8ee5f0
--- /dev/null
+++ b/app/helpers/fam_fam_fam_helper.rb
@@ -0,0 +1,5 @@
+module FamFamFamHelper
+ def famfamfam_icon name
+ image_tag('famfamfam_icons/' + name + '.png')
+ end
+end
diff --git a/app/helpers/flashes_helper.rb b/app/helpers/flashes_helper.rb
new file mode 100644
index 0000000..c5aae11
--- /dev/null
+++ b/app/helpers/flashes_helper.rb
@@ -0,0 +1,23 @@
+module FlashesHelper
+ include FamFamFamHelper
+
+ def display_standard_flashes(message = 'There were some problems with your submission:')
+ if flash[:notice]
+ flash_to_display, level, icon = flash[:notice], 'notice', 'tick'
+ elsif flash[:warning]
+ flash_to_display, level, icon = flash[:warning], 'warning', 'delete'
+ elsif flash[:error]
+ level = 'error'
+ if flash[:error].instance_of? ActiveRecord::Errors
+ flash_to_display = message
+ flash_to_display << activerecord_error_list(flash[:error])
+ else
+ flash_to_display = flash[:error]
+ end
+ icon = 'error'
+ else
+ return
+ end
+ content_tag 'div', famfamfam_icon(icon) + ' ' + flash_to_display, :class => "flash #{level}"
+ end
+end
diff --git a/app/views/admin/pages/_tabs.html.erb b/app/views/admin/_tabs.html.erb
similarity index 88%
rename from app/views/admin/pages/_tabs.html.erb
rename to app/views/admin/_tabs.html.erb
index 0bbef5b..1b92992 100644
--- a/app/views/admin/pages/_tabs.html.erb
+++ b/app/views/admin/_tabs.html.erb
@@ -1,11 +1,12 @@
<% if logged_in? %>
-
+ <%= render :partial => "admin/page_plugins/admin_plugins_nav" -%>
+
<%= create_tab('Manage Pages', '/admin/pages') %>
<%= create_tab('List Plugins', '/admin/plugins') %>
<%= create_tab('Account Settings', '/admin/account/update') %>
<%= create_tab('Logout', '/admin/account/logout') %>
- <%= render :partial => "admin/page_plugins/admin_plugins_nav" -%>
+
<% end %>
diff --git a/app/views/admin/page_plugins/_admin_plugins_nav.html.erb b/app/views/admin/page_plugins/_admin_plugins_nav.html.erb
index 886a6c1..fac7b97 100644
--- a/app/views/admin/page_plugins/_admin_plugins_nav.html.erb
+++ b/app/views/admin/page_plugins/_admin_plugins_nav.html.erb
@@ -1,5 +1,5 @@
<% @admin_plugin_nav.each do |text, url| -%>
- <%= link_to text, url -%>
+ <%= create_tab text, url -%>
<% end -%>
diff --git a/app/views/admin/pages/edit.html.erb b/app/views/admin/pages/edit.html.erb
index 3c93eca..bb2dcc1 100644
--- a/app/views/admin/pages/edit.html.erb
+++ b/app/views/admin/pages/edit.html.erb
@@ -1,21 +1,33 @@
-Edit Page
-<% form_remote_tag :url => admin_page_path(@page),
- :update => 'main',
- :method => :put,
- :complete => remote_function(
- :update => "item#{@page.parent_id}",
- :url => { :action => 'manage_tree', :parent_id => @page.parent_id, :tree_post_id => @post_id },
- :complete => 'refresh_visibility()'),
- :html => { 'name' => 'page_form' } do -%>
- <%= render :partial => 'form' %>
- <%= submit_tag 'Update', :class => 'submit' -%>
+<% content_for :sidebar do -%>
+ <% form_remote_tag :url => admin_page_path(@page),
+ :update => 'main',
+ :method => :put,
+ :complete => remote_function(
+ :update => "item#{@page.parent_id}",
+ :url => { :action => 'manage_tree', :parent_id => @page.parent_id, :tree_post_id => @post_id },
+ :complete => 'refresh_visibility()'),
+ :html => { 'name' => 'page_form' } do -%>
+ <%= render :partial => 'form' %>
+ <%= submit_tag 'Update', :class => 'submit' -%>
+ <% end -%>
+<% end -%>
+
+<% content_for :sidebar do -%>
+ Plugins on this page
+
+ <% @page.page_plugins.each do |plugin| -%>
+ <%= link_to(plugin.module_type, plugin.module.edit_path, :class => 'edit_page_plugin') -%>
+ <% end -%>
+
+ <%= link_to "Add Plugin", new_admin_page_plugin_path(:page_id => @page.id) -%>
<% end -%>
+
-Plugins on this page
-
+<% if @page.display_title %>
+ <%= @page.full_title %>
+<% end %>
+<% if @page.page_plugins.any? -%>
<% @page.page_plugins.each do |plugin| -%>
- <%= link_to(plugin.module_type, plugin.module.edit_path, :class => 'edit_page_plugin') -%>
+ <%= render :partial => plugin.module_class.view_partial, :locals => { :plugin_module => plugin.module } -%>
<% end -%>
-
-<%= link_to "Add Plugin", new_admin_page_plugin_path(:page_id => @page.id) -%>
-
+<% end -%>
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 65389e7..3f1b200 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -8,12 +8,10 @@
-
-
<%= stylesheet_link_tag 'reset-fonts-grids' %>
<%= stylesheet_link_tag 'sprite' %>
- <%= stylesheet_link_tag 'base' %>
<%= stylesheet_link_tag 'admin' %>
+ <%= stylesheet_link_tag 'jqmodal' %>
<%= javascript_include_tag :defaults, 'jquery', 'jqModal', 'jquery.growl.js', 'ansuz/growls' %>
<%= javascript_include_tag 'show_and_hide' %>
<%= javascript_include_tag 'fckeditor/fckeditor' %>
@@ -23,11 +21,16 @@
+
+ <%= render :partial => "/admin/tabs" %>
+
+
- <%= render :partial => "/admin/pages/tabs" %>
<%# TODO: I need to use the helper I use to print all flash messages here, way more stylable / useful -ja -%>
@@ -37,7 +40,9 @@
<%= @content_for_layout %>
-
Add a Plugin
+
+ [ Currently Editing: <%= current_database %> ]
+