Skip to content

Instantly share code, notes, and snippets.

@beaucollins
Forked from Ravenna/gist:1562910
Created January 5, 2012 00:13
Show Gist options
  • Save beaucollins/1562987 to your computer and use it in GitHub Desktop.
Save beaucollins/1562987 to your computer and use it in GitHub Desktop.
views
<%= form_for @recommendation, :html => { :multipart => true} do |f| %>
<% if @recommendation.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@recommendation.errors.count, "error") %> prohibited this recommendation from being saved:</h2>
<ul>
<% @recommendation.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<p>* Denotes Required Field</p>
<div class="field">
<%= recommendation_nominee_label @award %>
*<br /><%= f.text_field :nominee %>
</div>
<div class="field">
<% if Award.store_award?(params[:award]) %>
Store Number Being Recommended
<% elsif params[:award] == 7 %>
Job Title/Store Number Being Recommended
<% else%>
Job Title
<% end %>*<br />
<%= f.text_field :title %>
</div>
<div class="field">
<% if Award.store_award?(params[:award]) %>
Store Manager Name
<% elsif params[:award] == 6 %>
District Name
<% elsif params[:award] == 7 %>
Associate/Store Name Being Recommended
<% else%>
Department / Store#:
<% end %>*<br />
<%= f.text_field :department %>
</div>
<div class="field">
<% if params[:award].present? %>
You are recommending this
<% if Award.store_award?(params[:award]) %>
store
<% elsif params[:award] == 7 %>
associate or store
<% else%>
associate
<% end %> %>
for the following award: <b><%= @award.name %></b>
<p><b>Award Description:</b><%= @award.info %></p>
<%= f.hidden_field( :award_id, :value => @award.id ) %>
<% else %>
You are recommending this
<% if Award.store_award?(params[:award]) %>
store
<% elsif params[:award] == 7 %>
associate or store
<% else%>
associate
<% end %>
for the following award: <b><%= @recommendation.award.name %></b><br>
<b>Award Description:</b><%= @recommendation.award.info %>
<%= f.hidden_field( :award_id ) %>
<% end %>
</div>
<div class="field">
<b>Summary *</b><br>
Please write a short overview statement about why this associate deserves to win this category (this will be used for the summary description).<br>
<%= f.text_area :summary %>
</div>
<div class="field">
<b>Accomplishments in 2011 *</b><br>
Provide concrete, tangible examples of the results achieved including, but not limited to, applicable statistics, projects completed, legendary service, and interactions with others. Please limit your write-up to 500 words. This write-up will be used by the Best of Bauer Academy to determine nominees and winners.<br />
<%= f.text_area :accomplishments %>
</div>
<div class="field">
<b>Supporting Documentation</b><br>
When you submit your recommendation online, you will also have the option of uploading supporting documentation (photos, a video, a letter of recommendation, etc,).
</div>
<div class="field">
<b>Upload a File</b><Br>
<%= f.file_field :upload %>
</div>
<div class="field">
Add a note/explanation<Br>
<%= f.text_field :caption %><br>
Share a URL:<br> <%= f.text_field :url %>
</div>
<div class="field">
<b>Select the one that matches best: *</b><br />
<%= f.select :supervisor, options_for_select([ "You ARE the nominee’s direct manager / supervisor", "You ARE NOT the nominee’s direct manager / supervisor"]), { :include_blank => true } %>
</div>
<div class="field">
Supervisor's Email:
<%= f.fields_for :approvals do |f| %>
<%= f.text_field :email %>
<% end %>
<br>If no Supervisor email is provided, recommendation will be saved without moving up the chain of approval.<br><br>
</div>
<div class="actions">
<%= f.submit "Save" %>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment