Requested Hats
<% if @hat_requests.count == 0 %>
No hat requests.
<% else %>
<% @hat_requests.each_with_index do |hr,x| %>
<% if x > 0 %>
<% end %>
<%= form_for hr, :url => approve_hat_request_url(:id => hr),
:method => :post do |f| %>
<%= f.label :hat, "Hat:", :class => "required" %>
<%= f.text_field "hat", :size => 25 %>
<%= f.label :link, "Link:", :class => "required" %>
<%= f.text_field "link", :size => 75 %>
<%= f.label :link, "Comment:", :class => "required" %>
<%= raw(h(hr.comment.to_s).gsub(/\n/, "
")) %>
<%= submit_tag "Approve Hat Request" %>
<% end %>
or
<%= form_for hr, :url => reject_hat_request_url(:id => hr),
:method => :post do |f| %>
<%= f.label :link, "Reason:", :class => "required" %>
<%= f.text_area :rejection_comment, :rows => 4 %>
<%= submit_tag "Reject Hat Request" %>
<% end %>
<% end %>
<% end %>