Created
May 6, 2011 12:02
-
-
Save IskanderHaziev/958825 to your computer and use it in GitHub Desktop.
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
%ul | |
- if can? :read, contract | |
%li= link_to_unless_current 'View Contract Summary', contract_url(contract), &:blank? | |
%li= link_to_unless_current 'View Full Contract', full_contract_url(contract), &:blank? | |
%li= link_to 'Download PDF', download_contract_url(contract) | |
%li= link_to 'Email PDF', '#', :class => 'mail-pdf' | |
= render 'mail_pdf_form', :contract => contract | |
%ul | |
- if can?(:edit, contract) && contract.can_revise_contract? | |
%li= link_to 'Edit Contract', edit_contract_url(contract) | |
- if can?(:offer, contract) | |
- unless contract.contract_saved? | |
%li= link_to 'Save Contract', store_contract_path(contract), :method => :put | |
- unless contract.contract_deleted? || contract.hidden_from?(shadow_or_current_user) | |
%li | |
- deletion_class = "#{contract.contract_completed? ? 'completed_' : ''}contract_deletion_link" | |
= link_to 'Delete Contract', contract_url, :method => :delete, | |
:class => deletion_class | |
%ul | |
- if can? :offer, contract | |
- if contract.contract_signing? | |
%li= link_to 'Send Signature reminder', send_reminder_contract_signatures_url(contract), :method => :post | |
- elsif contract.can_offer_contract? | |
%li= link_to 'Send Signature Request', offer_contract_signatures_url(contract), :method => :post | |
- if can?(:sign, contract) | |
%li= link_to 'Sign the Contract', '#', :class => 'accept_signing_button' | |
%li= link_to 'View and Manage Collaborators', collaboration_index_path(:contract => contract) | |
- if can?(:sign, contract) | |
- transition = contract.last_transition(:sign) | |
- if contract.contract_signing? && !transition.voted_by?(shadow_or_current_user) | |
%li | |
= link_to 'Sign contract', '#', :class => 'accept_signing_button' | |
or | |
= link_to 'Reject signing', '#', :class => 'reject_signing_button' | |
- if contract.can_cancel_contract? | |
%li= link_to "Cancel Contract", '#', :class => 'cancellation_button' | |
- if contract.contract_cancellation_pending? | |
- transition = contract.last_transition(:cancel) | |
- unless transition.voted_by?(shadow_or_current_user) | |
%li | |
Cancel contract? | |
= link_to 'Accept', accept_contract_transition_path(contract, transition), :method => :post | |
or | |
= link_to 'Reject', reject_contract_transition_path(contract, transition), :method => :post |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment