artfully_ose 1.2.0.pre.23 → 1.2.0.pre.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. checksums.yaml +8 -8
  2. data/app/assets/javascripts/application.js +44 -11
  3. data/app/assets/javascripts/custom/inline-people-search.js +40 -40
  4. data/app/assets/javascripts/households.js +59 -0
  5. data/app/assets/javascripts/jquery-migrate-1.2.1.min.js +2 -0
  6. data/app/assets/javascripts/relationships.js +63 -0
  7. data/app/assets/stylesheets/application.sass +57 -10
  8. data/app/assets/stylesheets/sass/_event_list.sass +12 -1
  9. data/app/assets/stylesheets/sass/cart.sass +0 -6
  10. data/app/assets/stylesheets/storefront.css +1 -0
  11. data/app/concerns/pdf_generation.rb +4 -1
  12. data/app/controllers/events_controller.rb +11 -2
  13. data/app/controllers/events_pass_types_controller.rb +2 -0
  14. data/app/controllers/exchanges_controller.rb +1 -1
  15. data/app/controllers/households_controller.rb +71 -0
  16. data/app/controllers/member_cards_controller.rb +45 -0
  17. data/app/controllers/members/sessions_controller.rb +14 -0
  18. data/app/controllers/membership_comps_controller.rb +7 -2
  19. data/app/controllers/membership_types_controller.rb +8 -3
  20. data/app/controllers/mobile/orders_controller.rb +3 -2
  21. data/app/controllers/mobile/shows_controller.rb +6 -0
  22. data/app/controllers/mobile/tickets_controller.rb +32 -3
  23. data/app/controllers/mobile/users_controller.rb +11 -13
  24. data/app/controllers/orders_controller.rb +44 -2
  25. data/app/controllers/pass_types_controller.rb +11 -0
  26. data/app/controllers/passes_controller.rb +40 -1
  27. data/app/controllers/people_controller.rb +31 -15
  28. data/app/controllers/relationships_controller.rb +15 -0
  29. data/app/controllers/sales_controller.rb +12 -12
  30. data/app/controllers/searches_controller.rb +1 -1
  31. data/app/controllers/shows_controller.rb +10 -4
  32. data/app/controllers/slices_controller.rb +3 -2
  33. data/app/controllers/statements_controller.rb +1 -1
  34. data/app/controllers/store/memberships_controller.rb +5 -2
  35. data/app/controllers/store/orders_controller.rb +14 -13
  36. data/app/controllers/store/retrievals_controller.rb +29 -0
  37. data/app/helpers/artfully_ose_helper.rb +12 -4
  38. data/app/helpers/households_helper.rb +7 -0
  39. data/app/helpers/link_helper.rb +5 -5
  40. data/app/helpers/relationships_helper.rb +26 -0
  41. data/app/helpers/searches_helper.rb +13 -0
  42. data/app/helpers/suggested_households_helper.rb +5 -0
  43. data/app/mailers/pass_mailer.rb +17 -0
  44. data/app/models/ability.rb +1 -0
  45. data/app/models/actions/go_action.rb +3 -2
  46. data/app/models/address.rb +27 -13
  47. data/app/models/cart.rb +15 -0
  48. data/app/models/company.rb +1 -1
  49. data/app/models/database_views/item_view.rb +56 -13
  50. data/app/models/door_list.rb +6 -3
  51. data/app/models/event.rb +22 -1
  52. data/app/models/events_pass_type.rb +3 -1
  53. data/app/models/extendable.rb +6 -0
  54. data/app/models/household.rb +61 -0
  55. data/app/models/household_suggester.rb +58 -0
  56. data/app/models/imports/events_import.rb +10 -5
  57. data/app/models/individual.rb +3 -1
  58. data/app/models/item.rb +3 -1
  59. data/app/models/job/cleanup_suggested_households_job.rb +17 -0
  60. data/app/models/job/destroy_show_job.rb +10 -0
  61. data/app/models/job/geocode_address_job.rb +11 -0
  62. data/app/models/job/order_processor.rb +20 -8
  63. data/app/models/job/refund_order_processor.rb +16 -0
  64. data/app/models/kit.rb +1 -1
  65. data/app/models/kits/mailchimp_kit.rb +5 -3
  66. data/app/models/kits/membership_kit.rb +1 -1
  67. data/app/models/member.rb +19 -0
  68. data/app/models/member_card_generator.rb +63 -0
  69. data/app/models/member_walkup.rb +150 -0
  70. data/app/models/membership.rb +2 -5
  71. data/app/models/membership_comp.rb +1 -0
  72. data/app/models/membership_sale_search.rb +36 -0
  73. data/app/models/membership_type.rb +8 -2
  74. data/app/models/order.rb +32 -2
  75. data/app/models/order_handler.rb +58 -41
  76. data/app/models/orders/refund_order.rb +4 -0
  77. data/app/models/organization.rb +5 -0
  78. data/app/models/organization_ability.rb +1 -0
  79. data/app/models/pass.rb +143 -5
  80. data/app/models/pass_summary.rb +18 -0
  81. data/app/models/pass_type.rb +7 -1
  82. data/app/models/person.rb +83 -32
  83. data/app/models/relation.rb +27 -0
  84. data/app/models/relation_builder.rb +32 -0
  85. data/app/models/relationship.rb +55 -0
  86. data/app/models/relationship_builder.rb +12 -0
  87. data/app/models/relationship_validator.rb +46 -0
  88. data/app/models/relationships_kit.rb +31 -0
  89. data/app/models/search.rb +152 -57
  90. data/app/models/show.rb +38 -18
  91. data/app/models/slices.rb +25 -8
  92. data/app/models/statement.rb +32 -5
  93. data/app/models/suggested_household.rb +24 -0
  94. data/app/models/ticket.rb +1 -4
  95. data/app/models/ticket/locker.rb +2 -1
  96. data/app/models/ticket/pricing.rb +10 -1
  97. data/app/models/ticket_type.rb +12 -1
  98. data/app/models/valuation/lifetime_memberships.rb +24 -0
  99. data/app/models/valuation/lifetime_ticket_value.rb +1 -1
  100. data/app/models/venue.rb +21 -7
  101. data/app/views/actions/_form.html.haml +6 -6
  102. data/app/views/actions/get/_show.html.haml +1 -1
  103. data/app/views/actions/give/_show.html.haml +1 -1
  104. data/app/views/actions/shared/_show.html.haml +1 -1
  105. data/app/views/discounts/_discount_section_fields.html.haml +1 -1
  106. data/app/views/discounts/index.html.haml +1 -1
  107. data/app/views/events/_day_date_show.html.haml +2 -2
  108. data/app/views/events/_discount_section_fields.html.haml +1 -1
  109. data/app/views/events/_list.html.haml +10 -5
  110. data/app/views/events/_menu.html.haml +5 -5
  111. data/app/views/events/_section_fields.html.haml +1 -1
  112. data/app/views/events/_ticket_type_fields.html.haml +2 -2
  113. data/app/views/events/index.html.haml +20 -3
  114. data/app/views/events/temp_discount_form.html.haml +1 -1
  115. data/app/views/events/temp_discounts_index.html.haml +1 -1
  116. data/app/views/events_pass_types/_form.html.haml +17 -0
  117. data/app/views/events_pass_types/index.html.haml +5 -2
  118. data/app/views/exchanges/new.html.haml +1 -1
  119. data/app/views/households/_action.html.haml +24 -0
  120. data/app/views/households/_edit_modal.html.haml +143 -0
  121. data/app/views/households/_form.html.haml +26 -0
  122. data/app/views/households/_header.html.haml +25 -0
  123. data/app/views/households/_individual_fields.html.haml +8 -0
  124. data/app/views/households/_list.html.haml +10 -0
  125. data/app/views/households/_note.html.haml +33 -0
  126. data/app/views/households/edit.html.haml +1 -0
  127. data/app/views/households/index.html.haml +13 -0
  128. data/app/views/households/new.html.haml +14 -0
  129. data/app/views/households/show.html.haml +72 -0
  130. data/app/views/households/suggested.html.haml +38 -0
  131. data/app/views/imports/donations/_pending.html.haml +1 -1
  132. data/app/views/imports/events/_pending.html.haml +1 -1
  133. data/app/views/imports/people/_imported.html.haml +2 -2
  134. data/app/views/imports/people/_new.html.haml +3 -3
  135. data/app/views/imports/people/_pending.html.haml +2 -2
  136. data/app/views/imports/people/_recalled.html.haml +1 -1
  137. data/app/views/imports/shared/_sidebar.html.haml +1 -1
  138. data/app/views/index/dashboard.html.haml +4 -4
  139. data/app/views/layouts/_flash.html.haml +2 -2
  140. data/app/views/layouts/_menu.html.haml +2 -0
  141. data/app/views/layouts/storefront.html.haml +1 -1
  142. data/app/views/members/index/index.html.haml +1 -1
  143. data/app/views/membership_comps/confirm.html.haml +4 -3
  144. data/app/views/membership_comps/new.html.haml +21 -8
  145. data/app/views/membership_types/_form.html.haml +11 -0
  146. data/app/views/membership_types/index.html.haml +2 -2
  147. data/app/views/membership_types/type.html.haml +7 -4
  148. data/app/views/memberships/index.html.haml +7 -7
  149. data/app/views/merges/find_person.html.haml +1 -1
  150. data/app/views/notes/_note.html.haml +4 -4
  151. data/app/views/order_mailer/confirmation_for_refund.html.haml +8 -1
  152. data/app/views/orders/_item_table.haml +18 -5
  153. data/app/views/orders/_order_sidebar.html.haml +1 -1
  154. data/app/views/orders/membership.html.haml +104 -0
  155. data/app/views/orders/sales.html.haml +1 -1
  156. data/app/views/organizations/_form.html.haml +1 -1
  157. data/app/views/pass_mailer/pass_info_for.html.haml +21 -0
  158. data/app/views/pass_types/_form.html.haml +6 -0
  159. data/app/views/pass_types/_pass_type_fees.html.haml +0 -48
  160. data/app/views/pass_types/index.html.haml +4 -2
  161. data/app/views/passes/index.html.haml +95 -27
  162. data/app/views/pdfs/member_card_generator/blanks_usa_idc6.html.haml +109 -0
  163. data/app/views/people/_edit_modal.html.haml +35 -25
  164. data/app/views/people/_header.html.haml +10 -6
  165. data/app/views/people/_household_fields.html.haml +5 -0
  166. data/app/views/people/_phone_fields.html.haml +1 -1
  167. data/app/views/people/_relationship_fields.html.haml +14 -0
  168. data/app/views/people/_work_with_menu.html.haml +36 -0
  169. data/app/views/people/new.html.haml +1 -1
  170. data/app/views/people/show.html.haml +46 -8
  171. data/app/views/refunds/new.html.haml +4 -0
  172. data/app/views/relationships/index.html.haml +32 -0
  173. data/app/views/reports_mailer/daily.html.haml +41 -38
  174. data/app/views/sales/new.html.haml +1 -1
  175. data/app/views/searches/_form.html.haml +65 -17
  176. data/app/views/searches/_household.html.haml +7 -0
  177. data/app/views/searches/_person.html.haml +5 -2
  178. data/app/views/searches/new.html.haml +1 -1
  179. data/app/views/searches/show.html.haml +13 -5
  180. data/app/views/segments/show.html.haml +3 -3
  181. data/app/views/shared/_tags.html.haml +1 -1
  182. data/app/views/shows/_glance.html.haml +1 -1
  183. data/app/views/shows/_sections_table.html.haml +2 -2
  184. data/app/views/shows/_ticket_table.html.haml +1 -1
  185. data/app/views/shows/_work_with.html.haml +2 -2
  186. data/app/views/shows/door_list.html.haml +2 -2
  187. data/app/views/shows/door_list.pdf.haml +29 -0
  188. data/app/views/shows/index.html.haml +1 -1
  189. data/app/views/shows/show.html.haml +1 -1
  190. data/app/views/slices/index.html.haml +2 -1
  191. data/app/views/statements/_discounts_table.html.haml +1 -1
  192. data/app/views/statements/_order_location_table.html.haml +1 -1
  193. data/app/views/statements/_passes_table.html.haml +13 -16
  194. data/app/views/statements/_payment_method_table.haml +1 -1
  195. data/app/views/statements/_ticket_type_table.haml +5 -2
  196. data/app/views/statements/show.html.haml +2 -2
  197. data/app/views/store/checkouts/thanks.html.haml +3 -2
  198. data/app/views/store/events/index.html.haml +1 -1
  199. data/app/views/store/memberships/index.html.haml +9 -2
  200. data/app/views/store/orders/show.html.haml +10 -24
  201. data/app/views/store/passes/index.html.haml +1 -1
  202. data/app/views/store/retrievals/index.html.haml +11 -0
  203. data/app/views/store/shows/_show.html.haml +2 -2
  204. data/app/views/venues/edit.html.haml +3 -1
  205. data/config/routes.rb +21 -3
  206. data/db/migrate/20130916194547_add_relationships.rb +21 -0
  207. data/db/migrate/20131003134821_add_relationships_to_search.rb +7 -0
  208. data/db/migrate/20131003200508_add_starred_to_relationships.rb +5 -0
  209. data/db/migrate/20131015151550_add_households.rb +18 -0
  210. data/db/migrate/20131022183913_add_search_output_options.rb +24 -0
  211. data/db/migrate/20131025162155_default_search_filter_values.rb +10 -0
  212. data/db/migrate/20131025180139_unique_household_names.rb +8 -0
  213. data/db/migrate/20131106191847_add_suggested_households.rb +13 -0
  214. data/db/migrate/20131204162642_add_shared_address.rb +9 -0
  215. data/db/migrate/20131212164553_add_copy_to_individuals_option.rb +5 -0
  216. data/db/migrate/20140415212841_add_min_max_start_dates_to_searches.artfully_ose_engine.rb +6 -0
  217. data/db/migrate/20140422193345_add_email_copy_to_pass_type.rb +5 -0
  218. data/db/migrate/20140423181639_add_min_max_end_dates_to_searches.artfully_ose_engine.rb +6 -0
  219. data/db/migrate/20140423185921_add_cached_stats_to_event.rb +9 -0
  220. data/db/migrate/20140424174423_add_lifetime_memberships_to_people.artfully_ose_engine.rb +5 -0
  221. data/db/migrate/20140506155241_add_lpt_to_membership_type.rb +5 -0
  222. data/db/migrate/20140515143651_remove_show_stats_view.rb +6 -0
  223. data/db/migrate/20140521195853_add_deleted_at_to_pass_type.rb +5 -0
  224. data/db/migrate/20140522205554_add_limit_to_events_pass_types.rb +5 -0
  225. data/db/migrate/20140523180444_remove_tickets_purchased_from_passes.rb +5 -0
  226. data/lib/artfully_ose/common_abilities.rb +7 -1
  227. data/lib/artfully_ose/version.rb +1 -1
  228. data/spec/factories/household_factories.rb +8 -0
  229. data/spec/factories/organization_factories.rb +4 -0
  230. data/spec/factories/pass_type_factories.rb +11 -0
  231. data/spec/factories/user_factories.rb +1 -1
  232. metadata +92 -11
  233. data/app/assets/fonts/FontAwesome.otf +0 -0
  234. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  235. data/app/assets/fonts/fontawesome-webfont.svg +0 -284
  236. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  237. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  238. data/app/assets/stylesheets/font-awesome.sass +0 -759
  239. data/app/models/show_stats_view.rb +0 -10
  240. data/app/models/show_touch.rb +0 -12
  241. data/app/views/people/_comp_membership.html.haml +0 -23
@@ -0,0 +1,13 @@
1
+ - in_section :households
2
+ - content_for :title do
3
+ Households
4
+ - content_for :header do
5
+ %h1 Households
6
+
7
+ .row
8
+ .span8.super-search-results
9
+ - if @households.empty?
10
+  
11
+ -else
12
+ = render :partial => 'list', :locals => { :households => @households } unless @households.empty?
13
+ = will_paginate @households, :inner_window => 2, :outer_window => 0
@@ -0,0 +1,14 @@
1
+ - in_section :households
2
+ - content_for :title do
3
+ New Household
4
+ - content_for :header do
5
+ %h1 Create a New Household
6
+
7
+ - content_for :custom_js do
8
+ = javascript_include_tag "households"
9
+
10
+ .row{"ng-controller" => "NewHouseholdCtrl"}
11
+ .span6.offset3
12
+ = render :partial => "shared/error_messages", :locals => { :target => @household }
13
+ = render :partial => 'form', :locals => { :household => @household }
14
+
@@ -0,0 +1,72 @@
1
+ - content_for :custom_js do
2
+ = javascript_include_tag "relationships"
3
+ - in_section :households
4
+ - content_for :title do
5
+ #{@household.name}
6
+
7
+ = render "header"
8
+
9
+ .row
10
+ .span4
11
+ %p
12
+ = link_to "Edit Household", '#edit-household', 'data-toggle' => 'modal'
13
+
14
+ = render(@household.address) if @household.address
15
+
16
+ %ul
17
+ - @household.individuals.each do |individual|
18
+ %li{:style => "padding-top: 0.5em;"}
19
+ = link_to(individual, polymorphic_url(individual))
20
+ - individual.phones.each do |phone|
21
+ %li
22
+ %span.muted= phone.kind
23
+ = phone.number
24
+
25
+ .span8
26
+ #notes
27
+ .row-fluid
28
+ .span3
29
+ %h3 Notes
30
+ %table.table-condensed.table#notes-list
31
+ %tbody
32
+ - notes = @household.notes.includes(:person)
33
+ - if notes.empty?
34
+ %tr
35
+ %td
36
+ No notes for individuals in this household
37
+ - else
38
+ = render :partial => 'households/note', :collection => notes[0..2]
39
+ - if notes[3]
40
+ %tr#more-notes-link
41
+ %td.triangle ▸
42
+ %td= link_to pluralize(notes.length-3, 'more note'), "#"
43
+ %tbody#more-notes{:style => 'display:none'}
44
+ = render :partial => 'households/note', :collection => notes[3..-1]
45
+
46
+ #actions
47
+ .row-fluid
48
+ .span3
49
+ %h3 Action Feed
50
+ %table.table-condensed.sortedstar.table#action-list
51
+ %thead
52
+ %tr
53
+ %th
54
+ %th{:style => 'width:60px;'} Date
55
+ %th{:style => 'width:25px'}
56
+ %th #{@household.name} individuals...
57
+ %tbody
58
+ - if @actions.empty?
59
+ %tr
60
+ %td
61
+ %td
62
+ %td
63
+ %td
64
+ No actions for individuals in this household
65
+ - else
66
+ = render :partial => 'households/action', :collection => @actions
67
+
68
+ = will_paginate @actions, :id => 'endless-scroll-pagination'
69
+
70
+ %div{"ng-controller" => "EditHouseholdCtrl"}
71
+ = render 'edit_modal'
72
+ #edit-order-popup.modal
@@ -0,0 +1,38 @@
1
+ .suggested-households
2
+ - if @by_address.count < 1 && @by_spouse.count < 1
3
+ %h3 Suggested Households
4
+ %p
5
+ There are no suggested households.
6
+
7
+ - if @by_address.count > 0
8
+ %h4 Similar Addresses
9
+ %table.by-address.table
10
+ - @by_address.each do |row|
11
+ - next if row.individuals.empty?
12
+ %tr
13
+ %td.people
14
+ - row.individuals.each do |person|
15
+ .well.span3
16
+ %h5= person
17
+ = person.address
18
+
19
+ %td.controls{:style => "width: 80px;"}
20
+ = link_to "Join", suggested_household_new_household_path(row), :class => "btn btn-primary btn-block"
21
+ %br
22
+ = link_to "Ignore", ignore_suggested_households_path(row), :method => :put, :class => "btn btn-danger btn-block"
23
+
24
+
25
+ - if @by_spouse.count > 0
26
+ %h4 Spouses
27
+ %table.by-spouse.table
28
+ - @by_spouse.each do |row|
29
+ %tr
30
+ %td.people
31
+ - row.individuals.each do |person|
32
+ .well.span3
33
+ %h5= person
34
+
35
+ %td.controls{:style => "width: 80px;"}
36
+ = link_to "Join", suggested_household_new_household_path(row), :class => "btn btn-primary btn-block"
37
+ %br
38
+ = link_to "Ignore", ignore_suggested_households_path(row), :method => :put, :class => "btn btn-danger btn-block"
@@ -6,7 +6,7 @@
6
6
  %p To pause this import and come back later, click "Back"
7
7
 
8
8
  .btn-group
9
- = icon_link_to "Back", new_import_path(:type => import.kind), 'icon-share-alt', 'btn', ''
9
+ = icon_link_to "Back", new_import_path(:type => import.kind), 'fa-share', 'btn', ''
10
10
  = link_to "Delete", import_path(import), :data => {:confirm => "Are you sure you want to delete this import?"}, :method => :delete, :class => "btn btn-danger"
11
11
 
12
12
  .span9
@@ -5,7 +5,7 @@
5
5
  %p To pause this import and come back later, click "Back"
6
6
 
7
7
  .btn-group
8
- = icon_link_to "Back", new_import_path(:type => import.kind), 'icon-share-alt', 'btn', ''
8
+ = icon_link_to "Back", new_import_path(:type => import.kind), 'fa-share', 'btn', ''
9
9
  = link_to "Delete", import_path(import), :data => {:confirm => "Are you sure you want to delete this import?"}, :method => :delete, :class => "btn btn-danger"
10
10
 
11
11
  .span9
@@ -24,7 +24,7 @@
24
24
  %td=message.person.email
25
25
  %td=message.person.first_name
26
26
  %td=message.person.last_name
27
- %td=icon_link_to "", person_path(message.person), 'icon-share-alt', '', ''
27
+ %td=icon_link_to "", person_path(message.person), 'fa-share', '', ''
28
28
  = will_paginate @messages, :param_name => 'messages_page'
29
29
 
30
30
  - unless @people.empty?
@@ -41,7 +41,7 @@
41
41
  %td=row.email
42
42
  %td=row.first_name
43
43
  %td=row.last_name
44
- %td=icon_link_to "", person_path(row), 'icon-share-alt', '', ''
44
+ %td=icon_link_to "", person_path(row), 'fa-share', '', ''
45
45
 
46
46
  = will_paginate @people
47
47
 
@@ -64,19 +64,19 @@
64
64
  %td The person's country
65
65
  %tr
66
66
  %td.field-slim Phone 1 type
67
- %td Work, Home, Cell or Fax
67
+ %td Work, Home, Cell, Fax, or Other
68
68
  %tr
69
69
  %td.field-slim Phone 1
70
70
  %td The person's first phone number
71
71
  %tr
72
72
  %td.field-slim Phone 2 type
73
- %td Work, Home, Cell or Fax
73
+ %td Work, Home, Cell, Fax, or Other
74
74
  %tr
75
75
  %td.field-slim Phone 2
76
76
  %td The person's second phone number
77
77
  %tr
78
78
  %td.field-slim Phone 3 type
79
- %td Work, Home, Cell or Fax
79
+ %td Work, Home, Cell, Fax, or Other
80
80
  %tr
81
81
  %td.field-slim Phone 3
82
82
  %td The person's third phone number
@@ -6,7 +6,7 @@
6
6
  %p To pause this import and come back later, click "Back"
7
7
 
8
8
  .btn-group
9
- = icon_link_to "Back", new_import_path(:type => import.kind), 'icon-share-alt', 'btn', ''
9
+ = icon_link_to "Back", new_import_path(:type => import.kind), 'fa-share', 'btn', ''
10
10
  = link_to "Delete", import_path(import), :data => {:confirm => "Are you sure you want to delete this import?"}, :method => :delete, :class => "btn btn-danger"
11
11
 
12
12
  .span9
@@ -34,7 +34,7 @@
34
34
  %td=row.company
35
35
  %td=row.website
36
36
  %td
37
- =icon_link_to("", "#row#{index}", ' icon-zoom-in', '', '', {'data-toggle' => 'modal'})
37
+ =icon_link_to("", "#row#{index}", ' fa-search-plus', '', '', {'data-toggle' => 'modal'})
38
38
  =render :partial => "imports/shared/inspect_modal", :locals => {:row => row, :index => index, :keys => ParsedRow::PEOPLE_FIELDS.merge(ParsedRow::ADDRESS_FIELDS).keys}
39
39
  = will_paginate @parsed_rows
40
40
  -else
@@ -21,5 +21,5 @@
21
21
  %td=message.person.email
22
22
  %td=message.person.first_name
23
23
  %td=message.person.last_name
24
- %td=icon_link_to "", person_path(message.person), 'icon-share-alt', '', ''
24
+ %td=icon_link_to "", person_path(message.person), 'fa-share', '', ''
25
25
  = will_paginate @messages, :param_name => 'messages_page'
@@ -1,5 +1,5 @@
1
1
  %p This import was created at: <br> #{l import.created_at_local_to_organization}
2
2
 
3
3
  .btn-group
4
- = icon_link_to "Back", new_import_path(:type => import.kind), 'icon-share-alt', 'btn', ''
4
+ = icon_link_to "Back", new_import_path(:type => import.kind), 'fa-share', 'btn', ''
5
5
  = link_to "Delete", import_path(import), :data => {:confirm => "Are you sure you want to delete this import?"}, :method => :delete, :class => "btn btn-danger"
@@ -31,9 +31,9 @@
31
31
  .span8
32
32
  %h4.event-link= link_to event.name, event_path(event), :title => 'event-name'
33
33
  %ul.mini-stats
34
- %li= "#{pluralize event.glance.sold.total, 'ticket'} sold"
35
- %li= "#{pluralize event.glance.available.total, 'ticket'} on sale"
36
- %li= "#{number_as_cents(event.glance.sales.total)} total sales"
34
+ %li= "#{pluralize event.sold, 'ticket'} sold"
35
+ %li= "#{pluralize event.on_sale, 'ticket'} on sale"
36
+ %li= "#{number_as_cents(event.sales_total)} total sales"
37
37
 
38
38
  -if @events.blank?
39
39
  .no-image#add-a-description
@@ -44,7 +44,7 @@
44
44
  -else
45
45
  = link_to "Create Event", new_event_path, :class => "btn btn-primary"
46
46
  %span.pull-right
47
- =icon_link_to("View All Events", events_path, 'icon-arrow-right', 'btn', '')
47
+ =icon_link_to("View All Events", events_path, 'fa-arrow-right', 'btn', '')
48
48
 
49
49
  .span8
50
50
  =render :partial => 'recent_activity'
@@ -1,5 +1,5 @@
1
1
  - [:notice, :success, :error, :alert, :info].each do |type|
2
- - if flash[type]
2
+ - if flash[type].present?
3
3
  .flash{ "data-alert" => "alert", :class => [bootstrapped_type(type), type, 'alert'] }
4
4
  .close{ "data-dismiss" => "alert"} &times;
5
- = flash[type]
5
+ = [flash[type]].flatten.join('<br/>').html_safe
@@ -20,6 +20,7 @@
20
20
  %li= link_to "List Segments", segments_path
21
21
  %li= link_to "Import", new_import_path(:type => :people)
22
22
  %li= link_to "Export", imports_path
23
+ %li= link_to "Suggested Households", suggested_households_path
23
24
 
24
25
  %li{ :class => "dropdown #{active?(:reports)}" }
25
26
  = nav_dropdown "Reports"
@@ -35,6 +36,7 @@
35
36
  %ul.dropdown-menu
36
37
  %li= link_to "Tickets", sales_orders_path
37
38
  %li= link_to "Donations", contributions_path
39
+ %li= link_to "Memberships", membership_orders_path
38
40
  %li= link_to "Search All", orders_path
39
41
 
40
42
  %li.divider-vertical
@@ -36,7 +36,7 @@
36
36
  .pull-right
37
37
  %ul.nav.nav-pills
38
38
  %li.active
39
- =icon_link_to("#{current_cart.id} &nbsp;&nbsp;&nbsp;Checkout Now", store_order_path(@store_organization.cached_slug), 'icon-shopping-cart', '', '')
39
+ =icon_link_to("#{current_cart.items.size} &nbsp;&nbsp;&nbsp;Checkout Now", store_order_path(@store_organization.cached_slug), 'fa-shopping-cart', '', '')
40
40
 
41
41
  = render :partial => 'layouts/flash', :locals => { :flash => flash }
42
42
  - flash.discard
@@ -38,4 +38,4 @@
38
38
  -# =current_member.organization.phone
39
39
 
40
40
  #edit-address-modal.modal.hide
41
- =render :partial => 'people/edit_modal', :locals => { :url => members_person_path(current_member.person), :header => "Edit Your Information", :except => [:convert, :social, :merge, :delete], :return_to => members_root_path }
41
+ =render :partial => 'people/edit_modal', :locals => { :url => members_person_path(current_member.person), :header => "Edit Your Information", :except => [:convert, :relationships, :households, :social, :merge, :delete], :return_to => members_root_path }
@@ -6,9 +6,10 @@
6
6
  %tr
