diff --git a/.bootstraprc b/.bootstraprc index df9bc9bb..1327a743 100644 --- a/.bootstraprc +++ b/.bootstraprc @@ -6,8 +6,12 @@ "mixins": true, "grid": true, "forms": true, - "responsive-utilities":true + "input-groups": true, + "responsive-utilities":true, + "panels": true, + "type": true }, - "scripts": false + "scripts": false, + "styleNamespace": ".tw-bs" } \ No newline at end of file diff --git a/app/api/houdini/v1/api.rb b/app/api/houdini/v1/api.rb index 0940fac6..d0e3a921 100644 --- a/app/api/houdini/v1/api.rb +++ b/app/api/houdini/v1/api.rb @@ -14,9 +14,9 @@ class Houdini::V1::API < Grape::API mount Houdini::V1::Nonprofit => '/nonprofit' # Additional mounts are added via generators above this line # DON'T REMOVE THIS OR THE PREVIOUS LINES!!! - uriForHost = URI.parse(Settings.cdn.url) + uri_for_host = URI.parse(Settings.api_domain&.url || Settings.cdn.url) add_swagger_documentation \ - host: "#{uriForHost.host}#{Settings.cdn.port ? ":#{Settings.cdn.port}" : ""}", - schemes: [uriForHost.scheme], + host: "#{uri_for_host.host}#{uri_for_host.port ? ":#{uri_for_host.port}" : ""}", + schemes: [uri_for_host.scheme], base_path: '/api/v1' end \ No newline at end of file diff --git a/app/controllers/nonprofits/reports_controller.rb b/app/controllers/nonprofits/reports_controller.rb index c9f63bc6..fd7e0346 100644 --- a/app/controllers/nonprofits/reports_controller.rb +++ b/app/controllers/nonprofits/reports_controller.rb @@ -22,10 +22,13 @@ module Nonprofits name_description = params[:year] elsif (params[:start]) name_description = "from-#{params[:start]}" + if (params[:end]) + name_description += "-to-#{params[:end]}" + end end - filename = "end-of-year-report-#{name_description}.csv" - data = QuerySupporters.year_aggregate_report(params[:nonprofit_id], {:year => params[:year], :start => params[:start]}) + filename = "aggregate-report-#{name_description}.csv" + data = QuerySupporters.year_aggregate_report(params[:nonprofit_id], {:year => params[:year], :start => params[:start], :end => params[:end]}) send_data(Format::Csv.from_array(data), filename: filename) end end diff --git a/app/models/email_list.rb b/app/models/email_list.rb new file mode 100644 index 00000000..c866eeaf --- /dev/null +++ b/app/models/email_list.rb @@ -0,0 +1,5 @@ +class EmailList < ActiveRecord::Base + attr_accessible :list_name, :mailchimp_list_id, :nonprofit, :tag_master + belongs_to :nonprofit + belongs_to :tag_master +end diff --git a/app/models/tag_join.rb b/app/models/tag_join.rb index bcaad420..5f0e402a 100644 --- a/app/models/tag_join.rb +++ b/app/models/tag_join.rb @@ -8,6 +8,7 @@ class TagJoin < ActiveRecord::Base validates :tag_master, presence: true belongs_to :tag_master + belongs_to :supporter def name; self.tag_master.name; end diff --git a/app/models/tag_master.rb b/app/models/tag_master.rb index 70272a56..6e9f0ffd 100644 --- a/app/models/tag_master.rb +++ b/app/models/tag_master.rb @@ -12,6 +12,7 @@ class TagMaster < ActiveRecord::Base belongs_to :nonprofit has_many :tag_joins, dependent: :destroy + has_one :email_list scope :not_deleted, ->{where(deleted: [nil,false])} diff --git a/app/views/donation_mailer/donor_payment_notification.html.erb b/app/views/donation_mailer/donor_payment_notification.html.erb index 25c46d46..0a4e3d04 100644 --- a/app/views/donation_mailer/donor_payment_notification.html.erb +++ b/app/views/donation_mailer/donor_payment_notification.html.erb @@ -22,4 +22,10 @@
<%= render 'donation_mailer/donation_payment_table', donation: @donation, charge: @donation.charges.last %> +<% if @donation.recurring_donation %> +

+ <%= t('mailer.donations.donor_receipt.recurring_donation_cancel_modify_html', management_url: edit_recurring_donation_url(@donation.recurring_donation, {t: @donation.recurring_donation.edit_token}))%> +

+<% end %> + <%= render 'emails/powered_by' %> diff --git a/app/views/donations/_edit_modal.html.erb b/app/views/donations/_edit_modal.html.erb index 7ad1ba1d..641ba01d 100644 --- a/app/views/donations/_edit_modal.html.erb +++ b/app/views/donations/_edit_modal.html.erb @@ -1,97 +1,9 @@ <%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%> -