Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul class="action_list">
- <% if current_user.has_role?('Purchase Orders') %>
- <li><%= link_to(image_tag('icons/page_white_add.png') + _('New Order'), { :action => :new }) %></li>
- <% if @purchase_order.invoiced? && @purchase_order.invoices.count_not_paid == 0 %>
- <li><%= link_to(image_tag('icons/page_white_add.png') + _('Complete Order'), { :action => :complete, :id => @purchase_order }) %></li>
- <% end %>
- <% end %>
- <% if current_user.has_role?('Purchase Orders Authorizing') %>
- <% if @purchase_order.pending? || @purchase_order.rejected? %>
- <li><%= link_to_popup(image_tag('icons/accept.png') + _('Authorize'), :url => { :action => :authorize_popup, :id => @purchase_order }) %></li>
- <% end %>
- <% if @purchase_order.pending? %>
- <li><%= link_to_popup(image_tag('icons/delete.png') + _('Reject'), :url => { :action => :reject_popup, :id => @purchase_order }) %></li>
- <% end %>
- <% end %>
- <% if current_user.has_role?('Purchase Orders Placing') && @purchase_order.authorized? %>
- <li><%= link_to_popup(image_tag('icons/page_white_edit') + _('Place Order'), :url => { :action => :place_popup, :id => @purchase_order }) %></li>
- <% end %>
- <% if (@purchase_order.placed? || @purchase_order.invoiced? || @purchase_order.completed?) && current_user.has_role?('Purchase Orders Invoicing') %>
- <li><%= link_to_popup(image_tag('icons/contract_add.png') + _('Add Invoice'), :url => { :action => :add_invoice_popup, :id => @purchase_order }) %></li>
- <% end %>
- <li><%= link_to(image_tag('icons/page_white_acrobat.png') + _('Download PDF'), { :action => :download_pdf, :id => @purchase_order })%>
- <% unless @purchase_order.observers.include?(current_user) -%>
- <li><%= link_to(image_tag('icons/eye.png') + _('Observe'), { :action => :observe, :id => @purchase_order }) -%></li>
- <% else -%>
- <li><%= link_to(image_tag('icons/eye.png') + _('Unobserve'), { :action => :unobserve, :id => @purchase_order }) -%></li>
- <% end -%>
- <li><%= link_to_popup(image_tag('icons/attach.png') + _('Add Attachment'), :url => { :action => :add_attachment_popup, :id => @purchase_order }) %></li>
- </ul>
Add Comment
Please, Sign In to add comment