Change fields and views

This commit is contained in:
nasia 2017-08-28 15:24:51 +03:00
parent 30e70cc5d6
commit 819d55366c
11 changed files with 73 additions and 65 deletions

View file

@ -13,6 +13,12 @@
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the sponsor #{@sponsor.name}?" }
.col-md-12
%table.table
%tr
- if @sponsor.amount?
%td.col-md-2
%b Donation amount
%td
= @sponsor.amount
%tr
%td.col-md-2
%b Sponsorship paid?
@ -47,13 +53,13 @@
- if @sponsor.address?
%tr
%td.col-md-2
%b Company's address
%b Sponsor's address
%td
= @sponsor.address
- if @sponsor.vat?
%tr
%td.col-md-2
%b Campany's VAT Registration Number
%b Sponsor's VAT Registration Number
%td
= @sponsor.vat
%tr
@ -67,6 +73,20 @@
on_text: 'Yes',
off_text: 'No' }
- if @sponsor.has_swag
%tr
%td.col-md-2
%b Swag's Type
%td
%b Quantity
- @sponsor.swag.each do |key, value|
%tr
%td.col-md-2
= value[:type]
%td
= value[:quantity]
- if @sponsor.has_swag
%tr
%td.col-md-2
@ -78,32 +98,10 @@
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
- if @sponsor.swag_index > 0
%tr
%td.col-md-2
%b Swag's Type
%td
%b Quantity
- @sponsor.swags.each do |key, value|
%tr
%td.col-md-2
= value[:type]
%td
= value[:quantity]
%tr
%td.col-md-2
%b Swag Received?
%td
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.swag_received,
method: :patch, url: "/admin/conferences/#{@conference.short_title}/sponsors/#{@sponsor.id}?sponsor[swag_received]=",
class: 'switch-checkbox', data: { size: 'small',
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
.row
.col-md-12
%table.table
- if @sponsor.courier_index > 0
- if @sponsor.carrier_index > 0
%tr
%td.col-md-2
%b Courrier's name
@ -111,10 +109,10 @@
%b Tracking Number
%td
%b Number of boxes
- @sponsor.courier_info.each do |key, value|
- @sponsor.swag_transportation.each do |key, value|
%tr
%td.col-md-2
= value[:courier_name]
= value[:carrier_name]
%td
= value[:tracking_number]
%td