This file contains hidden or 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
- inside_layout 'marketplace_layout' do | |
%h2{:style => 'font-size:2em'} One More Step! Please Confirm Your Order. | |
.marketplace_sidebar{:style => 'width:340px'} | |
.box.shopping_cart | |
.box_shopping_cart | |
.border | |
.header | |
%h3 Your Order: | |
/ %p.right= link_to 'Manage my Assets' | |
.content |
This file contains hidden or 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
# paypal | |
def checkout_paypal | |
if cart_total == 0 | |
alert_error("Your cart is empty. If you have just placed an order, please check your email for the confirmation") | |
redirect_to :back and return | |
end | |
setup_response = express_gateway.setup_purchase(100 * in_current_currency(cart_total), | |
:ip => request.remote_ip, | |
:return_url => url_for(:action => 'confirm', :only_path => false), | |
:cancel_return_url => url_for(:controller => 'marketplace', :only_path => false), |
This file contains hidden or 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
constraints(SoftwareFilter) do | |
constraints(CategoriesFilter) do | |
match ':software/:controller/:category1/:category2/:category3/:category4/c(.:format)', :action => :index | |
match ':software/:controller/:category1/:category2/:category3/:category4/c(/:id(.:format))', :action => :show | |
match ':software/:controller/:category1/:category2/:category3/:category4/c(/:action(/:id(.:format)))' | |
match ':software/:controller/:category1/:category2/:category3/c(.:format)', :action => :index | |
match ':software/:controller/:category1/:category2/:category3/c(/:id(.:format))', :action => :show | |
match ':software/:controller/:category1/:category2/:category3/c(/:action(/:id(.:format)))' | |
match ':software/:controller/:category1/:category2/c(.:format)', :action => :index | |
match ':software/:controller/:category1/:category2/c(/:id(.:format))', :action => :show |
This file contains hidden or 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
$(function() { | |
$('a[rel=external]').click(function() { | |
$(location).attr('href',this.href); | |
}); | |
}); |
This file contains hidden or 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
## _form.html.erb ## | |
<%= link_to(image_tag(element.element_data.url(:thumb)), portfolio_add_element_path(element), :remote=>true) %> | |
## Portfolios_Controller.rb ## | |
respond_to :js, :html | |
def add_element | |
@portfolio = Portfolio.find(portfolio_id) | |
@element = Element.find(element_id) |
This file contains hidden or 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
GIT | |
remote: git://github.com/freelancing-god/thinking-sphinx.git | |
revision: 5fe4a03 | |
branch: rails3 | |
specs: | |
thinking-sphinx (2.0.0.rc1) | |
activerecord (>= 3.0.0.beta3) | |
riddle (>= 1.0.10) | |
GIT |
This file contains hidden or 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
source 'http://rubygems.org' | |
# Bundle edge Rails instead: | |
gem 'rails', :git => 'git://github.com/rails/rails.git', | |
:branch => '3-0-stable' | |
gem 'mysql' | |
gem 'riddle' | |
gem 'less' | |
#gem 'css_sprite' |
This file contains hidden or 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
<?php | |
//Show category? | |
if ($cat_link_string != ''){ | |
$output = '<p><strong>' . $cat_link_string . '</strong></p>'; | |
}else{ | |
$output = ''; | |
} | |
$output .= '<ul class="lcp_catlist">';//For default ul |
This file contains hidden or 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
var img = $(this); | |
var canvasImg = document.createElement("canvas"); | |
canvasImg.setAttribute("id", 'cx'+img.attr('data-picid')); | |
canvasImg.setAttribute("title", ''); | |
drawImageOnCanvas(img.attr('src'), canvasImg); | |
img.parent().append(canvasImg); | |
var canvasImg2 = document.createElement("canvas"); | |
canvasImg2.setAttribute("id", 'cxs'+img.attr('data-picid')); |
This file contains hidden or 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
## Controller | |
respond_to do |format| | |
format.xls do | |
filename = @search_for.gsub(';',' -') + ".xls" | |
#this is required if you want this to work with IE | |
if request.env['HTTP_USER_AGENT'] =~ /msie/i | |
headers['Pragma'] = 'public' | |
headers["Content-type"] = "text/plain" | |
headers['Cache-Control'] = 'no-cache, must-revalidate, post-check=0, pre-check=0' |