Skip to content

Commit

Permalink
Annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNaessens committed Feb 9, 2015
1 parent 266694d commit 0b77a48
Show file tree
Hide file tree
Showing 19 changed files with 87 additions and 87 deletions.
4 changes: 2 additions & 2 deletions app/models/access_level.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Table name: access_levels
#
# id :integer not null, primary key
# name :string(255)
# name :string
# event_id :integer
# created_at :datetime
# updated_at :datetime
Expand Down Expand Up @@ -52,7 +52,7 @@ def name_with_price
end

def tickets_left
self.capacity - self.tickets.count if self.capacity.presence
self.capacity - self.tickets.active.count if self.capacity.presence
end

def price
Expand Down
6 changes: 3 additions & 3 deletions app/models/club.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Table name: clubs
#
# id :integer not null, primary key
# full_name :string(255)
# internal_name :string(255)
# display_name :string(255)
# full_name :string
# internal_name :string
# display_name :string
# created_at :datetime
# updated_at :datetime
#
Expand Down
16 changes: 8 additions & 8 deletions app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
# Table name: events
#
# id :integer not null, primary key
# name :string(255)
# name :string
# start_date :datetime
# end_date :datetime
# location :string(255)
# website :string(255)
# location :string
# website :string
# description :text
# created_at :datetime
# updated_at :datetime
# registration_open_date :datetime
# registration_close_date :datetime
# bank_number :string(255)
# bank_number :string
# show_ticket_count :boolean default("t")
# contact_email :string(255)
# export_file_name :string(255)
# export_content_type :string(255)
# contact_email :string
# export_file_name :string
# export_content_type :string
# export_file_size :integer
# export_updated_at :datetime
# show_statistics :boolean
# export_status :string(255)
# export_status :string
# club_id :integer
# registration_open :boolean default("t")
#
Expand Down
14 changes: 7 additions & 7 deletions app/models/partner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# Table name: partners
#
# id :integer not null, primary key
# name :string(255)
# email :string(255)
# authentication_token :string(255)
# name :string
# email :string
# authentication_token :string
# created_at :datetime
# updated_at :datetime
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# encrypted_password :string default(""), not null
# reset_password_token :string
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default("0"), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# current_sign_in_ip :string
# last_sign_in_ip :string
# event_id :integer
# access_level_id :integer
# confirmed :boolean
Expand Down
2 changes: 1 addition & 1 deletion app/models/promo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# id :integer not null, primary key
# event_id :integer
# code :string(255)
# code :string
# limit :integer
# created_at :datetime
# updated_at :datetime
Expand Down
16 changes: 8 additions & 8 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# Table name: users
#
# id :integer not null, primary key
# username :string(255) default(""), not null
# username :string default(""), not null
# remember_created_at :datetime
# sign_in_count :integer default("0"), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# current_sign_in_ip :string
# last_sign_in_ip :string
# created_at :datetime
# updated_at :datetime
# cas_givenname :string(255)
# cas_surname :string(255)
# cas_ugentStudentID :string(255)
# cas_mail :string(255)
# cas_uid :string(255)
# cas_givenname :string
# cas_surname :string
# cas_ugentStudentID :string
# cas_mail :string
# cas_uid :string
# admin :boolean
#

Expand Down
4 changes: 2 additions & 2 deletions app/views/access_levels/_access_level.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr id="<%= dom_id(access_level) %>">
<td><%= access_level.name %></td>
<td>
<%= access_level.tickets.size %>
<%= access_level.tickets.active.size %>
<span class="label label-<%= color_for_tickets_left(access_level) %> pull-right"><%= "#{pluralize(access_level.tickets_left, "ticket")} left" if access_level.capacity.presence %></span>
</td>
<td>&euro; <%= number_with_precision access_level.price || "0", precision: 2 %></td>
Expand All @@ -12,7 +12,7 @@
<td>
<div class="nowrap">
<%= link_to raw(visibility_icon(access_level)), toggle_visibility_event_access_level_path(access_level.event, access_level), class: 'btn btn-xs btn-default', remote: true %>
<% unless access_level.tickets.any? %>
<% unless access_level.tickets.active.any? %>
<%= link_to raw('<i class="glyphicon glyphicon-edit"></i> Edit'), edit_event_access_level_path(access_level.event, access_level), class: 'btn btn-xs btn-default', remote: true %>
<%= link_to raw('<i class="glyphicon glyphicon-trash"></i> Delete'), event_access_level_path(access_level.event, access_level), class: 'btn btn-xs btn-danger', data: {confirm: 'Are you sure?'}, remote: true, method: :delete %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/access_levels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Table name: access_levels
#
# id :integer not null, primary key
# name :string(255)
# name :string
# event_id :integer
# created_at :datetime
# updated_at :datetime
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/clubs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Table name: clubs
#
# id :integer not null, primary key
# full_name :string(255)
# internal_name :string(255)
# display_name :string(255)
# full_name :string
# internal_name :string
# display_name :string
# created_at :datetime
# updated_at :datetime
#
Expand Down
16 changes: 8 additions & 8 deletions test/fixtures/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
# Table name: events
#
# id :integer not null, primary key
# name :string(255)
# name :string
# start_date :datetime
# end_date :datetime
# location :string(255)
# website :string(255)
# location :string
# website :string
# description :text
# created_at :datetime
# updated_at :datetime
# registration_open_date :datetime
# registration_close_date :datetime
# bank_number :string(255)
# bank_number :string
# show_ticket_count :boolean default("t")
# contact_email :string(255)
# export_file_name :string(255)
# export_content_type :string(255)
# contact_email :string
# export_file_name :string
# export_content_type :string
# export_file_size :integer
# export_updated_at :datetime
# show_statistics :boolean
# export_status :string(255)
# export_status :string
# club_id :integer
# registration_open :boolean default("t")
#
Expand Down
14 changes: 7 additions & 7 deletions test/fixtures/partners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# Table name: partners
#
# id :integer not null, primary key
# name :string(255)
# email :string(255)
# authentication_token :string(255)
# name :string
# email :string
# authentication_token :string
# created_at :datetime
# updated_at :datetime
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# encrypted_password :string default(""), not null
# reset_password_token :string
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default("0"), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# current_sign_in_ip :string
# last_sign_in_ip :string
# event_id :integer
# access_level_id :integer
# confirmed :boolean
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/promos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# id :integer not null, primary key
# event_id :integer
# code :string(255)
# code :string
# limit :integer
# created_at :datetime
# updated_at :datetime
Expand Down
16 changes: 8 additions & 8 deletions test/fixtures/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# Table name: users
#
# id :integer not null, primary key
# username :string(255) default(""), not null
# username :string default(""), not null
# remember_created_at :datetime
# sign_in_count :integer default("0"), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# current_sign_in_ip :string
# last_sign_in_ip :string
# created_at :datetime
# updated_at :datetime
# cas_givenname :string(255)
# cas_surname :string(255)
# cas_ugentStudentID :string(255)
# cas_mail :string(255)
# cas_uid :string(255)
# cas_givenname :string
# cas_surname :string
# cas_ugentStudentID :string
# cas_mail :string
# cas_uid :string
# admin :boolean
#

Expand Down
2 changes: 1 addition & 1 deletion test/models/access_level_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Table name: access_levels
#
# id :integer not null, primary key
# name :string(255)
# name :string
# event_id :integer
# created_at :datetime
# updated_at :datetime
Expand Down
6 changes: 3 additions & 3 deletions test/models/club_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Table name: clubs
#
# id :integer not null, primary key
# full_name :string(255)
# internal_name :string(255)
# display_name :string(255)
# full_name :string
# internal_name :string
# display_name :string
# created_at :datetime
# updated_at :datetime
#
Expand Down
16 changes: 8 additions & 8 deletions test/models/event_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
# Table name: events
#
# id :integer not null, primary key
# name :string(255)
# name :string
# start_date :datetime
# end_date :datetime
# location :string(255)
# website :string(255)
# location :string
# website :string
# description :text
# created_at :datetime
# updated_at :datetime
# registration_open_date :datetime
# registration_close_date :datetime
# bank_number :string(255)
# bank_number :string
# show_ticket_count :boolean default("t")
# contact_email :string(255)
# export_file_name :string(255)
# export_content_type :string(255)
# contact_email :string
# export_file_name :string
# export_content_type :string
# export_file_size :integer
# export_updated_at :datetime
# show_statistics :boolean
# export_status :string(255)
# export_status :string
# club_id :integer
# registration_open :boolean default("t")
#
Expand Down
14 changes: 7 additions & 7 deletions test/models/partner_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# Table name: partners
#
# id :integer not null, primary key
# name :string(255)
# email :string(255)
# authentication_token :string(255)
# name :string
# email :string
# authentication_token :string
# created_at :datetime
# updated_at :datetime
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# encrypted_password :string default(""), not null
# reset_password_token :string
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default("0"), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# current_sign_in_ip :string
# last_sign_in_ip :string
# event_id :integer
# access_level_id :integer
# confirmed :boolean
Expand Down
2 changes: 1 addition & 1 deletion test/models/promo_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# id :integer not null, primary key
# event_id :integer
# code :string(255)
# code :string
# limit :integer
# created_at :datetime
# updated_at :datetime
Expand Down
16 changes: 8 additions & 8 deletions test/models/user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# Table name: users
#
# id :integer not null, primary key
# username :string(255) default(""), not null
# username :string default(""), not null
# remember_created_at :datetime
# sign_in_count :integer default("0"), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
# current_sign_in_ip :string
# last_sign_in_ip :string
# created_at :datetime
# updated_at :datetime
# cas_givenname :string(255)
# cas_surname :string(255)
# cas_ugentStudentID :string(255)
# cas_mail :string(255)
# cas_uid :string(255)
# cas_givenname :string
# cas_surname :string
# cas_ugentStudentID :string
# cas_mail :string
# cas_uid :string
# admin :boolean
#

Expand Down

0 comments on commit 0b77a48

Please sign in to comment.