7
7
  %td Type
8
8
  %td#confirm-membership-type-name=@membership_comp.membership_type.name
9
- %tr
10
- %td Number of Memberships
11
- %td#confirm-number-of-memberships=@membership_comp.number_of_memberships
9
+ -if @membership_comp.membership_type.allow_multiple_memberships?
10
+ %tr
11
+ %td Number of Memberships
12
+ %td#confirm-number-of-memberships=@membership_comp.number_of_memberships
12
13
  %tr
13
14
  %td Expires On
14
15
  %td#confirm-ends-at=@membership_comp.ends_at
@@ -9,9 +9,9 @@
9
9
  .control-group
10
10
  = form.label "Membership Type", :class => 'control-label'
11
11
  .controls
12
- = form.select :membership_type, options_from_collection_for_select(@membership_types, 'id', 'name', @membership_comp.membership_type)
12
+ = form.select :membership_type, options_from_collection_for_select(@membership_types, 'id', 'name', @membership_comp.membership_type), :include_blank => true
13
13
 
14
- .control-group
14
+ .control-group#number_of_memberships_control_group{:style => "display:none"}
15
15
  = form.label :number_of_memberships, "Number of Memberships", :class => 'control-label'
16
16
  .controls
17
17
  = form.text_field :number_of_memberships
@@ -60,23 +60,36 @@
60
60
 
61
61
  - content_for :custom_js do
62
62
  :javascript
63
- var ends_at_data = #{@membership_types_hash.to_json}
63
+ var membership_type_hash = #{@membership_types_hash.to_json}
64
64
  $('#membership_comp_membership_type').change(function () {
65
- $('#membership_comp_ends_at').val(ends_at_data[$('#membership_comp_membership_type').val()])
65
+ mt = membership_type_hash[$('#membership_comp_membership_type').val()]
66
+
67
+ if (mt == undefined) {
68
+ $('#number_of_memberships_control_group').hide()
69
+ return;
70
+ }
71
+
72
+ $('#membership_comp_ends_at').val(mt['formatted_ends_at'])
73
+ allow_multiple_memberships = mt['allow_multiple_memberships']
74
+ if (allow_multiple_memberships == true) {
75
+ $('#number_of_memberships_control_group').show()
76
+ } else {
77
+ $('#number_of_memberships_control_group').hide()
78
+ }
66
79
  })
67
80
 
68
81
  $('#membership_comp_send_email_false').click(function () {
69
- $('#membership_comp_message').hide()
82
+ $('#membership_comp_welcome_message').hide()
70
83
  })
71
84
 
72
85
  $('#membership_comp_send_email_true').click(function () {
73
- $('#membership_comp_message').show()
86
+ $('#membership_comp_welcome_message').show()
74
87
  })
75
88
 
76
89
  $(document).ready(function() {
77
90
  if ($('input[name="membership_comp[send_email]"]:checked').val() == true) {
78
- $('#membership_comp_message').show()
91
+ $('#membership_comp_welcome_message').hide()
79
92
  } else {
80
- $('#membership_comp_message').false()
93
+ $('#membership_comp_welcome_message').show()
81
94
  }
82
95
  })
@@ -70,6 +70,17 @@
70
70
  .controls
71
71
  %label
72
72
  = f.check_box :on_sale
73
+
74
+ .control-group
75
+ = f.label :limit_per_transaction, :class => 'control-label' do
76
+ Limit Per Transaction
77
+ .tip.muted
78
+ %span.label.label-success
79
+ Advanced
80
+ This is the number of memberships a patron can purchase in a single transaction. If you're not sure what this means, leave it set to 1.
81
+ =link_to "More", "https://artfully.zendesk.com/entries/64035707-How-many-memberships-should-I-allow-a-patron-to-buy", :target => "_blank"
82
+ .span9
83
+ = f.select :limit_per_transaction, (1..10), {}, :class => "span2"
73
84
  .form-actions
74
85
  =f.submit "Save", :class => "btn btn-primary"
75
86
  =link_to "Cancel", membership_types_path, :class => "btn"
@@ -3,7 +3,7 @@
3
3
 
4
4
  .row.bottom-room
5
5
  .pull-right
6
- =icon_link_to("New Membership Type", new_membership_type_path, 'icon-plus', 'btn','')
6
+ =icon_link_to("New Membership Type", new_membership_type_path, 'fa-plus', 'btn','')
7
7
  =link_to "Download CSV", membership_types_path(:format => "csv"), :class => "btn"
8
8
 
9
9
  %table.table#membership-types-table
@@ -25,4 +25,4 @@
25
25
  %span.badge{:class => "#{'badge-success' if membership_type.on_sale?}"}="S"
26
26
 
27
27
  %td.right
28
- = link_to('Store link', membership_type_storefront_path(membership_type))
28
+ =icon_link_to("Store link", membership_type_storefront_path(membership_type), 'fa-shopping-cart', 'btn btn-mini', '')
@@ -5,12 +5,15 @@
5
5
  .span6
