artfully_ose 1.0.0.rc4 → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +661 -0
- data/app/assets/fonts/FontAwesome.otf +0 -0
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +284 -0
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/images/chosen-sprite.png +0 -0
- data/app/assets/javascripts/application.js +88 -44
- data/app/assets/javascripts/box-office.js +7 -3
- data/app/assets/javascripts/custom/grouped-form.js +1 -1
- data/app/assets/javascripts/custom/modernizr.custom.12828.js +4 -0
- data/app/assets/javascripts/custom/people.js +30 -1
- data/app/assets/javascripts/jquery-lib/chosen.jquery.js +1026 -0
- data/app/assets/javascripts/jquery-lib/jquery.jeditable.js +1 -1
- data/app/assets/javascripts/jquery-lib/jquery.mask-money.js +90 -60
- data/app/assets/javascripts/store/store.js +112 -67
- data/app/assets/stylesheets/application.sass +174 -1
- data/app/assets/stylesheets/bootstrap-overrides.css +51 -13
- data/app/assets/stylesheets/bootstrap.css +4 -379
- data/app/assets/stylesheets/font-awesome.sass +759 -0
- data/app/assets/stylesheets/jquery/chosen.scss +397 -0
- data/app/assets/stylesheets/printing.css +5 -1
- data/app/assets/stylesheets/sass/store.sass +18 -3
- data/app/concerns/itemable.rb +11 -0
- data/app/concerns/oh_noes.rb +24 -0
- data/app/controllers/actions_controller.rb +39 -20
- data/app/controllers/addresses_controller.rb +2 -2
- data/app/controllers/artfully_ose_controller.rb +15 -1
- data/app/controllers/charts_controller.rb +6 -2
- data/app/controllers/contributions_controller.rb +28 -1
- data/app/controllers/discounts_controller.rb +65 -0
- data/app/controllers/discounts_reports_controller.rb +22 -0
- data/app/controllers/events_controller.rb +48 -45
- data/app/controllers/exchanges_controller.rb +10 -10
- data/app/controllers/imports_controller.rb +38 -20
- data/app/controllers/index_controller.rb +1 -1
- data/app/controllers/memberships_controller.rb +1 -0
- data/app/controllers/merges_controller.rb +1 -1
- data/app/controllers/orders_controller.rb +6 -12
- data/app/controllers/organizations_controller.rb +0 -1
- data/app/controllers/people_controller.rb +10 -12
- data/app/controllers/refunds_controller.rb +2 -2
- data/app/controllers/returns_controller.rb +0 -1
- data/app/controllers/sales_controller.rb +9 -6
- data/app/controllers/searches_controller.rb +53 -0
- data/app/controllers/sections_controller.rb +12 -1
- data/app/controllers/segments_controller.rb +23 -10
- data/app/controllers/shows_controller.rb +37 -28
- data/app/controllers/slices_controller.rb +37 -0
- data/app/controllers/statements_controller.rb +4 -4
- data/app/controllers/store/checkouts_controller.rb +14 -12
- data/app/controllers/store/events_controller.rb +1 -1
- data/app/controllers/store/orders_controller.rb +32 -5
- data/app/controllers/store/store_controller.rb +4 -0
- data/app/controllers/venues_controller.rb +6 -2
- data/app/helpers/artfully_ose_helper.rb +31 -5
- data/app/helpers/discounts_helper.rb +3 -0
- data/app/helpers/people_helper.rb +2 -19
- data/app/mailers/order_mailer.rb +21 -3
- data/app/mailers/producer_mailer.rb +9 -1
- data/app/mailers/reports_mailer.rb +12 -0
- data/app/models/action.rb +29 -3
- data/app/models/actions/get_action.rb +4 -0
- data/app/models/actions/go_action.rb +18 -0
- data/app/models/actions/refund_action.rb +14 -0
- data/app/models/address.rb +6 -16
- data/app/models/adjustments.rb +10 -0
- data/app/models/box_office.rb +1 -1
- data/app/models/carts/cart.rb +35 -24
- data/app/models/chart.rb +16 -8
- data/app/models/checkout.rb +32 -9
- data/app/models/comp.rb +2 -8
- data/app/models/contribution.rb +111 -25
- data/app/models/daily_donation_report.rb +45 -0
- data/app/models/daily_ticket_report.rb +51 -0
- data/app/models/discount.rb +137 -0
- data/app/models/discounts/buy_one_get_one_free_discount_type.rb +20 -0
- data/app/models/discounts/discount_type.rb +66 -0
- data/app/models/discounts/dollars_off_tickets_discount_type.rb +32 -0
- data/app/models/discounts/percentage_off_tickets_discount_type.rb +25 -0
- data/app/models/discounts_report.rb +87 -0
- data/app/models/donation.rb +2 -0
- data/app/models/door_list.rb +5 -4
- data/app/models/event.rb +45 -16
- data/app/models/exchange.rb +26 -15
- data/app/models/ext/delayed_indexing.rb +24 -0
- data/app/models/ext/due.rb +7 -0
- data/app/models/ext/ext.rb +37 -0
- data/app/models/ext/integrations.rb +30 -0
- data/app/models/ext/resellable.rb +8 -1
- data/app/models/gateway_transaction.rb +47 -0
- data/app/models/import.rb +83 -101
- data/app/models/import_error.rb +1 -1
- data/app/models/import_row.rb +1 -1
- data/app/models/imports/donations_import.rb +103 -0
- data/app/models/imports/events_import.rb +207 -0
- data/app/models/imports/people_import.rb +41 -0
- data/app/models/imports/processing.rb +53 -0
- data/app/models/imports/rollback.rb +11 -0
- data/app/models/imports/status.rb +48 -0
- data/app/models/imports/validations.rb +31 -0
- data/app/models/item.rb +112 -29
- data/app/models/job/action_job.rb +29 -0
- data/app/models/job/daily_email_report_job.rb +11 -0
- data/app/models/job/tag_job.rb +15 -0
- data/app/models/kit.rb +14 -6
- data/app/models/kits/mailchimp_kit.rb +448 -0
- data/app/models/kits/reseller_kit.rb +2 -2
- data/app/models/kits/sponsored_donation_kit.rb +2 -2
- data/app/models/orders/application_order.rb +3 -1
- data/app/models/orders/comp_order.rb +15 -2
- data/app/models/orders/exchange_order.rb +8 -0
- data/app/models/orders/imported_order.rb +7 -0
- data/app/models/orders/order.rb +164 -51
- data/app/models/orders/refund_order.rb +14 -1
- data/app/models/orders/unrefundable.rb +5 -0
- data/app/models/orders/web_order.rb +1 -1
- data/app/models/organization.rb +38 -7
- data/app/models/parsed_row.rb +167 -0
- data/app/models/payments/comp_payment.rb +10 -1
- data/app/models/payments/credit_card_payment.rb +63 -10
- data/app/models/payments/payment.rb +28 -0
- data/app/models/person.rb +115 -43
- data/app/models/refund.rb +28 -28
- data/app/models/return.rb +2 -0
- data/app/models/sale.rb +8 -5
- data/app/models/search.rb +117 -0
- data/app/models/section.rb +18 -0
- data/app/models/segment.rb +14 -4
- data/app/models/show.rb +14 -4
- data/app/models/slices.rb +82 -0
- data/app/models/statement.rb +170 -3
- data/app/models/temp_discount.rb +14 -0
- data/app/models/ticket.rb +42 -134
- data/app/models/ticket/pricing.rb +45 -0
- data/app/models/ticket/reports.rb +10 -7
- data/app/models/ticket/sale_transitions.rb +44 -0
- data/app/models/ticket/transfers.rb +50 -0
- data/app/models/user.rb +10 -2
- data/app/models/valuation/lifetime_donations.rb +35 -0
- data/app/models/venue.rb +12 -1
- data/app/presenters/event_presenter.rb +41 -0
- data/app/views/actions/_list.html.haml +1 -2
- data/app/views/actions/new.html.haml +1 -1
- data/app/views/contributions/_form.html.haml +40 -0
- data/app/views/contributions/_sidebar.html.haml +12 -0
- data/app/views/contributions/edit.html.haml +11 -0
- data/app/views/contributions/index.html.haml +2 -2
- data/app/views/contributions/new.html.haml +5 -35
- data/app/views/discounts/_discount_section_fields.html.haml +25 -0
- data/app/views/discounts/_form.html.haml +95 -0
- data/app/views/discounts/edit.html.haml +16 -0
- data/app/views/discounts/index.html.haml +33 -0
- data/app/views/discounts/new.html.haml +16 -0
- data/app/views/discounts_reports/index.html.haml +76 -0
- data/app/views/events/_discount_section_fields.html.haml +25 -0
- data/app/views/events/_glance.html.haml +4 -1
- data/app/views/events/_list.html.haml +2 -4
- data/app/views/events/_menu.html.haml +3 -3
- data/app/views/events/_section_fields.html.haml +32 -15
- data/app/views/events/_share_and_sell.haml +2 -1
- data/app/views/events/edit.html.haml +7 -6
- data/app/views/events/image.html.haml +1 -0
- data/app/views/events/index.html.haml +3 -1
- data/app/views/events/messages.html.haml +1 -0
- data/app/views/events/prices.html.haml +2 -1
- data/app/views/events/resell.html.haml +1 -1
- data/app/views/events/show.html.haml +25 -1
- data/app/views/events/storefront_link.html.haml +1 -1
- data/app/views/events/temp_discount_form.html.haml +108 -0
- data/app/views/events/temp_discounts_index.html.haml +38 -0
- data/app/views/events/widget.html.haml +14 -1
- data/app/views/exchanges/new.html.haml +50 -73
- data/app/views/imports/{_imported.html.haml → donations/_approved.html.haml} +2 -5
- data/app/views/imports/donations/_caching.html.haml +17 -0
- data/app/views/imports/donations/_failed.html.haml +5 -0
- data/app/views/imports/donations/_imported.html.haml +9 -0
- data/app/views/imports/donations/_importing.html.haml +12 -0
- data/app/views/imports/donations/_invalid.html.haml +5 -0
- data/app/views/imports/donations/_new.html.haml +99 -0
- data/app/views/imports/donations/_pending.html.haml +41 -0
- data/app/views/imports/events/_approved.html.haml +10 -0
- data/app/views/imports/events/_caching.html.haml +17 -0
- data/app/views/imports/events/_failed.html.haml +5 -0
- data/app/views/imports/events/_imported.html.haml +9 -0
- data/app/views/imports/events/_importing.html.haml +12 -0
- data/app/views/imports/events/_invalid.html.haml +5 -0
- data/app/views/imports/events/_new.html.haml +95 -0
- data/app/views/imports/events/_pending.html.haml +35 -0
- data/app/views/imports/index.html.haml +41 -18
- data/app/views/imports/new.html.haml +1 -93
- data/app/views/imports/{_approved.html.haml → people/_approved.html.haml} +0 -1
- data/app/views/imports/{_caching.html.haml → people/_caching.html.haml} +0 -0
- data/app/views/imports/people/_failed.html.haml +5 -0
- data/app/views/imports/people/_imported.html.haml +25 -0
- data/app/views/imports/{_importing.html.haml → people/_importing.html.haml} +1 -2
- data/app/views/imports/people/_invalid.html.haml +5 -0
- data/app/views/imports/people/_new.html.haml +120 -0
- data/app/views/imports/people/_pending.html.haml +39 -0
- data/app/views/imports/shared/_date_format.html.haml +14 -0
- data/app/views/imports/shared/_failed.html.haml +18 -0
- data/app/views/imports/shared/_inspect_modal.html.haml +11 -0
- data/app/views/imports/shared/_invalid.html.haml +18 -0
- data/app/views/imports/shared/_knowledge_base.haml +2 -0
- data/app/views/imports/shared/_sidebar.html.haml +5 -0
- data/app/views/imports/show.html.haml +2 -2
- data/app/views/index/dashboard.html.haml +4 -2
- data/app/views/layouts/_custom_css_includes.haml +0 -0
- data/app/views/layouts/_custom_js_includes.haml +0 -0
- data/app/views/layouts/_google_analytics.html.haml +3 -3
- data/app/views/layouts/_menu.html.haml +6 -2
- data/app/views/layouts/application.html.haml +4 -0
- data/app/views/layouts/{devise.html.haml → devise_layout.html.haml} +0 -0
- data/app/views/order_mailer/confirmation_for.html.haml +3 -2
- data/app/views/order_mailer/confirmation_for.text.haml +3 -2
- data/app/views/orders/_grouped_form_help.haml +4 -0
- data/app/views/orders/_item_table.haml +15 -4
- data/app/views/orders/_order_sidebar.html.haml +27 -6
- data/app/views/orders/index.html.haml +1 -12
- data/app/views/orders/show.html.haml +1 -1
- data/app/views/organizations/_form.html.haml +20 -6
- data/app/views/organizations/edit.html.haml +2 -1
- data/app/views/organizations/new.html.haml +1 -0
- data/app/views/organizations/show.html.haml +7 -1
- data/app/views/people/_form.html.haml +5 -2
- data/app/views/people/_key_relationships.html.haml +1 -1
- data/app/views/people/_list.html.haml +1 -12
- data/app/views/people/_person_summary_sidebar.html.haml +82 -50
- data/app/views/people/_relationship_table_row.html.haml +1 -1
- data/app/views/people/edit.html.haml +3 -1
- data/app/views/people/index.html.haml +7 -1
- data/app/views/people/new.html.haml +2 -0
- data/app/views/people/show.html.haml +2 -0
- data/app/views/refunds/new.html.haml +4 -6
- data/app/views/reports_mailer/daily.html.haml +67 -0
- data/app/views/reports_mailer/daily.text.erb +16 -0
- data/app/views/sales/new.html.haml +5 -20
- data/app/views/searches/_form.html.haml +43 -0
- data/app/views/searches/_person.html.haml +7 -0
- data/app/views/searches/new.html.haml +10 -0
- data/app/views/searches/show.html.haml +64 -0
- data/app/views/sections/edit.html.haml +12 -0
- data/app/views/segments/index.html.haml +8 -4
- data/app/views/segments/show.html.haml +39 -5
- data/app/views/shared/_door_list_table.haml +24 -0
- data/app/views/shared/_event_image_icon.html.haml +1 -1
- data/app/views/shared/_preload_assets.html.haml +2 -0
- data/app/views/shared/_tags.html.haml +3 -2
- data/app/views/shows/_glance.html.haml +8 -2
- data/app/views/shows/_ticket_table.html.haml +17 -10
- data/app/views/shows/_upcoming.html.haml +1 -1
- data/app/views/shows/door_list.html.haml +2 -24
- data/app/views/shows/index.html.haml +3 -3
- data/app/views/shows/new.html.haml +2 -2
- data/app/views/shows/show.html.haml +1 -1
- data/app/views/slices/_data.json +50 -0
- data/app/views/slices/index.html.haml +58 -0
- data/app/views/statements/_discounts_table.html.haml +26 -0
- data/app/views/statements/_order_location_table.html.haml +20 -0
- data/app/views/statements/_payment_method_table.haml +20 -0
- data/app/views/statements/{_played_shows.html.haml → _shows.html.haml} +3 -3
- data/app/views/statements/_ticket_type_table.haml +20 -0
- data/app/views/statements/_top_stats.haml +12 -0
- data/app/views/statements/show.html.haml +24 -32
- data/app/views/store/events/_show.html.haml +11 -5
- data/app/views/store/events/show.html.haml +24 -5
- data/app/views/users/registrations/edit.html.erb +1 -1
- data/app/views/venues/edit.html.haml +1 -0
- data/config/artfully.yml.sample +3 -0
- data/config/initializers/active_model_serializer.rb +3 -0
- data/config/initializers/braintree_error_mapping.rb +5 -0
- data/config/initializers/devise.rb +1 -1
- data/config/locales/en.yml +1 -0
- data/config/routes.rb +31 -8
- data/db/migrate/0000_set_up_artfully.rb +9 -11
- data/db/migrate/20120809212802_add_do_not_email_to_people.rb +5 -0
- data/db/migrate/20120831200120_create_advanced_search.rb +30 -0
- data/db/migrate/20120926201927_add_email_to_organization.rb +5 -0
- data/db/migrate/20121001143351_add_import_id_orders_events.rb +6 -0
- data/db/migrate/20121006024736_add_import_to_actions.rb +5 -0
- data/db/migrate/20121011180654_add_type_to_imports.rb +14 -0
- data/db/migrate/20121024143846_create_discounts.rb +15 -0
- data/db/migrate/20121026131454_deleted_at_to_orders_items_actions.rb +7 -0
- data/db/migrate/20121026203948_add_initial_price_to_tickets.rb +5 -0
- data/db/migrate/20121029183949_change_initial_price_to_cart_price.rb +5 -0
- data/db/migrate/20121113144826_migrate_donation_types.rb +41 -0
- data/db/migrate/20121115020441_add_salutation_to_people.rb +5 -0
- data/db/migrate/20121130004314_add_visibility_to_sections.rb +6 -0
- data/db/migrate/20121205184343_add_discount_to_ticket.rb +6 -0
- data/db/migrate/20121206212835_add_discount_to_carts_and_items.rb +7 -0
- data/db/migrate/20121211193728_add_deleted_at_to_discounts.rb +5 -0
- data/db/migrate/20121212022026_add_uuid_to_show_and_event.rb +9 -0
- data/db/migrate/20121212023203_set_uuids.rb +11 -0
- data/db/migrate/20121217201422_add_minimum_ticket_count_to_discounts.rb +5 -0
- data/db/migrate/20121221154152_add_shows_and_sections_to_discounts.rb +5 -0
- data/db/migrate/20130103153946_make_shows_and_sections_habtm.rb +19 -0
- data/db/migrate/20130108213102_add_original_price_to_items.rb +10 -0
- data/db/migrate/20130111211929_convert_discounts_sections_to_array_of_strings.rb +14 -0
- data/db/migrate/20130114200128_add_discount_code_to_search.rb +5 -0
- data/db/migrate/20130114212408_add_limit_to_discounts.rb +5 -0
- data/db/migrate/20130116203331_add_title_to_person.rb +5 -0
- data/db/migrate/20130122143845_install_audited.rb +28 -0
- data/db/migrate/20130131024955_add_gateway_transactions.rb +13 -0
- data/db/migrate/20130301144159_add_receive_daily_sales_report_boolean_to_organizations.rb +5 -0
- data/db/migrate/20130306213416_add_subscribed_lists_to_people.rb +5 -0
- data/db/migrate/20130308193328_people_arent_dummies.rb +6 -0
- data/db/migrate/20130312173340_add_categories_to_events.rb +6 -0
- data/db/migrate/20130319110520_add_transaction_id_index.rb +6 -0
- data/db/migrate/20130320192827_add_index_to_notes.rb +8 -0
- data/db/migrate/20130324173939_add_index_to_import_rows.rb +5 -0
- data/db/migrate/20130325190110_add_indexes_to_actions.rb +9 -0
- data/db/migrate/20130326173653_add_lifetime_donations_to_people_and_searches.rb +9 -0
- data/lib/artfully_ose.rb +5 -1
- data/lib/artfully_ose/common_abilities.rb +6 -9
- data/lib/artfully_ose/engine.rb +19 -5
- data/lib/artfully_ose/version.rb +1 -1
- data/lib/email_validator.rb +6 -0
- metadata +442 -138
- data/MIT-LICENSE +0 -20
- data/app/controllers/pages_controller.rb +0 -29
- data/app/models/import_person.rb +0 -78
- data/app/views/imports/_failed.html.haml +0 -20
- data/app/views/imports/_pending.html.haml +0 -35
- data/app/views/index/splash.html.erb +0 -160
- data/app/views/segments/new.html.haml +0 -20
@@ -0,0 +1,95 @@
|
|
1
|
+
%fieldset
|
2
|
+
%legend Discount
|
3
|
+
.control-group
|
4
|
+
= f.label :code, "Discount Code", :class => 'control-label'
|
5
|
+
.controls
|
6
|
+
= f.text_field :code, :class => 'input'
|
7
|
+
%p.help-block 4-15 characters, not case sensitive
|
8
|
+
|
9
|
+
.control-group
|
10
|
+
.controls
|
11
|
+
%label.checkbox
|
12
|
+
= f.check_box :active
|
13
|
+
Discount is active and can be used now.
|
14
|
+
|
15
|
+
%fieldset
|
16
|
+
.control-group
|
17
|
+
= f.label :show_ids, "Shows", :class => 'control-label'
|
18
|
+
.controls
|
19
|
+
= f.select :show_ids, options_for_select(@event.shows.collect {|s| [l(s.datetime_local_to_event, :format => :day_time), s.id] }, @discount.show_ids), {}, {'data-placeholder' => "All Shows", :class => 'input chosen', :multiple => true}
|
20
|
+
.control-group
|
21
|
+
= f.label :sections, "Ticket Types", :class => 'control-label'
|
22
|
+
.controls
|
23
|
+
= f.select :sections, options_for_select(@section_names, @discount.sections.to_a), {}, {'data-placeholder' => "All Prices", :class => 'input chosen', :multiple => true}
|
24
|
+
|
25
|
+
%fieldset
|
26
|
+
.control-group
|
27
|
+
= f.label :promotion_type, "Promotion Type", :class => 'control-label'
|
28
|
+
.controls
|
29
|
+
%label.radio
|
30
|
+
= f.radio_button :promotion_type, 'DollarsOffTickets', :class => 'promotion-type-radio'
|
31
|
+
X dollars off each ticket
|
32
|
+
%label.radio
|
33
|
+
= f.radio_button :promotion_type, 'BuyOneGetOneFree', :class => 'promotion-type-radio'
|
34
|
+
Buy one get one free
|
35
|
+
|
36
|
+
%fieldset
|
37
|
+
= f.fields_for :properties, discount.properties do |p|
|
38
|
+
.control-group.promotion-type-properties#DollarsOffTickets{:style => "display: none;"}
|
39
|
+
= p.label :amount, "Amount off each ticket", :class => 'control-label'
|
40
|
+
.controls
|
41
|
+
= p.text_field :amount, :class => 'input-small section-price currency', :value => discount.properties[:amount]
|
42
|
+
|
43
|
+
.control-group.promotion-type-properties#BuyOneGetOneFree
|
44
|
+
|
45
|
+
%fieldset
|
46
|
+
.control-group
|
47
|
+
= f.label :minimum_ticket_count, "Minimum purchase of", :class => 'control-label'
|
48
|
+
.controls
|
49
|
+
= f.text_field :minimum_ticket_count, :class => 'input input-mini', :placeholder => "1"
|
50
|
+
tickets.
|
51
|
+
|
52
|
+
%fieldset
|
53
|
+
%legend Inventory
|
54
|
+
.control-group
|
55
|
+
.controls
|
56
|
+
.radio
|
57
|
+
= radio_button_tag "unlimited_capacity", true, @discount.limit.blank? || @discount.limit == 0
|
58
|
+
Unlimited discounted tickets per event.
|
59
|
+
.radio
|
60
|
+
= radio_button_tag "unlimited_capacity", false, @discount.limit.present?
|
61
|
+
Only
|
62
|
+
= f.text_field :limit, :class => 'span1', :placeholder => 10
|
63
|
+
tickets can be sold with this discount per event.
|
64
|
+
|
65
|
+
- content_for :custom_js do
|
66
|
+
= stylesheet_link_tag 'jquery/chosen'
|
67
|
+
= javascript_include_tag 'jquery-lib/chosen.jquery'
|
68
|
+
|
69
|
+
:javascript
|
70
|
+
var show_appropriate_properties = function() {
|
71
|
+
touchCurrency();
|
72
|
+
var promotion_type = $('.promotion-type-radio:checked').attr('value');
|
73
|
+
$('.promotion-type-properties').hide();
|
74
|
+
$('.control-group#' + promotion_type).show();
|
75
|
+
};
|
76
|
+
|
77
|
+
$(document).ready(function() {
|
78
|
+
$('.promotion-type-radio').click(function() {
|
79
|
+
show_appropriate_properties();
|
80
|
+
});
|
81
|
+
show_appropriate_properties();
|
82
|
+
|
83
|
+
$('#unlimited_capacity_true').click(function() {
|
84
|
+
$('#discount_limit').val('');
|
85
|
+
});
|
86
|
+
|
87
|
+
$('#discount_limit').focus(function() {
|
88
|
+
$('#unlimited_capacity_false').attr('checked', 'checked');
|
89
|
+
});
|
90
|
+
|
91
|
+
$('#discount_code').focus();
|
92
|
+
|
93
|
+
// use the fancy multi-select
|
94
|
+
$('.chosen').chosen();
|
95
|
+
});
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- in_section :events
|
2
|
+
- content_for :header do
|
3
|
+
= render :partial => 'events/header'
|
4
|
+
|
5
|
+
.row
|
6
|
+
.span3
|
7
|
+
- in_sub_section :share
|
8
|
+
= render :partial => 'events/menu'
|
9
|
+
.span9
|
10
|
+
= render "shared/error_messages", :target => @discount
|
11
|
+
|
12
|
+
= form_for( [@event, @discount], :html => { :class => 'form-horizontal' }) do |f|
|
13
|
+
= render :partial => "form", :locals => {:f => f, :discount => @discount}
|
14
|
+
|
15
|
+
.form-actions
|
16
|
+
= f.submit "Save".html_safe, :class => 'btn btn-primary'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
- in_section :events
|
2
|
+
- content_for :header do
|
3
|
+
= render :partial => 'events/header'
|
4
|
+
|
5
|
+
.row
|
6
|
+
.span3
|
7
|
+
- in_sub_section :share
|
8
|
+
= render :partial => 'events/menu'
|
9
|
+
.span9
|
10
|
+
= render "shared/error_messages", :target => @event
|
11
|
+
.row-fluid
|
12
|
+
.span3
|
13
|
+
%h3 Discounts
|
14
|
+
.span9
|
15
|
+
=icon_link_to("Add", new_event_discount_path(@event), 'icon-plus-sign', 'btn', '')
|
16
|
+
%table.table
|
17
|
+
%thead
|
18
|
+
%th Code
|
19
|
+
%th Status
|
20
|
+
%th Discount
|
21
|
+
%th Redeemed
|
22
|
+
%th
|
23
|
+
%tbody
|
24
|
+
- @discounts.each do |discount|
|
25
|
+
%tr
|
26
|
+
%td= link_to discount.code, edit_event_discount_path(@event, discount)
|
27
|
+
%td= discount.active? ? "Active" : "Inactive"
|
28
|
+
%td= discount
|
29
|
+
%td= discount.redeemed
|
30
|
+
- if discount.destroyable?
|
31
|
+
%td= link_to "Delete", event_discount_path(@event, discount), method: :delete, confirm: "Are you sure you want to delete this discount?", class: "btn btn-mini btn-danger"
|
32
|
+
- else
|
33
|
+
%td= link_to "Delete", "#", class: "btn btn-mini btn-danger disabled"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- in_section :events
|
2
|
+
- content_for :header do
|
3
|
+
= render :partial => 'events/header'
|
4
|
+
|
5
|
+
.row
|
6
|
+
.span3
|
7
|
+
- in_sub_section :share
|
8
|
+
= render :partial => 'events/menu'
|
9
|
+
.span9
|
10
|
+
= render "shared/error_messages", :target => @discount
|
11
|
+
|
12
|
+
= form_for( [@event, @discount], :html => { :class => 'form-horizontal' }) do |f|
|
13
|
+
= render :partial => "form", :locals => {:f => f, :discount => @discount}
|
14
|
+
|
15
|
+
.form-actions
|
16
|
+
= f.submit "Save".html_safe, :class => 'btn btn-primary'
|
@@ -0,0 +1,76 @@
|
|
1
|
+
-content_for :header do
|
2
|
+
%h1 Discounts
|
3
|
+
|
4
|
+
= form_tag discounts_reports_path, :method => :get, :class => 'well form-inline' do
|
5
|
+
= label_tag :code, "Code", :class => "control-label"
|
6
|
+
= select_tag :code, options_for_select(@codes << Discount::ALL_DISCOUNTS_STRING, @report.try(:discount_code))
|
7
|
+
|
8
|
+
= label_tag :start_date, "From", :class => "control-label"
|
9
|
+
= text_field_tag :start_date, @start_date, :readonly => true, :class => 'datepicker input-small'
|
10
|
+
|
11
|
+
= label_tag :end_date, "To", :class => "control-label"
|
12
|
+
= text_field_tag :end_date, @end_date, :readonly => true, :class => 'datepicker input-small'
|
13
|
+
|
14
|
+
.pull-right
|
15
|
+
= submit_tag "Search", :class => "btn"
|
16
|
+
|
17
|
+
- unless @report.nil?
|
18
|
+
|
19
|
+
.row-fluid.botton-room
|
20
|
+
.span9
|
21
|
+
%h3=@report.header
|
22
|
+
.span3
|
23
|
+
.pull-right
|
24
|
+
=link_to "Download CSV", discounts_reports_path(code: @report.discount_code, start_date: @report.start_date, end_date: @report.end_date, format: "csv"), :class => "btn"
|
25
|
+
|
26
|
+
#statement-summary.bottom-room.well
|
27
|
+
.row-fluid
|
28
|
+
.span3
|
29
|
+
.center.headline-stat
|
30
|
+
=@report.tickets_sold
|
31
|
+
.center.headline-caption
|
32
|
+
%h6 TICKETS SOLD
|
33
|
+
.span3
|
34
|
+
.center.headline-stat
|
35
|
+
=number_as_cents @report.original_price
|
36
|
+
.center.headline-caption
|
37
|
+
%h6 ORIGINAL PRICE
|
38
|
+
.span3
|
39
|
+
.center.headline-stat
|
40
|
+
=number_as_cents @report.discounted
|
41
|
+
.center.headline-caption
|
42
|
+
%h6 DISCOUNTED
|
43
|
+
.span3
|
44
|
+
.center.headline-stat
|
45
|
+
=number_as_cents @report.gross
|
46
|
+
.center.headline-caption
|
47
|
+
%h6 GROSS
|
48
|
+
|
49
|
+
.row
|
50
|
+
.span12
|
51
|
+
%table.table.zebra#order-table
|
52
|
+
%thead
|
53
|
+
%tr
|
54
|
+
%th{:style=>'width:40px'} Code
|
55
|
+
%th{:style=>'width:40px'} Order
|
56
|
+
%th Date
|
57
|
+
%th Person
|
58
|
+
%th Event
|
59
|
+
%th Tickets
|
60
|
+
%th.right Orig. Price
|
61
|
+
%th.right Discounted
|
62
|
+
%th.right Gross
|
63
|
+
%tbody
|
64
|
+
-@rows.each do |row|
|
65
|
+
%tr
|
66
|
+
%td=row.discount_code
|
67
|
+
%td=link_to row.order.id, order_path(row.order)
|
68
|
+
%td=l row.order.created_at, :format => :slashed_date
|
69
|
+
%td=link_to row.order.person, person_path(row.order.person)
|
70
|
+
%td=link_to row.show.event.name, event_path(row.show.event)
|
71
|
+
%td=row.ticket_count
|
72
|
+
%td.right=number_as_cents row.original_price
|
73
|
+
%td.right=number_as_cents row.discounted
|
74
|
+
%td.right=number_as_cents row.gross
|
75
|
+
|
76
|
+
= will_paginate(@rows)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
.fields.section-fields.discount-tickets
|
2
|
+
.control-group
|
3
|
+
=f.label :section_id, "Ticket Type", :class => 'control-label'
|
4
|
+
.controls
|
5
|
+
:ruby
|
6
|
+
# this should probably go in a helper
|
7
|
+
sections = @event.charts.collect(&:sections).flatten.uniq
|
8
|
+
sections_options = sections.map {|s| content_tag('option', s.name, {:value => s.id.to_s, 'data-price' => (s.price / 100.0)}) }
|
9
|
+
|
10
|
+
= f.select :section_id, sections_options.join('').html_safe, {}, :class => 'section-select'
|
11
|
+
|
12
|
+
- show_remove_links = true if show_remove_links.nil?
|
13
|
+
- if show_remove_links
|
14
|
+
%span.remove-fields-link
|
15
|
+
= f.hidden_field :_destroy
|
16
|
+
%i.icon-minus-sign.icon-gray
|
17
|
+
= link_to_remove_fields "remove Ticket Type", f
|
18
|
+
|
19
|
+
.control-group.custom-discount-price{:style => 'display:none;'}
|
20
|
+
=f.label :price, "Discounted price", :class => 'control-label'
|
21
|
+
.controls
|
22
|
+
.input-prepend
|
23
|
+
%span.add-on $
|
24
|
+
=f.text_field :price, :placeholder => '0.00', :class => 'input-small section-price'#, :value => number_as_cents(f.object.price, :format => "%n")
|
25
|
+
(regularly <span class="regular-price">#{number_to_currency(sections.first.price)}</span>)
|
@@ -1,12 +1,10 @@
|
|
1
|
-
-
|
2
|
-
= link_to "Create an Event", new_event_path, :class => 'btn'
|
3
|
-
- else
|
1
|
+
- unless events.blank?
|
4
2
|
%ul#event-list.row-fluid
|
5
3
|
- events.each do |event|
|
6
4
|
%li.span6.row-fluid.event-list-item{:style => "margin-left: 0px; margin-right:10px'"}
|
7
5
|
.span12
|
8
6
|
.row-fluid
|
9
|
-
.span4
|
7
|
+
.span4.event-icon-container
|
10
8
|
= render :partial => 'shared/event_image_icon', :locals => { :event => event }
|
11
9
|
.span8
|
12
10
|
%h4= link_to event.name, event_path(event), :title => 'event-name'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.nav.nav-accordian
|
2
|
-
= active_link_to 'Overview', event_path(@event)
|
2
|
+
= active_link_to 'Event Overview', event_path(@event)
|
3
3
|
%li.accordian{:class => active?(:details)}
|
4
|
-
= link_to 'Details', edit_event_path(@event)
|
4
|
+
= link_to 'Event Details', edit_event_path(@event)
|
5
5
|
%ul.accordian-menu
|
6
6
|
= active_link_to 'About', edit_event_path(@event)
|
7
7
|
= active_link_to 'Venue', edit_event_venue_path(@event)
|
@@ -9,7 +9,7 @@
|
|
9
9
|
= active_link_to 'Image', image_event_path(@event)
|
10
10
|
= active_link_to 'Messages', messages_event_path(@event)
|
11
11
|
%li.accordian{:class => active?(:shows)}
|
12
|
-
= link_to 'Shows', event_shows_path(@event)
|
12
|
+
= link_to 'Shows List', event_shows_path(@event)
|
13
13
|
%ul.accordian-menu
|
14
14
|
%li.add
|
15
15
|
%a{:href => new_event_show_path(@event)}
|
@@ -2,32 +2,49 @@
|
|
2
2
|
.control-group
|
3
3
|
=f.label :name, "Name", :class => 'control-label'
|
4
4
|
.controls
|
5
|
-
=f.text_field :name
|
5
|
+
=f.text_field :name
|
6
6
|
|
7
7
|
.control-group
|
8
8
|
=f.label :description, "Description", :class => 'control-label'
|
9
9
|
.controls
|
10
10
|
=f.text_area :description, :size => '10x5'
|
11
|
+
-no_editing = false if no_editing.nil?
|
12
|
+
- unless no_editing
|
13
|
+
.control-group
|
14
|
+
=f.label :price, "Price", :class => 'control-label'
|
15
|
+
.controls
|
16
|
+
.input-prepend
|
17
|
+
%span.add-on $
|
18
|
+
- if can? :create, :paid_events
|
19
|
+
=f.text_field :price, :placeholder => '0.00', :class => 'input-small section-price', :value => number_as_cents(f.object.price, :format => "%n")
|
20
|
+
- else
|
21
|
+
%span.section-price-disabled{'data-toggle' => "modal", 'data-target' => "#request-paid-ticket-kit"}
|
22
|
+
=f.text_field :price, :placeholder => '0.00', :class => 'input-small disabled section-price-disabled', :value => number_as_cents(f.object.price, :format => "%n"), :disabled => 'disabled'
|
23
|
+
%p
|
24
|
+
%a{:href=>"#"} Paid Ticketing Kit not enabled.
|
11
25
|
|
12
|
-
.control-group
|
13
|
-
=f.label :price, "Price", :class => 'control-label'
|
14
|
-
.controls
|
15
|
-
.input-prepend
|
16
|
-
%span.add-on $
|
17
|
-
- if can? :create, :paid_events
|
18
|
-
=f.text_field :price, :placeholder => '0.00', :class => 'input-small section-price', :value => number_as_cents(f.object.price, :format => "%n")
|
19
|
-
- else
|
20
|
-
%span.section-price-disabled{'data-content' => "#{link_to "Enable paid ticketing", organization_path(current_user.current_organization)} to set prices on your events".html_safe}
|
21
|
-
=f.text_field :price, :placeholder => '0.00', :class => 'input-small section-price-disabled disabled', :value => number_as_cents(f.object.price, :format => "%n"), :disabled => 'disabled'
|
22
26
|
|
27
|
+
.control-group
|
28
|
+
=f.label :capacity, "Capacity", :class => 'control-label'
|
29
|
+
.controls
|
30
|
+
=f.text_field :capacity, :class => 'span1', :disabled => no_editing
|
31
|
+
|
32
|
+
.control-group
|
33
|
+
=f.label :availablity, "Availablity", :class => 'control-label'
|
34
|
+
|
35
|
+
- Section.new.channels.each do |channel, icon|
|
36
|
+
.controls
|
37
|
+
=f.check_box channel
|
38
|
+
=channel_checkbox channel
|
39
|
+
|
23
40
|
.control-group
|
24
|
-
=f.label :capacity, "Capacity", :class => 'control-label'
|
25
41
|
.controls
|
26
|
-
=f.text_field :capacity, :class => 'span1'
|
27
|
-
|
28
42
|
- show_remove_links = true if show_remove_links.nil?
|
29
43
|
- if show_remove_links
|
30
44
|
%span.remove-fields-link
|
31
45
|
= f.hidden_field :_destroy
|
32
46
|
%i.icon-minus-sign.icon-gray
|
33
|
-
= link_to_remove_fields "remove", f
|
47
|
+
= link_to_remove_fields "remove", f
|
48
|
+
|
49
|
+
:javascript
|
50
|
+
$('.help').popover()
|
@@ -1,4 +1,5 @@
|
|
1
1
|
%li.accordian{:class => active?(:share)}
|
2
2
|
= link_to 'Share & Sell', storefront_link_event_path(event)
|
3
3
|
%ul.accordian-menu
|
4
|
-
= active_link_to 'Storefront', storefront_link_event_path(event)
|
4
|
+
= active_link_to 'Storefront', storefront_link_event_path(event)
|
5
|
+
= active_link_to 'Discounts', event_discounts_path(@event)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
.row
|
6
6
|
.span3
|
7
7
|
- in_sub_section :details
|
8
|
-
=render :partial=>'menu'
|
8
|
+
= render :partial=>'menu'
|
9
9
|
.span9
|
10
10
|
= render "shared/error_messages", :target => @event
|
11
11
|
= form_for( @event, :html => { :class => 'form-horizontal' } ) do |form|
|
@@ -15,26 +15,27 @@
|
|
15
15
|
=form.text_field :name, :class => 'input-xlarge', :placeholder=>"Event name"
|
16
16
|
|
17
17
|
.control-group
|
18
|
-
=form.label :
|
18
|
+
=form.label :producer, "Producer", :class => 'control-label'
|
19
19
|
.controls
|
20
20
|
=form.text_field :producer, :class => 'input-xlarge'
|
21
21
|
|
22
22
|
.control-group
|
23
|
-
=form.label :
|
23
|
+
=form.label :description, "Description", :class => 'control-label'
|
24
24
|
.controls
|
25
25
|
=form.text_area :description, :class => 'input-xlarge', :rows => '6'
|
26
26
|
|
27
27
|
.control-group
|
28
|
-
=form.label :
|
28
|
+
=form.label :contact_email, "Contact email<br />for patrons".html_safe, :class => 'control-label'
|
29
29
|
.controls
|
30
|
-
=form.
|
30
|
+
=form.email_field :contact_email, :class => 'input-xlarge email-popup', :placeholder=>"Email", "data-content" => "Your patrons will be able to respond to this email address when receiving ticket/donation receipts. You can change this at any time."
|
31
31
|
|
32
32
|
.control-group
|
33
|
-
=form.label :
|
33
|
+
=form.label :contact_phone, "Contact phone<br />for patrons".html_safe, :class => 'control-label'
|
34
34
|
.controls
|
35
35
|
=form.text_field :contact_phone, :class => 'input-xlarge', :placeholder=>"Phone"
|
36
36
|
|
37
37
|
.form-actions
|
38
38
|
= form.submit "Save", :class => 'btn'
|
39
|
+
= form.submit "Save & Next".html_safe, :class => 'btn btn-primary'
|
39
40
|
|
40
41
|
|