Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
58 additions
and
2 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 |
---|---|---|
|
@@ -23,3 +23,5 @@ pkg | |
*.gem | ||
.rvmrc | ||
.bundle | ||
|
||
views/quotes/* |
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,10 @@ | ||
desc "Create a new quote page" | ||
task :new_quote, :name do |t, args| | ||
client = args[:name] | ||
dir_name = client.gsub(' ', '-') | ||
dest = File.join("views/quotes/#{dir_name}") | ||
puts "Create quote for #{args[:name]}..." | ||
FileUtils.mkdir(dest) | ||
FileUtils.cp("template/index.html.haml", dest) | ||
puts "Ok, start quoting in #{dest}" | ||
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,18 @@ | ||
# RVM support in Rails 3 app for multiple gemsets with Passenger | ||
# config/setup_load_paths.rb | ||
|
||
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | ||
begin | ||
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | ||
rvm_lib_path = File.join(rvm_path, 'lib') | ||
$LOAD_PATH.unshift rvm_lib_path | ||
require 'rvm' | ||
RVM.use_from_path! File.dirname(File.dirname(__FILE__)) | ||
rescue LoadError | ||
# RVM is unavailable at this point. | ||
raise "RVM ruby lib is currently unavailable." | ||
end | ||
end | ||
|
||
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__)) | ||
require 'bundler/setup' |
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,26 @@ | ||
- @page_title = "" | ||
=render "/partials/calculator", :locals => {:default_unit_price => 75} | ||
.quote | ||
=render "/partials/quote_header" | ||
.spacer | ||
%p Some Description here if we want | ||
=line_item("Web Design", "Place Description here...", 5) | ||
=line_item("Web Design", "Place Description here...", "5 hrs.") | ||
=line_item("Web Design", "Place Description here...", "5h", :spacer => true, :subtotal => true) | ||
.row | ||
%h3 Option Number One | ||
%p Some Description | ||
.row | ||
.item Web Design | ||
.description | ||
%ul | ||
%li Item 1 | ||
%li Item 2 | ||
%li Item 3 | ||
.units 5hrs | ||
.unit_price | ||
.total total | ||
.spacer | ||
=render "/partials/total" | ||
|
||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module ViewHelpers | ||
def line_item(item, descr, units, options={}) | ||
render "partials/line_item", :locals => {:item => item, :descr => descr, :units => units, :unit_price => options[:unit_price], :spacer => options[:spacer], :subtotal => options[:subtotal]} | ||
render "/partials/line_item", :locals => {:item => item, :descr => descr, :units => units, :unit_price => options[:unit_price], :spacer => options[:spacer], :subtotal => options[:subtotal]} | ||
end | ||
end |