6
6
  %h4 Season
7
7
  %p
8
- Do your members sign up for a theatrical season or other fixed-expiration?
9
- .style-selection.center
10
- =link_to "Setup Seasonal Membership", new_membership_type_path(:type => "SeasonalMembershipType"), :class => :btn
8
+ Members sign up and receive benefits for your theatrical season, a calendar year, or some other term with a fixed end date. Here sign-ups and renewals are focused at a certain time of year.
11
9
  .span6
12
10
  %h4 Rolling
13
11
  %p
14
- Do your members sign up for monthly or yearly memberships?
12
+ Members sign up and receive benefits for a number of months or years from their sign-up date. Here members can start at any time and renewal takes place whenever an individual's membership expires.
13
+ .row-fluid
14
+ .span6
15
+ .style-selection.center
16
+ =link_to "Setup Seasonal Membership", new_membership_type_path(:type => "SeasonalMembershipType"), :class => :btn
17
+ .span6
15
18
  .style_selection.center
16
19
  =link_to "Setup Rolling Membership", new_membership_type_path(:type => "RollingMembershipType"), :class => :btn
@@ -10,7 +10,7 @@
10
10
  .span6
11
11
  %ul.in-table{'ng-controller' => 'MembershipActionsCtrl'}
12
12
  %li.dropdown{:id => "#menu#bulkactions"}
13
- =icon_link_to('Work with...', "#menu#bulkactions", 'icon-asterisk', 'dropdown-toggle dropdown btn', '')
13
+ =icon_link_to('Work with...', "#menu#bulkactions", 'fa-asterisk', 'dropdown-toggle dropdown btn', '')
14
14
  =image_tag "loading.gif", :class => 'loading-indicator', 'ng-show' => 'loading'
15
15
  .alert{'ng-show' => 'error'}
16
16
  %button.close{'ng-click' => 'error = false'}
@@ -26,7 +26,7 @@
26
26
  %li
27
27
  = link_to "Cancel Membership", "#cancel", 'ng-click' => 'cancel($event)'
28
28
  .span6.right
29
- = icon_link_to("View Record", person_path(@person), 'icon-share-alt', 'btn', '')
29
+ = icon_link_to("View Record", person_path(@person), 'fa-share-alt', 'btn', '')
30
30
  -# = link_to "Log In", "#", 'data-toggle' => 'modal', :class => 'btn'
31
31
  = link_to "Reset Password", "#reset-password-modal", 'data-toggle' => 'modal', :class => 'btn btn-danger'
32
32
 
@@ -73,17 +73,17 @@
73
73
  =hidden_field_tag "ends_at", ""
74
74
  .modal-footer
75
75
  =submit_tag "Change Expiration", :class => "btn btn-success"
76
- =link_to "Cancel", "#", :class => "btn", 'data-dismiss'=>'modal'
76
+ =link_to "Cancel", "#", :class => "btn", 'data-dismiss'=>'modal'
77
77
 
78
78
  #full-refund.modal
79
79
  .modal-header
80
80
  .close{'data-dismiss'=>'modal'} x
81
81
  %h3 Refund Membership
82
82
  .modal-body
83
- %p="#{@person} will receive a full refund for these memberships"
83
+ %p="#{@person} will receive a full refund for these memberships"
84
84
  .modal-footer
85
85
  =link_to "Process Refund", "#", :class => "btn btn-success", 'data-dismiss'=>'modal'
86
- =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal'
86
+ =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal'
87
87
 
88
88
  #change.modal{'ng-controller' => 'ChangeMembershipController'}
89
89
  =form_tag person_membership_changes_path, :class => "form-horizontal", 'novalidate' => 'novalidate', 'name' => 'changeForm', :method => :post do
@@ -144,7 +144,7 @@
144
144
  %label Enter refund amount:
145
145
  .controls
146
146
  =text_field_tag "whatever", "", :class => "currency"
147
- %p="#{@person} will receive a partial refund for the above amount and these memberships will be cancelled."
147
+ %p="#{@person} will receive a partial refund for the above amount and these memberships will be cancelled."
148
148
  .modal-footer
149
149
  =link_to "Process Refund", "#", :class => "btn btn-success", 'data-dismiss'=>'modal'
150
150
  =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal'
@@ -154,7 +154,7 @@
154
154
  .close{'data-dismiss'=>'modal'} x
155
155
  %h3 Reset Password
156
156
  .modal-body
157
- %p="This member will receive an email with a link to reset their password so they can log in to their member dashboard."
157
+ %p="This member will receive an email with a link to reset their password so they can log in to their member dashboard."
158
158
  .modal-footer
159
159
  =link_to "Send Password Reset", reset_password_person_path(@person), :class => "btn btn-primary", 'data-dismiss'=>'modal', :method => :post
160
160
  =link_to "Cancel", "#", :class => "btn", 'data-dismiss'=>'modal'