ish_manager 0.1.8.148 → 0.1.8.149

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: 5362b2284f03e9698acaef7778497a74736023c8
4
- data.tar.gz: 45dff6f81e282bf57807fe3ec5efb7536011a86c
3
+ metadata.gz: 927eebb21498c49dfb7d3ef57c107a357363d0d0
4
+ data.tar.gz: 47a8cca163768504c9d649e0fcc26f9ef6152411
5
5
  SHA512:
6
- metadata.gz: 8e67b029f3bec25556cc8ef6e528c5696988e92378c0d8145aff92d42429b43eed8b5277e306a330f1e977935901a9fe20b253c79499c274157d55ccf5a6f60b
7
- data.tar.gz: 49ebf0583d5a33a3dcee96958c044993793e281b42ce48710b2a1e23e6e01b05c6a0fab4f8b9bfc18b27a4ece8225185eff5670c4d294f7948b887dbff7815d4
6
+ metadata.gz: ff7a992689e15db9cc9f623933362b1948e324ea304d3f91133b2595d245b895d2c942c42bc142a1d3589ed4cd7ecd600e446c8e99243eb1100bc4aaaf92a536
7
+ data.tar.gz: b19f8fa2ab61fa0717eba4fa9fbb1439c60a9cc697f3b8e5ef6478dc1f4cc71840f74941c9bd82fab20debebba0985e24a0f4fc5963b883cc157aac7520f3598
@@ -6,7 +6,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
6
6
  authorize! :index, Gallery
7
7
  @galleries = Gallery.unscoped.where( :is_trash => false, :user_profile => current_user.profile
8
8
  ).order_by( :created_at => :desc
9
- ).page( params[:galleries_page] ).per( 10 )
9
+ ) # .page( params[:galleries_page] ).per( 10 )
10
10
  if params[:q]
11
11
  @galleries = @galleries.where({ :name => /#{params[:q]}/i })
12
12
  end
@@ -14,21 +14,20 @@ class IshManager::GalleriesController < IshManager::ApplicationController
14
14
  @shared_galleries = current_user.profile.shared_galleries.unscoped.where( :is_trash => false ).page( params[:shared_galleries_page] ).per( 10 )
15
15
  end
16
16
 
17
- ## same as index
18
- # def index_title
19
- # end
20
-
17
+ =begin
18
+ def index_title
19
+ end
21
20
  def index_thumb
22
21
  @galleries = Gallery.unscoped.where( :is_trash => false
23
22
  ).order_by( :created_at => :desc
24
23
  ).page( params[:galleries_page] ).per( 10 )
25
24
  end
26
-
27
25
  def index_mini
28
26
  @galleries = Gallery.unscoped.where( :is_trash => false
29
27
  ).order_by( :created_at => :desc
30
28
  ).page( params[:galleries_page] ).per( 10 )
31
29
  end
30
+ =end
32
31
 
33
32
  def new
34
33
  @gallery = Gallery.new
@@ -5,7 +5,7 @@ class IshManager::InvoicesController < IshManager::ApplicationController
5
5
 
6
6
  def index
7
7
  authorize! :index, Ish::Invoice
8
- @invoices = Ish::Invoice.all
8
+ @invoices = Ish::Invoice.all.includes( :payments )
9
9
  end
10
10
 
11
11
  def new
@@ -0,0 +1,9 @@
1
+
2
+ class IshManager::PaymentsController < IshManager::ApplicationController
3
+
4
+ def index
5
+ authorize! :index, Ish::Payment
6
+ @payments = Ish::Payment.all.includes( :invoice )
7
+ end
8
+
9
+ end
@@ -7,20 +7,22 @@
7
7
 
8
8
  = render 'ish_manager/sites/header', :site => @site if @site
9
9
 
10
- .container
10
+ .title
11
11
  .row
12
- .col-sm-6
13
- %h4
14
- My Galleries (#{@galleries.count})
15
- = link_to '[+]', new_gallery_path
16
- .col-sm-6= render 'search'
17
- .row
18
- .col-sm-12
19
- -# = render 'ish_manager/galleries/menu_secondary'
20
- = render 'ish_manager/galleries/list', :galleries => @galleries, :param_name => :galleries_page
21
-
22
- .container
23
- .row
24
- .col-sm-12
25
- %h4 Shared with me
26
- = render 'ish_manager/galleries/list', :galleries => @shared_galleries, :param_name => :shared_galleries_page
12
+ .col-sm-12.col-md-12
13
+ %h1.center Galleries
14
+ %ul
15
+ %li= link_to 'titles list', galleries_index_titles_path( :render_type => Gallery::RENDER_THUMBS )
16
+ %li= link_to 'thumbs list', galleries_index_thumbs_path( :render_type => Gallery::RENDER_TITLES )
17
+
18
+ .row
19
+ .col-sm-12.col-md-6
20
+ %h4 My Galleries (#{@galleries.count}) #{link_to '[+]', new_gallery_path}
21
+ = render 'search'
22
+ - if params[:render_type] == Gallery::RENDER_TITLES
23
+ = render 'ish_manager/galleries/index_title', :galleries => @galleries, :param_name => :galleries_page
24
+ - else
25
+ = render 'ish_manager/galleries/list', :galleries => @galleries, :param_name => :galleries_page
26
+ .col-sm-12.col-md-6
27
+ %h4 Shared with me
28
+ = render 'ish_manager/galleries/list', :galleries => @shared_galleries, :param_name => :shared_galleries_page
@@ -2,20 +2,19 @@
2
2
  - url = invoice.persisted? ? invoice_path( invoice.id ) : invoices_path
3
3
 
4
4
  = form_for invoice, :as => :invoice, :url => url do |f|
5
- -# .input-field
6
- %label email
7
- = text_field_tag :email
8
- .a
9
- %label profile
10
- = f.select :profile, options_for_select( IshModels::UserProfile.all.map{ |p| [ p.email, p.id ] } )
11
-
12
- %label amount
13
- = f.number_field :amount, :step => 0.01, :default => 0.0
5
+ .input-field
6
+ %label Email
7
+ = f.text_field :email
14
8
 
15
- %label number
16
- = f.number_field :number
9
+ .input-field
10
+ %label amount
11
+ = f.number_field :amount, :step => 0.01, :default => 0.0
17
12
 
18
- .a
13
+ .input-field
14
+ %label number
15
+ = f.number_field :number
16
+
17
+ .input-field
19
18
  %label Description
20
19
  = f.text_area :description
21
20
 
@@ -1,4 +1,8 @@
1
1
 
2
+ -#
3
+ -# invoices / index.haml
4
+ -#
5
+
2
6
  %h3
3
7
  Invoices
4
8
  = link_to '[+]', new_invoice_path
@@ -8,12 +12,19 @@
8
12
  = render 'form', :invoice => @new_invoice
9
13
  %hr
10
14
 
11
- %ul
12
- - @invoices.each do |i|
13
- %li
14
- .panel
15
- .panel-content
16
- .a Number: #{i.number}
17
- .a Email: #{i.profile.email}
18
- .a Amount: #{i.amount}
19
- .a Payments: #{i.payments.map { |p| p.amount }.join(", ") }
15
+ %table#dataTable
16
+ %thead
17
+ %tr
18
+ %th Email
19
+ %th Number
20
+ %th Amount
21
+ %th Amount Paid
22
+ %th Created At
23
+ %tbody
24
+ - @invoices.each do |i|
25
+ %tr
26
+ %td= i.email
27
+ %td= i.number
28
+ %td= i.amount
29
+ %td= i.paid_amount
30
+ %td= i.created_at.to_s[0..10]
@@ -0,0 +1,21 @@
1
+
2
+ -#
3
+ -# payments / index.haml
4
+ -#
5
+
6
+ %h1 Payments
7
+
8
+ %table#dataTable
9
+ %thead
10
+ %tr
11
+ %th Amount
12
+ %th Charge
13
+ %th Invoice
14
+ %th Created At
15
+ %tbody
16
+ - @payments.each do |p|
17
+ %tr
18
+ %td= p.amount
19
+ %td #{p.charge.to_s.length} characters
20
+ %td #{p.invoice.email} :: #{p.invoice.number}
21
+ %td= p.created_at.to_s[0..10]
data/config/routes.rb CHANGED
@@ -21,12 +21,14 @@ IshManager::Engine.routes.draw do
21
21
  resources :feature
22
22
  resources :friends
23
23
 
24
+ get 'galleries/index_titles', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_TITLES }
25
+ get 'galleries/index_thumbs', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
24
26
  resources :galleries do
25
27
  post 'multiadd', :to => 'photos#j_create', :as => :multiadd
26
28
  end
27
29
 
28
30
  resources :invoices do
29
- resources :payments
31
+ # resources :payments
30
32
  end
31
33
 
32
34
  get 'leads', :to => 'leads#index', :defaults => { :is_done => false }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.148
4
+ version: 0.1.8.149
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-11 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -165,6 +165,7 @@ files:
165
165
  - app/controllers/ish_manager/leads_controller.rb
166
166
  - app/controllers/ish_manager/newsitems_controller.rb
167
167
  - app/controllers/ish_manager/orders_controller.rb
168
+ - app/controllers/ish_manager/payments_controller.rb
168
169
  - app/controllers/ish_manager/photos_controller.rb
169
170
  - app/controllers/ish_manager/reports_controller.rb
170
171
  - app/controllers/ish_manager/sites_controller.rb
@@ -235,11 +236,9 @@ files:
235
236
  - app/views/ish_manager/galleries/edit.haml
236
237
  - app/views/ish_manager/galleries/index.haml
237
238
  - app/views/ish_manager/galleries/index_ajax.haml
238
- - app/views/ish_manager/galleries/index_mini.haml
239
239
  - app/views/ish_manager/galleries/index_short.haml
240
240
  - app/views/ish_manager/galleries/index_thumb.haml
241
241
  - app/views/ish_manager/galleries/index_title.haml
242
- - app/views/ish_manager/galleries/index_trash.haml
243
242
  - app/views/ish_manager/galleries/new.haml
244
243
  - app/views/ish_manager/galleries/show.haml
245
244
  - app/views/ish_manager/invoices/_form.haml
@@ -263,6 +262,7 @@ files:
263
262
  - app/views/ish_manager/newsitems/index.haml
264
263
  - app/views/ish_manager/newsitems/new.haml
265
264
  - app/views/ish_manager/orders/index.haml
265
+ - app/views/ish_manager/payments/index.haml
266
266
  - app/views/ish_manager/photos/_meta.haml
267
267
  - app/views/ish_manager/photos/_multinew.haml
268
268
  - app/views/ish_manager/photos/show.haml
File without changes
@@ -1,20 +0,0 @@
1
-
2
- %ol.galleries-index
3
- - @galleries.each do |g|
4
- %li
5
- = link_to '[~]', edit_manager_gallery_path( g )
6
- = link_to g.name, manager_gallery_path( g.galleryname )
7
- = link_to '[+]', new_photo_path( :galleryname => g.galleryname )
8
- = link_to '[++]', add_photos_path( g.id )
9
- .delete= button_to '[x]', manager_gallery_path( g.galleryname ), :method => :delete
10
- .site= g.site.domain unless g.site.blank?
11
- .tag= g.tag.name unless g.tag.blank?
12
-
13
- %br
14
- - g.photos.fresh.each_with_index do |ph, idx|
15
- - break if idx == Photo.n_per_manager_gallery - 1
16
- = link_to image_tag( ph.photo.url( :mini ), :alt => '' ), ph.photo.url(:large), :rel => "lightbox[#{g.galleryname}]"
17
-
18
- .c
19
- - unless params[:fullindex]
20
- = paginate @galleries, :param_name => :galleries_page