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
gem sources -a http://gems.github.com |
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
rake gems:install |
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
<%= render :partial => 'shared/paginate', :locals => {:collection => @orders, :options => generate_search_options(@filter)} unless @orders.empty? %> |
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
<!-- Code by Ilya Grigorik - http://www.igvita.com/blog/2006/09/10/faster-pagination-in-rails/ --> | |
<% if collection.page_count != collection.first_page -%> | |
<div class="pagination"> | |
<ul> | |
<% if collection.previous_page? -%> | |
<li class="nextpage"> | |
<%= link_to "« #{t('previous')}", { :p => collection.previous_page }.merge(options) %> | |
</li> | |
<% else -%> | |
<li class="disablepage">« <%= t('previous') %></li> |
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
<!-- Code by Ilya Grigorik - http://www.igvita.com/blog/2006/09/10/faster-pagination-in-rails/ --> | |
<% if collection.page_count != collection.first_page -%> | |
<div class="pagination"> | |
<ul> | |
<% if collection.previous_page? -%> | |
<li class="nextpage"> | |
<%= link_to "« #{t('previous')}", { :p => collection.previous_page }.merge(options) %> | |
</li> | |
<% else -%> | |
<li class="disablepage">« <%= t('previous') %></li> |
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
<%= page_links(:prev => "« #{t('previous')}", :next => "#{t('next')} »") if @search.page_count > 1 %> |
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
def collection | |
default_stop = (Date.today + 1).to_s(:db) | |
@filter = params.has_key?(:filter) ? OrderFilter.new(params[:filter]) : OrderFilter.new | |
scope = Order.scoped(:include => [:shipments, {:creditcards => :address}]) | |
scope = scope.by_number @filter.number unless @filter.number.blank? | |
scope = scope.by_customer @filter.customer unless @filter.customer.blank? | |
scope = scope.between(@filter.start, (@filter.stop.blank? ? default_stop : @filter.stop)) unless @filter.start.blank? | |
scope = scope.by_state @filter.state.classify.downcase.gsub(" ", "_") unless @filter.state.blank? | |
scope = scope.conditions "lower(addresses.firstname) LIKE ?", "%#{@filter.firstname.downcase}%" unless @filter.firstname.blank? |
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
def collection | |
@search = Order.new_search(params[:search]) | |
if params[:search].nil? || params[:search][:conditions].nil? | |
@search.conditions.checkout_complete = true | |
end | |
@search.order_by ||= :created_at | |
@search.order_as ||= "DESC" | |
@search.per_page = Spree::Config[:orders_per_page] |
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
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names |
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 ~/.git_completion.sh | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
OlderNewer