// jQuery
$(document).ready(function() {
// code
})
This file contains hidden or 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
# == Schema Information | |
# | |
# Table name: deals | |
# | |
# id :integer not null, primary key | |
# company_id :integer | |
# name :text | |
# background :text | |
# currency :text | |
# value :float |
This file contains hidden or 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
<%= form_tag status_deal_path(deal), :remote => true, :class => "deals_status" do %> | |
<%= radio_button_tag :state, "won"+deal.id.to_s, deal.state == "won", :class => "toggle-btn-left toggle-btn", :value =>"won" %> | |
<%= label_tag 'state_won'+deal.id.to_s, "won", :class=>"btn" %> | |
<%= radio_button_tag :state, "lost"+deal.id.to_s, deal.state == 'lost', :class => "toggle-btn-center toggle-btn",:value => "lost" %> | |
<%= label_tag 'state_lost'+deal.id.to_s, "lost",:class=>"btn" %> | |
<%= radio_button_tag :state, "pending"+deal.id.to_s, deal.state == 'pending',:class => "toggle-btn-right toggle-btn", :value => "pending" %> | |
<%= label_tag 'state_pending'+deal.id.to_s, "pending", :class=>"btn" %> | |
<% end %> |
This file contains hidden or 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
<address> | |
<%= deal.value %><br> | |
<%= deal.background %><br> | |
</address> | |
<div class="no-radio"> | |
<div class="btn-group" data-toggle="buttons-radio"> | |
<%= form_tag status_deal_path(deal), :remote => true, :class => "deals_status" do %> | |
<%= radio_button_tag :state, "won"+deal.id.to_s, deal.state == "won", :class => "toggle-btn-left toggle-btn" %> |
This file contains hidden or 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
<address> | |
<%= deal.value %><br> | |
<%= deal.background %><br> | |
</address> | |
<div class="no-radio"> | |
<div class="btn-group" data-toggle="buttons-radio"> | |
<%= form_tag status_deal_path(deal), :remote => true, :class => "deals_status" do %> |
This file contains hidden or 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
<address> | |
<%= deal.value %><br> | |
<%= deal.background %><br> | |
</address> | |
<div class="no-radio"> | |
<div class="btn-group" data-toggle="buttons-radio"> | |
<%= form_tag status_deal_path(deal), :remote => true, :class => "deals_status" do %> | |
<%= radio_button_tag :state, "won"+deal.id.to_s, deal.state == "won", :class => "toggle-btn-left toggle-btn", :value =>"won" %> |
This file contains hidden or 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
<%= form_for [@company, @activity], :remote=> true, :validate => true do |f| %> | |
<%= f.label :title %> | |
<%= f.text_field :title, :class => "input-width bottom-border"%> | |
<%= f.label :background %> | |
<%= f.text_area :background, :class => "area-height area-width bottom-border" %> | |
<%= f.collection_select(:activity_category_id, ActivityCategory.all, :id, :activity_category) %> |
This file contains hidden or 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
<fieldset> | |
<div class="control-group"> | |
<%= f.label :place, :class => "remember control-label" %> | |
<div class="controls"> | |
<%= f.select :place, ['Work', 'Mobile', 'Other'], {}, { :class => "input-xlarge" } %> | |
</div> | |
</div> | |
<div class="control-group"> | |
<%= f.label :number, :class => "control-label" %> | |
<div class="controls"> |
This file contains hidden or 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
<%= form_for [@company, @activity], :remote=> true, :validate=>true do |f| %> | |
<%= f.label :title %> | |
<%= f.text_field :title, :class => "input-width bottom-border"%> | |
<%= f.label :activity_category_id %> | |
<%= f.collection_select(:activity_category_id, ActivityCategory.all, :id, :activity_category) %> | |
<%= f.label :background %> | |
<%= f.text_area :background, :class => "area-height area-width bottom-border" %> |
This file contains hidden or 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
@grouped = {} | |
Deal.all.each do |deal| | |
letter = deal.background.slice(0,1).upcase | |
@grouped[letter] ||= [] | |
@grouped[letter] << deal | |
end |