Skip to content

Instantly share code, notes, and snippets.

@IskanderHaziev
Created April 25, 2011 12:47
Show Gist options
  • Save IskanderHaziev/940462 to your computer and use it in GitHub Desktop.
Save IskanderHaziev/940462 to your computer and use it in GitHub Desktop.
.request
- if can? :manage, @contract
- if @contract.can_offer_contract?
= link_to 'Send Signature Request', offer_contract_signatures_url(@contract, tokenize), :method => :post
- elsif @contract.contract_signing?
= link_to 'send a signature reminder', send_reminder_contract_signatures_url(@contract, tokenize), :method => :post
%br
to #{@contract.signers.where("users.id !=?", current_user.id).first.name.strip}
.add
- if (@contract.last_transition(:sign) && @contract.last_transition(:sign).accepted_by.include?(current_user.id))
.signed= current_user.first_and_last_name
- elsif @contract.can_offer_contract? && can?(:manage, @contract) && can?(:sign, @contract)
= link_to 'Add your Signature', offer_contract_signatures_url(@contract, tokenize(:with_sign => 1)), :method => :post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment