caboose-cms 0.7.39 → 0.7.40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cc985f9f45e66ffdbec6af1cfd5bb2f70add4c4
4
- data.tar.gz: 5183c3b06b9b0a3311ff6543464d515caab7ad12
3
+ metadata.gz: 38b087573b26f119de90d1c3cce36ea525f99cff
4
+ data.tar.gz: 8f017e560ca2a6d1642820d0ee329754f78dea07
5
5
  SHA512:
6
- metadata.gz: fba1f06f6f63a9af56e63c5c741a774201cfaf834f2876098ceb34ef263d95316c2514dd3e9cd66fe5b760d8c47887e23f2197de938b3318f31b1a33219a9610
7
- data.tar.gz: 6c1e3ee1ab228696a2849febb268bee7456e0796b2735f19a36d083e2d94df8c12ffe4ef2b947eb0ea321cac812ba85eda7b6842d6ac46418cd9476d073bc4b6
6
+ metadata.gz: 3d36a79446a3bacd8e04fc142261f98f2d516feb85d0ee478ad4685a11a7c452b04f7ae51e248c2645bfba266f9ad612d1638a8b4eba901be022805608a5c633
7
+ data.tar.gz: 88c9eb9cf672333f02067b61e923d9d247c983e58c80d610fc4e2963b4e7259b3aef23e16b11b5c81dfc6be2f759c15d3ab9b4c5d00b4bae5a6bb6c06eb8c92e
@@ -161,6 +161,9 @@ module Caboose
161
161
  return if !user_is_allowed('orders', 'edit')
162
162
 
163
163
  pdf = PendingOrdersPdf.new
164
+ if params[:print_card_details]
165
+ pdf.print_card_details = params[:print_card_details].to_i == 1
166
+ end
164
167
  pdf.orders = Order.where(:site_id => @site.id, :status => Order::STATUS_PENDING).all
165
168
  send_data pdf.to_pdf, :filename => "pending_orders.pdf", :type => "application/pdf", :disposition => "inline"
166
169
  end
@@ -4,7 +4,7 @@ require 'prawn/table'
4
4
  module Caboose
5
5
  class PendingOrdersPdf < Prawn::Document
6
6
 
7
- attr_accessor :orders, :card_type, :card_number
7
+ attr_accessor :orders, :card_type, :card_number, :print_card_details
8
8
 
9
9
  def to_pdf
10
10
 
@@ -36,7 +36,8 @@ module Caboose
36
36
  return str
37
37
  end
38
38
 
39
- def get_card_details(order)
39
+ def get_card_details(order)
40
+ return if self.print_card_details && self.print_card_details == false
40
41
  sc = order.site.store_config
41
42
  ot = order.order_transactions.where(:transaction_type => OrderTransaction::TYPE_AUTHORIZE, :success => true).first
42
43
  return if ot.nil?
@@ -5,8 +5,9 @@
5
5
 
6
6
  <table class='data' id='viewers'>
7
7
  <tr><th>Role</th><th>View</th><th>Edit</th></tr>
8
+ <% admin_role = Caboose::Role.admin_role(@site.id) %>
8
9
  <% Caboose::Role.flat_tree(@site.id, ' - ').each do |r| %>
9
- <% next if r.id == 1 %>
10
+ <% next if r.id == admin_role.id %>
10
11
  <% may_view = Caboose::PagePermission.where(:role_id => r.id, :page_id => @page.id, :action => 'view').exists? %>
11
12
  <% may_edit = Caboose::PagePermission.where(:role_id => r.id, :page_id => @page.id, :action => 'edit').exists? %>
12
13
  <tr>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.7.39'
2
+ VERSION = '0.7.40'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.39
4
+ version: 0.7.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-21 00:00:00.000000000 Z
11
+ date: 2015-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg