diff --git a/README b/README
index 8f269c8..1604b53 100644
--- a/README
+++ b/README
@@ -28,6 +28,17 @@ Ansuz is licensed via the BSD license.
NOTE: SQLite has problems with ansuz, please don't use it for now.
+== If you had problems with the above
+
+I was asked to add this to the README.
+
+gem install -v=2.1.0 rails --no-ri --no-rdoc
+rake rails:freeze:edge RELEASE=2.1.0
+gem sources -a http://gems.github.com
+gem install haml --no-ri --no-rdoc
+
+If upgrading to 2.1.2, see: http://engines.lighthouseapp.com/projects/10178/tickets/37-module-activesupportdependencies
+
== This software is BSD licensed. See the COPYING file for details.
For help, feel free to contact the authors at:
diff --git a/app/helpers/content_section_helper.rb b/app/helpers/content_section_helper.rb
new file mode 100644
index 0000000..c3ccfc0
--- /dev/null
+++ b/app/helpers/content_section_helper.rb
@@ -0,0 +1,14 @@
+module ContentSectionHelper
+ def rollback_dropdown content_section, options={}
+ options[:id] ||= "rollback_dropdown_for_content_section_" + content_section.id.to_s
+ versions = versions_array(content_section)
+ the_options = options_for_select(versions.reverse)
+ the_id = content_section.id
+ the_select = content_tag("select", the_options, :onchange => "redirect_to_rollback_link(#{the_id}, this.options[this.selectedIndex].value)")
+ content_tag("div", the_select, :id => options[:id])
+ end
+
+ def versions_array content_section
+ (1..content_section.versions.length).to_a
+ end
+end
diff --git a/public/stylesheets/base.css b/public/stylesheets/base.css
index ffc7450..539a376 100644
--- a/public/stylesheets/base.css
+++ b/public/stylesheets/base.css
@@ -132,3 +132,9 @@ ul.photos.item-list a{
ul.photos.item-list a{
opacity: 1;
}
+#lightbox-nav a{
+ display: none;
+}
+#lightbox-nav a:hover {
+ display: inline;
+}
diff --git a/public/stylesheets/forums.css b/public/stylesheets/forums.css
index 3d4f55b..93be261 100644
--- a/public/stylesheets/forums.css
+++ b/public/stylesheets/forums.css
@@ -518,7 +518,7 @@ table
table.wide { width:100%; }
table tr th
{
- background:#333;
+ background:black;
color:white;
padding:3px 10px;
border:1px solid #222;
diff --git a/public/stylesheets/jquery.lightbox-0.5.css b/public/stylesheets/jquery.lightbox-0.5.css
index fea1a99..106fd13 100644
--- a/public/stylesheets/jquery.lightbox-0.5.css
+++ b/public/stylesheets/jquery.lightbox-0.5.css
@@ -55,7 +55,8 @@
z-index: 10;
}
#lightbox-container-image-box > #lightbox-nav { left: 0; }
-#lightbox-nav a { outline: none;}
+#lightbox-nav a { outline: none; opacity:0;}
+#lightbox-nav a:hover { opacity:1.0;}
#lightbox-nav-btnPrev, #lightbox-nav-btnNext {
width: 49%;
height: 100%;
@@ -98,4 +99,4 @@
width: 66px;
float: right;
padding-bottom: 0.7em;
-}
\ No newline at end of file
+}
diff --git a/themes/default/stylesheets/tables.css b/themes/default/stylesheets/tables.css
index 786d06d..81db794 100644
--- a/themes/default/stylesheets/tables.css
+++ b/themes/default/stylesheets/tables.css
@@ -97,45 +97,38 @@ tbody tr th a:link {
}
tbody tr th a:visited {
- font: bold 0.9em tahoma, arial, sans-serif;
color: #5E7796;
text-decoration: none;
}
tbody tr th a:hover {
- font: bold 0.9em tahoma, arial, sans-serif;
color: #5E7796;
text-decoration: none;
}
tbody tr th a:active {
- font: bold 0.9em tahoma, arial, sans-serif;
color: #5E7796;
text-decoration: line-through;
}
tbody td a:link {
- font: normal 0.9em tahoma, arial, sans-serif;
color: #0084ff;
text-decoration: underline;
}
tbody td a:visited {
- font: normal 0.9em tahoma, arial, sans-serif;
color: #0084ff;
text-decoration: none;
}
tbody td a:hover {
- font: normal 0.9em tahoma, arial, sans-serif;
color: #0084ff;
text-decoration: none;
}
tbody td a:active {
- font: normal 0.9em tahoma, arial, sans-serif;
color: #0084ff;
text-decoration: underline;
}
diff --git a/vendor/plugins/ansuz_content_section/app/controllers/content_sections_controller.rb b/vendor/plugins/ansuz_content_section/app/controllers/admin/content_sections_controller.rb
similarity index 73%
rename from vendor/plugins/ansuz_content_section/app/controllers/content_sections_controller.rb
rename to vendor/plugins/ansuz_content_section/app/controllers/admin/content_sections_controller.rb
index 1433b4c..21b0774 100644
--- a/vendor/plugins/ansuz_content_section/app/controllers/content_sections_controller.rb
+++ b/vendor/plugins/ansuz_content_section/app/controllers/admin/content_sections_controller.rb
@@ -1,8 +1,9 @@
-class ContentSectionsController < ApplicationController
+class Admin::ContentSectionsController < Admin::BaseController
unloadable # This is required if you subclass a controller provided by the base rails app
layout 'admin'
before_filter :load_admin_plugin_nav
- before_filter :load_content_section, :only => [:show, :edit, :update]
+ before_filter :load_content_section, :only => [:show, :edit, :update, :rollback, :get_dropdown]
+ helper :content_section
protected
# This method duplicated from admin/base_controller
@@ -32,4 +33,13 @@ def update
end
end
end
+
+ def rollback
+ @content_section.revert_to(params[:version_number])
+ render :text => @content_section.contents
+ end
+
+ def get_dropdown
+ render :text => render_to_string(:partial => 'get_dropdown')
+ end
end
diff --git a/vendor/plugins/ansuz_content_section/app/models/content_section.rb b/vendor/plugins/ansuz_content_section/app/models/content_section.rb
index ed2263d..98483fd 100644
--- a/vendor/plugins/ansuz_content_section/app/models/content_section.rb
+++ b/vendor/plugins/ansuz_content_section/app/models/content_section.rb
@@ -4,15 +4,15 @@ class ContentSection < ActiveRecord::Base
acts_as_versioned
def self.admin_partial
- "/content_sections/edit"
+ "/admin/content_sections/edit"
end
def edit_path
- "/content_sections/#{id}/edit"
+ "/admin/content_sections/#{id}/edit"
end
def self.view_partial
- "/content_sections/content_section"
+ "/admin/content_sections/content_section"
end
end
end
diff --git a/vendor/plugins/ansuz_content_section/app/views/content_sections/_content_section.html.erb b/vendor/plugins/ansuz_content_section/app/views/admin/content_sections/_content_section.html.erb
similarity index 100%
rename from vendor/plugins/ansuz_content_section/app/views/content_sections/_content_section.html.erb
rename to vendor/plugins/ansuz_content_section/app/views/admin/content_sections/_content_section.html.erb
diff --git a/vendor/plugins/ansuz_content_section/app/views/admin/content_sections/_edit.html.erb b/vendor/plugins/ansuz_content_section/app/views/admin/content_sections/_edit.html.erb
new file mode 100644
index 0000000..356f38f
--- /dev/null
+++ b/vendor/plugins/ansuz_content_section/app/views/admin/content_sections/_edit.html.erb
@@ -0,0 +1,24 @@
+<% @content_section = plugin_module if local_assigns.include?(:plugin_module) %>
+<% remote_form_for :content_section, @content_section, :url => admin_content_section_path(@content_section), :html => { :method => :put }, :before => fckeditor_before_js(:content_section, :contents), :success => "update_dropdown_for(#{@content_section.id})" do |f| -%>
+ <%= fckeditor_textarea(:content_section, :contents, :toolbarSet => 'Simple', :width => '100%', :height => '400px', :ajax => true) -%>
+ <%= rollback_dropdown(@content_section) %>
+ <%= submit_tag("Update Content Section", :id => 'close_modal_and_flash') -%>
+<% end -%>
+