Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 675e822dc4
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (19 sloc) 1.112 kB
<h1>Depart Bike <%= link_to bike.number, bike %> </h1>
<!-- <%= render :partial=>"bike_table", :layout=>"bike_table_layout" %> -->
<% if !bike.departed? %>
<% if bike.project.nil? %>
<h3>Action required</h3>
<p>Bike <%= bike.number %> does not have a project assigned. A project assignment is required for all departing bikes.</p>
<%= form_for(project, :url => projects_path, :method => :post) do |f| %>
<%= hidden_field_tag(:bike_id, bike.id) %>
<%= label_tag(:program_id, "Depart bike as:") %>
<%= select_tag(:program_id, options_from_collection_for_select(Program.terminal, :id, :title)) %>
<%= f.submit "Assign to program", :class => "btn btn-primary" %>
<% end %>
</p>To assign this bike to a different program, go <%= link_to "to the bike information page", bike %>.</p>
<% else # if bike.project.nil? %>
<h3>Action required</h3>
<p>The project must be finished to depart this bike.</p>
<p><%= link_to "Go to the project page to finish and close out the project", bike.project %></p>
<% end # bike.project.nil? %>
<% end #bike.departed? %>
Jump to Line
Something went wrong with that request. Please try again.