This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
took out some whitelist stuff in savage beast, as it was screwing up …
…the console
- Loading branch information
Josh Adams
committed
Oct 24, 2008
1 parent
6e58d41
commit 32333b1
Showing
39 changed files
with
183 additions
and
602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ public/photo_album_photo_images/ | |
public/photo_album_photo_images/* | ||
public/uploads/*/* | ||
themes/* | ||
config/deploy.rb |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AnsuzTestimonials | ||
=================== | ||
|
||
This plugin provides the ability to keep a database of testimonials, and display them in a theme as well as provide a resource for them |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'rake' | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
|
||
desc 'Default: run unit tests.' | ||
task :default => :test | ||
|
||
desc 'Test the ansuz_content_section plugin.' | ||
Rake::TestTask.new(:test) do |t| | ||
t.libs << 'lib' | ||
t.pattern = 'test/**/*_test.rb' | ||
t.verbose = true | ||
end | ||
|
||
desc 'Generate documentation for the ansuz_content_section plugin.' | ||
Rake::RDocTask.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'AnsuzContentSection' | ||
rdoc.options << '--line-numbers' << '--inline-source' | ||
rdoc.rdoc_files.include('README') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |
56 changes: 56 additions & 0 deletions
56
vendor/plugins/ansuz_testimonials/app/controllers/admin/testimonials_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
class Admin::TestimonialsController < Admin::BaseController | ||
unloadable # This is required if you subclass a controller provided by the base rails app | ||
|
||
layout 'admin' | ||
before_filter :load_testimonial, :only => [:show, :edit, :update] | ||
before_filter :load_new_testimonial, :only => [:new, :create] | ||
before_filter :load_testimonials, :only => [:index] | ||
|
||
protected | ||
def load_testimonial | ||
@testimonial = Ansuz::JAdams::Testimonial.find(params[:id]) | ||
end | ||
|
||
def load_new_testimonial | ||
@testimonial = Ansuz::JAdams::Testimonial.new(params[:testimonial]) | ||
end | ||
|
||
def load_testimonials | ||
@testimonials = Ansuz::JAdams::Testimonial.find(:all) | ||
end | ||
public | ||
def new | ||
end | ||
|
||
def create | ||
if @testimonial.save | ||
flash[:notice] = "Testimonial was created successfully." | ||
redirect_to admin_testimonials_path | ||
else | ||
flash.now[:error] = "There was a problem creating the testimonial." | ||
render :action => 'new' | ||
end | ||
end | ||
|
||
def show | ||
end | ||
|
||
def edit | ||
end | ||
|
||
def update | ||
if @testimonial.update_attributes(params[:testimonial]) | ||
flash[:notice] = "Testimonial has been updated." | ||
redirect_to admin_testimonials_path | ||
else | ||
flash.now[:error] = "There was a problem updating the Testimonial. Please try again." | ||
render :action => 'edit' | ||
end | ||
end | ||
|
||
def destroy | ||
@testimonial.destroy | ||
flash[:notice] = "Testimonial was deleted." | ||
redirect_to admin_testimonials_path | ||
end | ||
end |
18 changes: 18 additions & 0 deletions
18
vendor/plugins/ansuz_testimonials/app/controllers/testimonials_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class TestimonialsController < ApplicationController | ||
unloadable # This is required if you subclass a controller provided by the base rails app | ||
|
||
before_filter :load_testimonials, :only => [:index] | ||
|
||
protected | ||
def load_testimonials | ||
@testimonials = Ansuz::JAdams::Testimonial.find(:all) | ||
end | ||
|
||
public | ||
|
||
def index | ||
respond_to do |format| | ||
format.html{ render } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Ansuz | ||
class JAdams | ||
class Testimonial < ActiveRecord::Base | ||
end | ||
end | ||
end |
2 changes: 2 additions & 0 deletions
2
vendor/plugins/ansuz_testimonials/app/views/admin/testimonials/_form.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Content: <%= f.text_area(:content) -%><br /> | ||
Attributed To: <%= f.text_field(:attributed_to) -%><br /> |
8 changes: 8 additions & 0 deletions
8
vendor/plugins/ansuz_testimonials/app/views/admin/testimonials/edit.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<%= title "Edit Ansuz Theme: #{@ansuz_theme}" -%> | ||
<% content_for :sidebar do -%> | ||
<%= link_to "All Ansuz Themes", admin_ansuz_themes_path -%> | ||
<% end -%> | ||
<% form_for :ansuz_theme, :url => admin_ansuz_theme_path(@ansuz_theme), :html => { :method => :put } do |f| -%> | ||
<%= render :partial => 'form', :locals => { :f => f } -%> | ||
<%= submit_tag("Update Ansuz Theme") -%> or <%= link_to "Cancel", admin_ansuz_themes_path -%> | ||
<% end -%> |
27 changes: 27 additions & 0 deletions
27
vendor/plugins/ansuz_testimonials/app/views/admin/testimonials/index.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<%= title "Testimonials" -%> | ||
<% content_for :sidebar do -%> | ||
<%= link_to "New Testimonial", new_admin_testimonial_path -%><br /> | ||
<% end -%> | ||
<table class='subdued'> | ||
<thead> | ||
<tr> | ||
<th>Content</th> | ||
<th>Attributed To</th> | ||
<th>Actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @testimonials.each do |testimonial| -%> | ||
<tr class='<%= cycle('odd', 'even') -%>'> | ||
<td><%= testimonial.content -%></td> | ||
<td><%= link_to testimonial.attributed_to, edit_admin_testimonial_path(testimonial) -%></td> | ||
<td> | ||
<ul class='admin_actions'> | ||
<li><%= link_to "Edit", edit_admin_testimonial_path(testimonial) -%></li> | ||
<li><%= link_to "Delete", admin_testimonial_path(testimonial), :method => :delete, :confirm => "Are you sure you want to delete this testimonial?" -%></li> | ||
</ul> | ||
</td> | ||
</tr> | ||
<% end -%> | ||
</tbody> | ||
</table> |
8 changes: 8 additions & 0 deletions
8
vendor/plugins/ansuz_testimonials/app/views/admin/testimonials/new.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<%= title "New Testimonial" -%> | ||
<% content_for :sidebar do -%> | ||
<%= link_to "All Testimonials", admin_testimonials_path -%> | ||
<% end -%> | ||
<% form_for :testimonial, :url => admin_testimonials_path do |f| -%> | ||
<%= render :partial => 'form', :locals => { :f => f } -%> | ||
<%= submit_tag("Create Testimonial") -%> or <%= link_to "Cancel", admin_testimonials_path -%> | ||
<% end -%> |
4 changes: 4 additions & 0 deletions
4
vendor/plugins/ansuz_testimonials/app/views/testimonials/_testimonial.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class='testimonial'> | ||
<div class='content'><%=h testimonial.content -%></div> | ||
<div class='attributed_to'><%= testimonial.attributed_to -%></div> | ||
</div> |
2 changes: 2 additions & 0 deletions
2
vendor/plugins/ansuz_testimonials/app/views/testimonials/index.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h2>Testimonials</h2> | ||
<%= render :partial => 'testimonials/testimonial', :collection => @testimonials -%> |
13 changes: 13 additions & 0 deletions
13
vendor/plugins/ansuz_testimonials/db/migrate/001_create_testimonials.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class CreateTestimonials < ActiveRecord::Migration | ||
def self.up | ||
create_table "testimonials", :force => true do |t| | ||
t.text "content" | ||
t.string "attributed_to" | ||
t.timestamps | ||
end | ||
end | ||
|
||
def self.end | ||
drop_table "testimonials" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Include hook code here | ||
require 'testimonial' | ||
Ansuz::PluginManagerInstance.register_admin_plugin_nav('Testimonials', '/admin/testimonials') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace :admin do |admin| | ||
admin.resources :testimonials | ||
end | ||
resources :testimonials |
10 changes: 0 additions & 10 deletions
10
vendor/plugins/ansuz_theme_installer/app/models/menu_entry.rb
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
vendor/plugins/ansuz_theme_repository/app/models/menu_entry.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.