invoice_bar 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,12 @@ module InvoiceBar
8
8
  before_filter :require_login
9
9
  before_filter :fetch_currencies, :only => [:new, :create, :edit, :update]
10
10
 
11
+ def index
12
+ @accounts = current_user.accounts.page(params[:page])
13
+
14
+ index! {}
15
+ end
16
+
11
17
  def create
12
18
  @account = Account.new(params[:account])
13
19
  current_user.accounts << @account
@@ -22,11 +28,5 @@ module InvoiceBar
22
28
  def destroy
23
29
  destroy! {}
24
30
  end
25
-
26
- protected
27
-
28
- def begin_of_association_chain
29
- current_user
30
- end
31
31
  end
32
32
  end
@@ -6,6 +6,12 @@ module InvoiceBar
6
6
  respond_to :html, :json
7
7
 
8
8
  before_filter :require_login
9
+
10
+ def index
11
+ @contacts = current_user.contacts.page(params[:page])
12
+
13
+ index! {}
14
+ end
9
15
 
10
16
  def new
11
17
  @contact = Contact.new
@@ -32,10 +38,6 @@ module InvoiceBar
32
38
  end
33
39
 
34
40
  protected
35
-
36
- def begin_of_association_chain
37
- current_user
38
- end
39
41
 
40
42
  def collection
41
43
  @contacts ||= end_of_association_chain.page(params[:page])
@@ -8,6 +8,12 @@ module InvoiceBar
8
8
  before_filter :require_login
9
9
  before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update]
10
10
  before_filter :fetch_user_accounts, :only => [:new, :create, :edit, :update]
11
+
12
+ def index
13
+ @invoice_templates = current_user.invoice_templates.page(params[:page])
14
+
15
+ index! {}
16
+ end
11
17
 
12
18
  def show
13
19
  @invoice_template = current_user.invoice_templates.find(params[:id])
@@ -93,10 +99,6 @@ module InvoiceBar
93
99
  end
94
100
 
95
101
  protected
96
-
97
- def begin_of_association_chain
98
- current_user
99
- end
100
102
 
101
103
  def collection
102
104
  @invoice_templates ||= end_of_association_chain.page(params[:page])
@@ -11,6 +11,12 @@ module InvoiceBar
11
11
  before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update, :from_template]
12
12
  before_filter :fetch_user_invoice_templates, :only => [:new, :create, :edit, :update, :from_template]
13
13
 
14
+ def index
15
+ @invoices = current_user.invoices.page(params[:page])
16
+
17
+ index! {}
18
+ end
19
+
14
20
  def show
15
21
  @invoice = current_user.invoices.find(params[:id])
16
22
  @address = @invoice.address
@@ -9,6 +9,12 @@ module InvoiceBar
9
9
  before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update]
10
10
  before_filter :fetch_user_accounts, :only => [:new, :create, :edit, :update]
11
11
 
12
+ def index
13
+ @receipt_templates = current_user.receipt_templates.page(params[:page])
14
+
15
+ index! {}
16
+ end
17
+
12
18
  def show
13
19
  @receipt_template = current_user.receipt_templates.find(params[:id])
14
20
  @address = @receipt_template.address
@@ -93,10 +99,6 @@ module InvoiceBar
93
99
  end
94
100
 
95
101
  protected
96
-
97
- def begin_of_association_chain
98
- current_user
99
- end
100
102
 
101
103
  def collection
102
104
  @receipt_templates ||= end_of_association_chain.page(params[:page])
@@ -11,6 +11,12 @@ module InvoiceBar
11
11
  before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update, :from_template]
12
12
  before_filter :fetch_user_receipt_templates, :only => [:new, :create, :edit, :update, :from_template]
13
13
 
14
+ def index
15
+ @receipts = current_user.receipts.page(params[:page])
16
+
17
+ index! {}
18
+ end
19
+
14
20
  def show
15
21
  @receipt = current_user.receipts.find(params[:id])
16
22
  @address = @receipt.address
@@ -128,10 +134,6 @@ module InvoiceBar
128
134
 
129
135
  protected
130
136
 
131
- def begin_of_association_chain
132
- current_user
133
- end
134
-
135
137
  def filter_params(bills)
136
138
  @bills = bills.for_numbers(params[:number])
137
139
  .within_dates(params[:from_date], params[:to_date])
@@ -1,24 +1,28 @@
1
- <div class="span12" style="padding-bottom:20px">
2
- <%= link_to t('buttons.edit'), edit_account_path(@account), class: 'btn' %>
3
- <%= link_to t('buttons.destroy'), account_path(@account), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
4
- </div>
1
+ <div class="controller">
2
+ <div class="row">
3
+ <div class="span12" style="padding-bottom:20px">
4
+ <%= link_to t('buttons.edit'), edit_account_path(@account), class: 'btn' %>
5
+ <%= link_to t('buttons.destroy'), account_path(@account), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
6
+ </div>
5
7
 
6
- <div class="show span4">
7
- <b><%= t('attributes.account.name') %></b>
8
- <%= @account.name %>
9
- <br>
10
- <b><%= t('attributes.account.bank_account_number') %></b>
11
- <%= @account.bank_account_number %>
12
- <br>
13
- <b><%= t('attributes.account.iban') %></b>
14
- <%= @account.iban %>
15
- <br>
16
- <b><%= t('attributes.account.swift') %></b>
17
- <%= @account.swift %>
18
- <br>
19
- <b><%= t('attributes.account.currency_id') %></b>
20
- <%= @account.currency_name %>
21
- <br>
22
- <b><%= t('attributes.account.amount') %></b>
23
- <%= @account.amount %>
8
+ <div class="show span4">
9
+ <b><%= t('attributes.account.name') %></b>
10
+ <%= @account.name %>
11
+ <br>
12
+ <b><%= t('attributes.account.bank_account_number') %></b>
13
+ <%= @account.bank_account_number %>
14
+ <br>
15
+ <b><%= t('attributes.account.iban') %></b>
16
+ <%= @account.iban %>
17
+ <br>
18
+ <b><%= t('attributes.account.swift') %></b>
19
+ <%= @account.swift %>
20
+ <br>
21
+ <b><%= t('attributes.account.currency_id') %></b>
22
+ <%= @account.currency_name %>
23
+ <br>
24
+ <b><%= t('attributes.account.amount') %></b>
25
+ <%= @account.amount %>
26
+ </div>
27
+ </div>
24
28
  </div>
@@ -1,43 +1,47 @@
1
- <div class="span12" style="padding-bottom:20px">
2
- <%= link_to t('buttons.edit'), edit_contact_path(@contact), class: 'btn' %>
3
- <%= link_to t('buttons.destroy'), contact_path(@contact), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
4
- </div>
1
+ <div class="controller">
2
+ <div class="row">
3
+ <div class="span12" style="padding-bottom:20px">
4
+ <%= link_to t('buttons.edit'), edit_contact_path(@contact), class: 'btn' %>
5
+ <%= link_to t('buttons.destroy'), contact_path(@contact), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
6
+ </div>
5
7
 
6
- <div class="show span4">
7
- <b><%= t('attributes.contact.name') %></b>
8
- <%= @contact.name %>
9
- <br>
10
- <b><%= t('attributes.contact.email') %></b>
11
- <%= @contact.email %>
12
- <br>
13
- <b><%= t('attributes.contact.phone') %></b>
14
- <%= @contact.phone %>
15
- <br>
16
- <b><%= t('attributes.contact.web') %></b>
17
- <%= @contact.web %>
18
- <br>
19
- <b><%= t('attributes.contact.bank_account') %></b>
20
- <%= @contact.bank_account %>
21
- <br>
22
- <b><%= t('attributes.contact.ic') %></b>
23
- <%= @contact.ic %>
24
- <br>
25
- <b><%= t('attributes.contact.dic') %></b>
26
- <%= @contact.dic %>
27
- </div>
28
-
29
- <% if @contact.address %>
30
- <div class="show span4">
31
- <b><%= t('attributes.address.street') %></b>
32
- <%= @contact.address.street %> <%= @contact.address.street_number %>
8
+ <div class="show span4">
9
+ <b><%= t('attributes.contact.name') %></b>
10
+ <%= @contact.name %>
11
+ <br>
12
+ <b><%= t('attributes.contact.email') %></b>
13
+ <%= @contact.email %>
14
+ <br>
15
+ <b><%= t('attributes.contact.phone') %></b>
16
+ <%= @contact.phone %>
33
17
  <br>
34
- <b><%= t('attributes.address.city') %></b>
35
- <%= @contact.address.postcode %> <%= @contact.address.city %>
18
+ <b><%= t('attributes.contact.web') %></b>
19
+ <%= @contact.web %>
36
20
  <br>
37
- <b><%= t('attributes.address.city_part') %></b>
38
- <%= @contact.address.city_part %>
21
+ <b><%= t('attributes.contact.bank_account') %></b>
22
+ <%= @contact.bank_account %>
39
23
  <br>
40
- <b><%= t('attributes.address.extra_address_line') %></b>
41
- <%= @contact.address.extra_address_line %>
42
- </div>
43
- <% end %>
24
+ <b><%= t('attributes.contact.ic') %></b>
25
+ <%= @contact.ic %>
26
+ <br>
27
+ <b><%= t('attributes.contact.dic') %></b>
28
+ <%= @contact.dic %>
29
+ </div>
30
+
31
+ <% if @contact.address %>
32
+ <div class="show span4">
33
+ <b><%= t('attributes.address.street') %></b>
34
+ <%= @contact.address.street %> <%= @contact.address.street_number %>
35
+ <br>
36
+ <b><%= t('attributes.address.city') %></b>
37
+ <%= @contact.address.postcode %> <%= @contact.address.city %>
38
+ <br>
39
+ <b><%= t('attributes.address.city_part') %></b>
40
+ <%= @contact.address.city_part %>
41
+ <br>
42
+ <b><%= t('attributes.address.extra_address_line') %></b>
43
+ <%= @contact.address.extra_address_line %>
44
+ </div>
45
+ <% end %>
46
+ <div>
47
+ </div>
@@ -1,12 +1,16 @@
1
- <div class="span12" style="padding-bottom:20px">
2
- <%= link_to t('buttons.edit'), edit_currency_path(@currency), class: 'btn' %>
3
- <%= link_to t('buttons.destroy'), currency_path(@currency), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
4
- </div>
1
+ <div class="controller">
2
+ <div class="row">
3
+ <div class="span12" style="padding-bottom:20px">
4
+ <%= link_to t('buttons.edit'), edit_currency_path(@currency), class: 'btn' %>
5
+ <%= link_to t('buttons.destroy'), currency_path(@currency), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
6
+ </div>
5
7
 
6
- <div class="show span4">
7
- <b><%= t('attributes.currency.name') %>:</b>
8
- <%= @currency.name %>
9
- <br>
10
- <b><%= t('attributes.currency.symbol') %>:</b>
11
- <%= @currency.symbol %>
8
+ <div class="show span4">
9
+ <b><%= t('attributes.currency.name') %>:</b>
10
+ <%= @currency.name %>
11
+ <br>
12
+ <b><%= t('attributes.currency.symbol') %>:</b>
13
+ <%= @currency.symbol %>
14
+ </div>
15
+ </div>
12
16
  </div>
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module InvoiceBar
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
Binary file