ish_manager 0.1.8.141 → 0.1.8.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3090e1d4074c2b01099f187c22521cc4a2c147d
4
- data.tar.gz: e52ec43b445ba034d373e1d2a1b90bbbc7914299
3
+ metadata.gz: 5914b12b2e0f8a249356ed9e644b8dcf4cf13a0a
4
+ data.tar.gz: fe87201127aa62bd4e18acca648f902adbc31120
5
5
  SHA512:
6
- metadata.gz: 7a99d95e9c39f4fd4b9f5fe09e37ba29e13b69b5df9fe8e7a3335a1bb74b6682961402c28d1411f71805eb902e0388d6994bda70f96d06036d723f32bacad293
7
- data.tar.gz: 9a4a36f56b37769ce4bfbcd037badc68fc26f43a42043d313c00dd771480977728b5efaef396fa44f59a06394e704f291774342a52f3c87d1cec7a3fad8ecddc
6
+ metadata.gz: 3dd3ed70db13e6eabac9187f65b418babb6f2583afde700fbbcf90a51d425c7e936f6a0780aaf0782dce145d6ee45e573dcc5fa0585df98bd4cf036781d0698e
7
+ data.tar.gz: e6cc64a1d0ad4b2b1f907c7c7bc4a88c5a5cf50178c610a10b45d8ccdf1392b5154ebe78e91e7153bd319bd28fd783698b3893fb33ab4dcd672cfe3a5bce6129
@@ -10,7 +10,7 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require ish_manager/jquery-3.2.1.min
13
+ // require ish_manager/jquery-3.2.1.min
14
14
  //= require ish_manager/bootstrap.min
15
15
  //= require ish_manager/jquery.iframe-transport
16
16
  //= require ish_manager/jquery.ui.widget
@@ -29,6 +29,7 @@ $(function () {
29
29
  });
30
30
 
31
31
  $(document).ready(function () {
32
+
32
33
  $('*[data-confirm]').click(function(){
33
34
  return confirm($(this).attr('data-confirm'));
34
35
  });
@@ -40,8 +41,10 @@ $(document).ready(function () {
40
41
  plugins: 'link'
41
42
  });
42
43
  }
43
-
44
- $('select').material_select()
44
+
45
+ if ($('body#application').length > 0) {
46
+ $('select').material_select()
47
+ }
45
48
 
46
49
  $(".caret").each(function(idx) {
47
50
  $($(".caret")[idx]).html('')
@@ -89,5 +92,12 @@ $(document).ready(function () {
89
92
  $(".content", mainFooterContext).css("display", 'none')
90
93
  }
91
94
 
95
+ $('#dataTable').DataTable({
96
+ pageLength: 10,
97
+ lengthMenu: [[10, 25, 100, -1], [10, 25, 100, 'All']],
98
+ lengthChange: true,
99
+ "aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]]
100
+ });
101
+
92
102
  });
93
103
 
@@ -47,7 +47,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
47
47
  @city.profile_photo = photo
48
48
  end
49
49
  if @city.save
50
- ::IshModels::CacheKey.one.update_attributes( :cities => Time.now )
50
+ ::IshModels::CacheKey.one.update_attributes( :cities => Time.now, :feature_cities => Time.now )
51
51
  flash[:notice] = 'Success'
52
52
  redirect_to edit_city_path @city.id
53
53
  else
@@ -8,6 +8,7 @@ class IshManager::LeadsController < IshManager::ApplicationController
8
8
  else
9
9
  @leads = @leads.where( :is_done => false )
10
10
  end
11
+ render :layout => 'ish_manager/application_no_materialize'
11
12
  end
12
13
 
13
14
  def new
@@ -6,6 +6,10 @@ class IshManager::VenuesController < IshManager::ApplicationController
6
6
  def index
7
7
  authorize! :venues_index, ::Manager
8
8
  @venues = Venue.all
9
+ if params[:city_id]
10
+ @resource = @city = City.find params[:city_id]
11
+ @venues = @venues.where( :city => @city )
12
+ end
9
13
  end
10
14
 
11
15
  def new
@@ -30,6 +34,7 @@ class IshManager::VenuesController < IshManager::ApplicationController
30
34
  end
31
35
 
32
36
  def update
37
+ params[:venue][:tag_ids].delete ''
33
38
  @resource = @venue = Venue.find params[:id]
34
39
  authorize! :update, @venue
35
40
  update_profile_pic
@@ -49,6 +54,18 @@ class IshManager::VenuesController < IshManager::ApplicationController
49
54
  redirect_to :action => :edit, :id => @venue.id
50
55
  end
51
56
 
57
+ def destroy
58
+ @venue = Venue.unscoped.find params[:id]
59
+ venue_name = @venue.name
60
+ authorize! :delete, @venue
61
+ if @venue.destroy
62
+ flash[:notice] = "Deleted venue #{venue_name}"
63
+ else
64
+ flash[:alert] = "Cannot delete venue: #{@venue.errors.messages}"
65
+ end
66
+ redirect_to venues_path
67
+ end
68
+
52
69
  end
53
70
 
54
71
 
@@ -125,8 +125,7 @@ module IshManager::ImagesHelper
125
125
  end
126
126
 
127
127
  def image_delete
128
- # image_tag 'delete.png'
129
- '[x]'
128
+ raw('<i class="fa fa-trash"></i>')
130
129
  end
131
130
 
132
131
  def image_index
@@ -27,7 +27,8 @@
27
27
  Videos (#{@city.videos.count})
28
28
  %li
29
29
  = link_to image_new, new_city_venue_path( @city )
30
- Venues (#{@city.venues.count})
30
+ = link_to 'Venues', venues_path( :city_id => @city.id )
31
+ (#{@city.venues.count})
31
32
  %li
32
33
  = link_to image_new, new_city_event_path( @city )
33
34
  = link_to 'Events', city_events_path( @city )
@@ -5,9 +5,17 @@
5
5
  .input-field
6
6
  = f.label :email
7
7
  = f.text_field :email
8
+
8
9
  .input-field
9
10
  = f.label :job_url
10
11
  = f.text_field :job_url
12
+ .input-field
13
+ = f.label :company_url
14
+ = f.text_field :company_url
15
+ .input-field
16
+ = f.label :yelp_url
17
+ = f.text_field :yelp_url
18
+
11
19
  .input-field
12
20
  = f.label :company
13
21
  = f.text_field :company
@@ -2,23 +2,32 @@
2
2
  .manager--leads-index
3
3
  %h5
4
4
  = link_to 'Leads', leads_path
5
- (#{@leads.count})
6
5
  = link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
7
- = link_to '(done)', done_leads_path
6
+ = link_to '[done]', done_leads_path
8
7
 
9
- %table
10
- %tr
11
- %th &nbsp;
12
- %th Created At
13
- %th Company
14
- %th Email
15
- %th Job Url
16
- %th Description
17
- - @leads.each do |lead|
8
+ %table#dataTable
9
+ %thead
18
10
  %tr
19
- %td= link_to raw('<i class="fa fa-play"></i>'), lead_path( lead )
20
- %td= pretty_date lead.created_at
21
- %td= lead.company
22
- %td= link_to raw('<i class="fa fa-envelope"></i>'), "mailto:#{lead.email}"
23
- %td= link_to raw('<i class="fa fa-user-md"></i>'), lead.job_url, :target => '_blank'
24
- %td= lead.description
11
+ %th &nbsp;
12
+ %th Created At
13
+ %th Company
14
+ %th Tag
15
+ %th Phone
16
+ %th Email
17
+ %th Job Url
18
+ %th Company Url
19
+ %th Yelp Url
20
+ %th Description
21
+ %tbody
22
+ - @leads.each do |lead|
23
+ %tr
24
+ %td= link_to raw('<i class="fa fa-play"></i>'), lead_path( lead )
25
+ %td= pretty_date lead.created_at
26
+ %td= lead.company
27
+ %td= lead.tag
28
+ %td= lead.phone
29
+ %td= link_to raw('<i class="fa fa-envelope"></i>'), "mailto:#{lead.email}"
30
+ %td= link_to raw('<i class="fa fa-user-md"></i>'), lead.job_url, :target => '_blank'
31
+ %td= lead.company_url
32
+ %td= lead.yelp_url
33
+ %td= lead.description
@@ -16,7 +16,7 @@
16
16
  .card
17
17
  .card-content
18
18
  = link_to '[~]', edit_report_path( report )
19
- = link_to '[x]', report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
19
+ .float-left= button_to '[x]', report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
20
20
  - if report.is_public
21
21
  %i.material-icons visibility
22
22
  - else
@@ -7,10 +7,18 @@
7
7
  .col-sm-6
8
8
  = f.label :name_seo
9
9
  = f.text_field :name_seo
10
-
11
- .a
12
- = f.label :descr
13
- = f.text_area :descr, :class => [ :tinymce ]
10
+
11
+ .row
12
+ .col-sm-6
13
+ = f.label :subhead
14
+ = f.text_area :subhead
15
+ .col-sm-6
16
+ = render 'profile_pic', :resource => venue
17
+
18
+ .row
19
+ .col-sm-12
20
+ = f.label :descr
21
+ = f.text_area :descr, :class => [ :tinymce ]
14
22
 
15
23
  .row
16
24
  .col-sm-6
@@ -21,10 +29,12 @@
21
29
  .row
22
30
  .col-xs-6= f.text_field :x
23
31
  .col-xs-6= f.text_field :y
24
-
32
+
25
33
  .row
26
34
  .col-sm-6
27
- = render 'profile_pic', :resource => venue
28
-
29
- .b
30
- = f.submit
35
+ = f.label :tags
36
+ = f.select :tag_ids, options_for_select( @tags_list, :selected => venue.tag_ids ), {}, { :multiple => true }
37
+
38
+ .row
39
+ .col-sm-12
40
+ = f.submit
@@ -1,15 +1,10 @@
1
1
 
2
- .manager-venues--index
3
- %h2
4
- Venues (#{venues.length})
5
- = link_to '[+]', new_venue_path
6
- %ol
7
- - venues.each do |venue|
8
- %li
9
- = link_to '[~]', edit_venue_path( venue )
10
- .float-left= button_to '[x]', venue_path( venue ), :method => 'delete', :html => { :confirm => 'Are you sure?' }
11
- = link_to venue.name, venue_path( venue )
12
- %br
13
- %br
14
- .clearfix
15
- %hr
2
+ %ol
3
+ - venues.each do |venue|
4
+ %li
5
+ = link_to image_edit, edit_venue_path( venue )
6
+ .float-left= button_to '[x]', venue_path( venue ), :method => 'delete', :data => { :confirm => 'Are you sure?' }
7
+ = link_to venue.name, venue_path( venue )
8
+ %br
9
+ %br
10
+ .clearfix
@@ -1,3 +1,9 @@
1
1
 
2
- = render :partial => 'index', :locals => { :venues => @venues }
3
-
2
+ .manager-venues--index
3
+ %h2
4
+ Venues (#{@venues.length})
5
+ - if @resource
6
+ in #{link_to @resource.name, resource_path( @resource )}
7
+ = link_to image_new, new_venue_path
8
+ = render 'index', :venues => @venues
9
+ %hr
@@ -6,17 +6,20 @@
6
6
  %meta{ :name => :viewport, :content => 'width=device-width, initial-scale=1.0' }
7
7
  %meta{ :charset => 'UTF-8' }
8
8
  %meta{ :description => 'some description' }
9
- %script{ :src => "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" }
10
- %script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
11
- %script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
12
- = stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
9
+ %script{ :src => "//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" }
10
+ -# %script{ :src => "//code.jquery.com/jquery-3.3.1.slim.min.js" }
11
+ %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
12
+ %script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
13
+ %script{ :src => "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" }
14
+ = stylesheet_link_tag "//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"
15
+ = stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
13
16
  = stylesheet_link_tag "ish_manager/application", media: "all"
14
17
  = stylesheet_link_tag "ish_manager/materialize", media: "all"
15
18
  = stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
16
19
  = javascript_include_tag "ish_manager/application"
17
20
  = javascript_include_tag "ish_manager/materialize"
18
21
  = csrf_meta_tags
19
- %body
22
+ %body#application
20
23
  .bg-white
21
24
  - role = current_user ? current_user.profile.role_name : ''
22
25
  = render :partial => "ish_manager/application/main_header_#{role}"
@@ -9,13 +9,17 @@
9
9
  %script{ :src => "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" }
10
10
  %script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
11
11
  %script{ :src => "https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js" }
12
+ %script{ :src => "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" }
13
+ = stylesheet_link_tag "//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"
12
14
  = stylesheet_link_tag "ish_manager/application", media: "all"
13
15
  = stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
16
+ = stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
14
17
  = javascript_include_tag "ish_manager/application"
15
18
  = csrf_meta_tags
16
- %body
19
+ %body#application_no_materialize
17
20
  .bg-white
18
- = render :partial => 'ish_manager/application/main_header'
21
+ - role = current_user ? current_user.profile.role_name : ''
22
+ = render :partial => "ish_manager/application/main_header_#{role}"
19
23
  .container
20
24
  .row
21
25
  .col-sm-12
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.141
4
+ version: 0.1.8.142
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-10 00:00:00.000000000 Z
11
+ date: 2018-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails