Skip to content
Browse files

The Complete Works of Shakespeare\!

  • Loading branch information...
1 parent b992747 commit b5dde6b3dca79cde99be12d4ccf8ce2774b27718 @mozz100 committed Apr 25, 2012
View
2 README.md
@@ -3,7 +3,7 @@ bardofavon
Open source Shakespeare data
-The fun starts at [admin](http://bardofavon.herokuapp.com/admin): you might need to register.
+This is the source code, a running instance can be found on [heroku](http://bardofavon.herokuapp.com/)
DBAD! Built on the hard work of others at:
View
3 app/helpers/application_helper.rb
@@ -1,2 +1,5 @@
module ApplicationHelper
+ def chapter_title(chapter)
+ ("Act #{ chapter.Act }, Scene #{ chapter.Scene } - " + link_to(chapter.Description, chapter)).html_safe
+ end
end
View
10 app/views/layouts/application.html.erb
@@ -8,7 +8,15 @@
</head>
<body>
-<%= yield %>
+<p style="float: right;">
+ <%= link_to "Admin", :rails_admin %>
+ | <%= link_to "About", :about %>
+</p>
+<p style="float: left;"><%= link_to "Complete works of Shakespeare", :root %></p>
+
+<div style="clear: both">
+ <%= yield %>
+</div>
</body>
</html>
View
1 app/views/welcome/index.html.erb
@@ -1,5 +1,4 @@
<h1>Open source Shakespeare data</h1>
-<p>The fun starts at <%= link_to "admin", :rails_admin %>: you might need to register.</p>
<p>DBAD! Built on the hard work of others at:</p>
<ul>
View
10 config/database.yml
@@ -4,10 +4,12 @@
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
- adapter: sqlite3
- database: db/development.sqlite3
- pool: 5
- timeout: 5000
+ adapter: mysql
+ encoding: utf8
+ database: shkspr
+ username: <%= ENV['DB_USER'] %>
+ password: <%= ENV['DB_PASSWORD'] %>
+ host: localhost
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
View
9 config/routes.rb
@@ -1,10 +1,11 @@
Shakespeare::Application.routes.draw do
- get "welcome/index"
-
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
-
+ match "about" => "welcome#index", :as => 'about'
devise_for :users
+ resources :works
+ resources :chapters
+
# The priority is based upon order of creation:
# first created -> highest priority.
@@ -54,7 +55,7 @@
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
- root :to => 'welcome#index'
+ root :to => 'works#index'
# See how all your routes lay out with "rake routes"

0 comments on commit b5dde6b

Please sign in to comment.
Something went wrong with that request. Please try again.