ish_manager 0.1.8.287 → 0.1.8.288

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ish_manager/application.js +2 -2
  3. data/app/assets/stylesheets/ish_manager/application.scss +10 -2
  4. data/app/controllers/ish_manager/application_controller.rb +1 -1
  5. data/app/controllers/ish_manager/galleries_controller.rb +5 -4
  6. data/app/controllers/ish_manager/image_assets_controller.rb +10 -0
  7. data/app/controllers/ish_manager/maps_controller.rb +81 -1
  8. data/app/controllers/ish_manager/markers_controller.rb +6 -1
  9. data/app/controllers/ish_manager/sites_controller.rb +46 -48
  10. data/app/helpers/ish_manager/images_helper.rb +38 -37
  11. data/app/models/ish_manager/ability.rb +5 -2
  12. data/app/views/ish_manager/application/_debug.haml +2 -1
  13. data/app/views/ish_manager/application/_main_header_admin.haml +6 -2
  14. data/app/views/ish_manager/image_assets/index.haml +6 -0
  15. data/app/views/ish_manager/maps/_form.haml +4 -0
  16. data/app/views/ish_manager/maps/index.haml +8 -1
  17. data/app/views/ish_manager/maps/map_editor.haml +2 -17
  18. data/app/views/ish_manager/maps/show.haml +10 -2
  19. data/app/views/ish_manager/markers/_index_small.haml +28 -0
  20. data/app/views/ish_manager/photos/_meta.haml +2 -2
  21. data/app/views/ish_manager/videos/show.haml +1 -1
  22. data/app/views/layouts/ish_manager/README.txt +3 -0
  23. data/app/views/layouts/ish_manager/application.haml +1 -0
  24. data/app/views/layouts/ish_manager/application.haml-trash +40 -0
  25. data/app/views/layouts/ish_manager/application2.haml +17 -15
  26. data/config/routes.rb +5 -0
  27. data/config/systemd/system/README.txt +3 -0
  28. data/{lib/systemd/system/watch_stocks.service → config/systemd/system/stockwatcher.service} +0 -0
  29. data/config/systemd/system/watch_stocks.service +13 -0
  30. data/lib/ish_manager/engine.rb +1 -0
  31. data/lib/tasks/ish_manager_tasks.rake +7 -0
  32. data/lib/tasks/migrate.rake +16 -1
  33. metadata +74 -38
  34. data/app/controllers/ish_manager/features_controller.rb +0 -150
  35. data/app/controllers/ish_manager/option_watches_controller.rb +0 -60
  36. data/app/controllers/ish_manager/stock_watches_controller.rb +0 -63
  37. data/app/views/ish_manager/application/_main_header_admin.haml-trash +0 -21
  38. data/app/views/ish_manager/maps/index.haml-trash +0 -17
  39. data/app/views/ish_manager/option_watches/_form.haml +0 -37
  40. data/app/views/ish_manager/stock_actions/_form.haml +0 -27
  41. data/app/views/ish_manager/stock_actions/index.haml +0 -13
  42. data/app/views/ish_manager/stock_options/_form.haml +0 -22
  43. data/app/views/ish_manager/stock_options/index.haml +0 -11
  44. data/app/views/ish_manager/stock_watches/_form.haml +0 -28
  45. data/app/views/ish_manager/stock_watches/index.haml +0 -24
  46. data/app/views/layouts/ish_manager/application.haml +0 -40
  47. data/lib/tasks/warbler_tasks.rake +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 237abaf7bf4203c9e2a2f4f83b44f191f28083cc8d76a97683643446d798d14c
4
- data.tar.gz: 3a670cfeb3f49711419734dd1d28f3b241326607550d5231ad9edde1d54b560c
3
+ metadata.gz: 7a2940ad94a0e59f20f02943f0b7cb77bb28f2466e829d751e093dda92645dab
4
+ data.tar.gz: aa46582d41d8d4496af4b28746b6ef164b3181cdb3299856f07606a766519b7c
5
5
  SHA512:
6
- metadata.gz: 9d4f055b9d0af25a25a50e4d9ac256e1a350a470fdcde56bd2c923108a26446c00c8ecf0062f3131a49a56f3deb5cd5a249ee2d9abdf1d3872a5bde268ce799a
7
- data.tar.gz: 21d8017a28f7a23d24c0163ff4a8ef30acacb75797ff49a40475e75948ff9c3998bc25b1f51feef0b9b10d9448c1ca1a97c2c294824a3f097dbabd03ec0867c5
6
+ metadata.gz: bd800dc93b83766dbbf23c171cb35e2fd7cf01501a2bf41be5f7e76a24d77f75e8e332483e30176cb6dc4caeedda5aaf4fb71d7e9cd294b810dd2d5ddce64628
7
+ data.tar.gz: 7841ecdf5a818bf2ca3a10f0d7cdcdd54cc275d6d809fbf95ae12c66f8971572dfc5f13657b237b8cb1a11d13754db207b4fe1052d78ee4d05e58b036ac99a1b
@@ -42,9 +42,9 @@ $(function () {
42
42
  });
43
43
  }
44
44
 
45
- /* if ($('body').length > 0) {
45
+ if ($('body').length > 0) {
46
46
  $('select').material_select()
47
- } */
47
+ }
48
48
 
49
49
  $(".caret").each(function(idx) {
50
50
  $($(".caret")[idx]).html('')
@@ -150,6 +150,9 @@ hr {
150
150
  }
151
151
 
152
152
  /* I */
153
+ img .img-400 {
154
+ width: 400px;
155
+ }
153
156
 
154
157
  .inline {
155
158
  display: inline-block;
@@ -197,7 +200,8 @@ textarea.large {
197
200
  }
198
201
 
199
202
 
200
- .manager--main-header.development {
203
+ .manager--main-header.development,
204
+ .manager--main-header.development_production {
201
205
  background: url('/assets/bg/weather-development.png');
202
206
  }
203
207
 
@@ -252,7 +256,11 @@ ul.inline li {
252
256
  }
253
257
 
254
258
 
255
-
259
+ /* R */
260
+ .red-border {
261
+ border: 1px solid red;
262
+ padding: .2em;
263
+ }
256
264
 
257
265
  /**
258
266
  * reports
@@ -33,7 +33,7 @@ module IshManager
33
33
  @reports_list = Report.all.list
34
34
  @sites_list = Site.all.list
35
35
  @tags_list = Tag.list
36
- @user_profiles_list = Ish::UserProfile.all.list
36
+ @user_profiles_list = Ish::UserProfile.list
37
37
  @venues_list = Venue.all.list
38
38
  @videos_list = Video.all.list
39
39
  end
@@ -10,7 +10,6 @@ class IshManager::GalleriesController < IshManager::ApplicationController
10
10
  params[:gallery][:shared_profiles] = Ish::UserProfile.find params[:gallery][:shared_profiles]
11
11
  @gallery = Gallery.new params[:gallery].permit!
12
12
  @gallery.user_profile = current_user.profile
13
- @gallery.username = current_user.profile.username
14
13
  authorize! :create, @gallery
15
14
 
16
15
  if @gallery.save
@@ -40,14 +39,16 @@ class IshManager::GalleriesController < IshManager::ApplicationController
40
39
 
41
40
  def index
42
41
  authorize! :index, Gallery
43
- @galleries = Gallery.unscoped.where( :is_done.in => [false, nil], :is_trash.in => [false, nil],
44
- :user_profile => current_user.profile ).order_by( :created_at => :desc )
42
+ @galleries = Gallery.unscoped.where(
43
+ :is_done.in => [false, nil],
44
+ :is_trash.in => [false, nil],
45
+ :user_profile => current_user.profile
46
+ ).order_by( :created_at => :desc )
45
47
  if params[:q]
46
48
  @galleries = @galleries.where({ :name => /#{params[:q]}/i })
47
49
  @galleries.selector.delete('is_done')
48
50
  end
49
51
  @galleries = @galleries.page( params[:galleries_page] ).per( 10 )
50
-
51
52
  render params[:render_type]
52
53
  end
53
54
 
@@ -0,0 +1,10 @@
1
+
2
+ class IshManager::ImageAssetsController < IshManager::ApplicationController
3
+
4
+ def index
5
+ authorize! :index, Ish::ImageAsset
6
+ @image_assets = Ish::ImageAsset.all.order_by( created_at: :desc ).limit(10)
7
+ end
8
+
9
+ end
10
+
@@ -1,9 +1,11 @@
1
1
 
2
2
  class IshManager::MapsController < IshManager::ApplicationController
3
3
 
4
- before_action :set_map, only: [:destroy, :edit, :map_editor, :show, :update, ]
4
+ before_action :set_map, only: [ :destroy, :edit, :export, :map_editor, :show, :update, ] # alphabetized
5
5
  before_action :set_lists
6
6
 
7
+ # alphabetized
8
+
7
9
  def create
8
10
  @map = ::Gameui::Map.new(map_params)
9
11
 
@@ -39,6 +41,82 @@ class IshManager::MapsController < IshManager::ApplicationController
39
41
  authorize! :edit, @map
40
42
  end
41
43
 
44
+ def export
45
+ authorize! :edit, @map
46
+ result = @map.export_subtree
47
+ send_data result
48
+ end
49
+
50
+ def import
51
+ authorize! :create, Map
52
+
53
+ file_data = params[:input]
54
+ if file_data.respond_to?(:read)
55
+ contents = file_data.read
56
+ elsif file_data.respond_to?(:path)
57
+ contents = File.read(file_data.path)
58
+ else
59
+ logger.error "Bad file_data: #{file_data.class.name}: #{file_data.inspect}"
60
+ end
61
+ contents = JSON.parse contents
62
+ contents.deep_symbolize_keys!
63
+ puts! contents, 'contents'
64
+
65
+ ##
66
+ ## process content
67
+ ##
68
+ errors = []
69
+
70
+ # profiles
71
+ profiles = contents[:profiles]
72
+ contents.delete :profiles
73
+ profiles.each do |profile|
74
+ puts! profile, 'a profile'
75
+ if Ish::UserProfile.where( _id: profile[:_id] ).first
76
+ errors.push({ message: "profile #{profile[:email]} already exists." })
77
+ else
78
+ p = Profile.new({ email: profile[:email], _id: profile[:_id] })
79
+ u = User.where( email: profile[:email] ).first
80
+ if u
81
+ u.profile = p
82
+ else
83
+ u = User.new( email: profile[:email], password: rand.to_s, profile: p )
84
+ end
85
+ flag = u.save && p.save
86
+ if flag
87
+ errors.push({ message: "Profile created for #{profile[:email]}." })
88
+ else
89
+ errors.push({ message: u.errors.full_messages.join(", ") })
90
+ errors.push({ message: p.errors.full_messages.join(", ") })
91
+ end
92
+ end
93
+ end
94
+
95
+ # everything else
96
+ contents.each do |k, v|
97
+ puts! [k,v], 'k-v'
98
+ item = Map.export_key_to_class[k].constantize
99
+ v.map do |inn|
100
+ n = item.new inn
101
+ puts! n, 'n'
102
+ begin
103
+ flag = n.save
104
+ rescue Mongo::Error::OperationFailure => e
105
+ errors.push({ class: k, id: inn[:_id], messages: "Mongo::Error::OperationFailure :: |#{e.to_s}|" })
106
+ end
107
+ if flag
108
+ errors.push({ class: k, id: inn[:_id], messages: 'ok' })
109
+ else
110
+ puts! n.errors.full_messages.join(", ")
111
+ errors.push({ class: k, id: inn[:_id], messages: "Could not save: |#{n.errors.full_messages.join(", ")}|." })
112
+ end
113
+ end
114
+ end
115
+
116
+ flash[:notice] = errors
117
+ redirect_to action: :index
118
+ end
119
+
42
120
  def index
43
121
  authorize! :index, ::Gameui::Map
44
122
 
@@ -74,6 +152,7 @@ class IshManager::MapsController < IshManager::ApplicationController
74
152
  if params[:image]
75
153
  image = ::Ish::ImageAsset.new :image => params[:image]
76
154
  @map.image = image
155
+ image.save
77
156
  end
78
157
 
79
158
  @map.config = JSON.parse map_params[:config]
@@ -105,6 +184,7 @@ class IshManager::MapsController < IshManager::ApplicationController
105
184
  out
106
185
  end
107
186
 
187
+ ## @TODO: remove all instances of unscoped, everywhere.
108
188
  def set_map
109
189
  @map = ::Gameui::Map.unscoped.where(id: params[:id]).first
110
190
  @map ||= Gameui::Map.unscoped.find_by(slug: params[:id])
@@ -21,6 +21,8 @@ class IshManager::MarkersController < IshManager::ApplicationController
21
21
  @marker.map = @map
22
22
  authorize! :create_marker, @map
23
23
  @map_id = @map.id
24
+ @marker.creator_profile_id = current_user.profile.id
25
+ @marker.destination = Gameui::Map.find_by( slug: @marker.slug )
24
26
 
25
27
  if params[:image]
26
28
  @marker.image = ::Ish::ImageAsset.new :image => params[:image]
@@ -36,6 +38,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
36
38
  @marker.map.touch
37
39
  format.html { redirect_to map_path(@map), notice: 'Marker was successfully created.' }
38
40
  else
41
+ flash[:alert] = @marker.errors.full_messages
39
42
  format.html { render :new }
40
43
  end
41
44
  end
@@ -53,9 +56,11 @@ class IshManager::MarkersController < IshManager::ApplicationController
53
56
  @marker.title_image.save
54
57
  end
55
58
 
59
+ old_map = @marker.map
56
60
  respond_to do |format|
57
61
  if @marker.update(marker_params)
58
62
  @marker.map.touch
63
+ old_map.touch
59
64
  format.html { redirect_to location_map_editor_path(@map.id), notice: 'Marker was successfully updated.' }
60
65
  else
61
66
  format.html { render :edit }
@@ -81,7 +86,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
81
86
  end
82
87
 
83
88
  def set_marker
84
- @marker = ::Gameui::Marker.unscoped.find params[:id]
89
+ @marker = ::Gameui::Marker.find params[:id]
85
90
  @map = @marker.map
86
91
  end
87
92
 
@@ -1,42 +1,7 @@
1
1
 
2
2
  class IshManager::SitesController < IshManager::ApplicationController
3
3
 
4
- ## params:
5
- ## :domain, :lang, :title, :subhead, :description, :homepage_layout, :layout,
6
- ## :n_features, :n_newsitems, :newsitems_per_page, :is_trash, :is_ads_enabled,
7
- ## :is_private, :play_videos_in_preview, :private_user_emails,
8
-
9
- def index
10
- authorize! :sites_index, ::Manager
11
- @site_groups = Site.where( :is_trash => false ).order_by( :lang => :desc ).group_by {|s|s.domain}
12
- end
13
-
14
- # not trash
15
- def trash
16
- @sites = Site.unscoped.where( :is_trash => true ).order_by( :domainname => :desc, :lang => :desc )
17
- render :action => :index
18
- end
19
-
20
- def show
21
- @site = Site.unscoped.find params[:id]
22
- authorize! :show, @site
23
- @galleries = @site.galleries.page( params[:galleries_page] ).per( 10 )
24
- @reports = @site.reports.page( params[:reports_page] ).per( 10 )
25
- @videos = @site.videos.page( params[:videos_page] ).per( 5 )
26
- @tags = Tag.where( :site_id => @site.id, :parent_tag_id => nil ).page( params[:tags_page] ).per( 100 )
27
- @features = @site.features.limit( @site.n_features ) # page( params[:features_page] ).per( 9 )
28
- @newsitems = @site.newsitems.page( params[:newsitems_page] ).per( @site.newsitems_per_page )
29
- end
30
-
31
- def edit
32
- @site = Site.unscoped.find params[:id]
33
- authorize! :update, @site
34
- end
35
-
36
- def new
37
- @site = Site.new
38
- authorize! :new, @site
39
- end
4
+ # alphabetized
40
5
 
41
6
  def create
42
7
  authorize! :create, Site.new
@@ -47,21 +12,29 @@ class IshManager::SitesController < IshManager::ApplicationController
47
12
  else
48
13
  flash[:alert] = 'No Luck. ' + @site.errors.inspect
49
14
  end
15
+
50
16
  redirect_to sites_path
51
17
  end
52
18
 
53
- def update
19
+ def edit
54
20
  @site = Site.unscoped.find params[:id]
55
21
  authorize! :update, @site
22
+ end
56
23
 
57
- params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ")
24
+ def galleries
25
+ @site = Site.find params[:site_id]
26
+ authorize! :galleries_index, @site
27
+ @galleries = @site.galleries.page( params[:galleries_page] )
28
+ end
58
29
 
59
- if @site.update_attributes params[:site].permit!
60
- flash[:notice] = 'Success'
61
- else
62
- flash[:alert] = 'No Luck'
63
- end
64
- redirect_to sites_path
30
+ def index
31
+ authorize! :sites_index, ::Manager
32
+ @site_groups = Site.where( :is_trash => false ).order_by( :lang => :desc ).group_by {|s|s.domain}
33
+ end
34
+
35
+ def new
36
+ @site = Site.new
37
+ authorize! :new, @site
65
38
  end
66
39
 
67
40
  def newsitem_delete
@@ -82,10 +55,35 @@ class IshManager::SitesController < IshManager::ApplicationController
82
55
  render 'ish_manager/reports/index'
83
56
  end
84
57
 
85
- def galleries
86
- @site = Site.find params[:site_id]
87
- authorize! :galleries_index, @site
88
- @galleries = @site.galleries.page( params[:galleries_page] )
58
+ def show
59
+ @site = Site.unscoped.find params[:id]
60
+ authorize! :show, @site
61
+ @galleries = @site.galleries.page( params[:galleries_page] ).per( 10 )
62
+ @reports = @site.reports.page( params[:reports_page] ).per( 10 )
63
+ @videos = @site.videos.page( params[:videos_page] ).per( 5 )
64
+ @tags = Tag.where( :site_id => @site.id, :parent_tag_id => nil ).page( params[:tags_page] ).per( 100 )
65
+ @features = @site.features.limit( @site.n_features ) # page( params[:features_page] ).per( 9 )
66
+ @newsitems = @site.newsitems.page( params[:newsitems_page] ).per( @site.newsitems_per_page )
67
+ end
68
+
69
+ # not trash
70
+ def trash
71
+ @sites = Site.unscoped.where( :is_trash => true ).order_by( :domainname => :desc, :lang => :desc )
72
+ render :action => :index
73
+ end
74
+
75
+ def update
76
+ @site = Site.unscoped.find params[:id]
77
+ authorize! :update, @site
78
+
79
+ params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ")
80
+
81
+ if @site.update_attributes params[:site].permit!
82
+ flash[:notice] = 'Success'
83
+ else
84
+ flash[:alert] = 'No Luck'
85
+ end
86
+ redirect_to sites_path
89
87
  end
90
88
 
91
89
  #
@@ -4,27 +4,27 @@ module IshManager::ImagesHelper
4
4
  def image_doc
5
5
  image_tag 'icons/32x32/doc.png'
6
6
  end
7
-
7
+
8
8
  def image_pdf
9
9
  image_tag 'icons/32x32/pdf.png'
10
10
  end
11
-
11
+
12
12
  def image_linkedin
13
13
  image_tag 'icons/32x32/linkedin.png'
14
14
  end
15
-
15
+
16
16
  def image_facebook
17
17
  image_tag 'icons/32x32/facebook.png'
18
18
  end
19
-
19
+
20
20
  def image_twitter
21
21
  image_tag 'icons/32x32/twitter.png'
22
22
  end
23
-
23
+
24
24
  def image_github
25
25
  image_tag 'icons/32x32/github.png'
26
26
  end
27
-
27
+
28
28
  def image_email
29
29
  image_tag 'icons/32x32/email.png'
30
30
  end
@@ -37,15 +37,15 @@ module IshManager::ImagesHelper
37
37
  def image_city cityname
38
38
  image_tag 'icons/48x48/city.png'
39
39
  end
40
-
40
+
41
41
  def image_customize
42
42
  image_tag 'icons/28x28/customize.png'
43
43
  end
44
-
44
+
45
45
  def image_new_photo
46
46
  image_tag 'icons/48x48/new_photo.png'
47
47
  end
48
-
48
+
49
49
  def button_fb_login
50
50
  link_to image_tag('http://s3.amazonaws.com/ish-assets/loginWithFacebook.png'), user_omniauth_authorize_path(:facebook), :class => :fb
51
51
  end
@@ -58,19 +58,19 @@ module IshManager::ImagesHelper
58
58
  # image_tag 'icons/28x28/expand.png'
59
59
  image_tag 'icons/16x16/expand_down.png'
60
60
  end
61
-
61
+
62
62
  def image_expand_down
63
63
  image_tag 'drag.png'
64
64
  end
65
-
65
+
66
66
  def image_contact
67
67
  image_tag 'http://s3.amazonaws.com/ish-assets/contact.png', :class => :contact
68
68
  end
69
-
69
+
70
70
  def image_expand_up
71
71
  image_tag 'drag.png'
72
72
  end
73
-
73
+
74
74
  def image_ppf
75
75
  image_tag 'ppf.gif'
76
76
  end
@@ -78,7 +78,7 @@ module IshManager::ImagesHelper
78
78
  def image_new_report
79
79
  image_tag 'icons/64x64/new_report.png'
80
80
  end
81
-
81
+
82
82
  def image_ish
83
83
  # image_tag 'logo.png'
84
84
  image_tag 'ish_logo_100.png'
@@ -87,7 +87,7 @@ module IshManager::ImagesHelper
87
87
  def image_new_addritem
88
88
  image_tag 'icons/64x64/new_addritem.png'
89
89
  end
90
-
90
+
91
91
  def image_top
92
92
  image_tag('top.gif')
93
93
  end
@@ -103,27 +103,27 @@ module IshManager::ImagesHelper
103
103
  def image_extended_forms
104
104
  image_tag 'icons/64x64/extended_forms.png'
105
105
  end
106
-
106
+
107
107
  def image_close
108
108
  image_tag('close.png')
109
109
  end
110
-
110
+
111
111
  def image_email
112
112
  image_tag 'email.gif'
113
113
  end
114
-
114
+
115
115
  def image_add
116
116
  image_tag 'new.png'
117
117
  end
118
-
118
+
119
119
  def image_search args = {}
120
120
  image_tag 'icons/16x16/search.png', args
121
121
  end
122
-
122
+
123
123
  def image_cac
124
124
  s3_image_tag 'cac.png'
125
125
  end
126
-
126
+
127
127
  def image_delete
128
128
  raw('<i class="fa fa-trash"></i>')
129
129
  end
@@ -131,37 +131,37 @@ module IshManager::ImagesHelper
131
131
  def image_index
132
132
  image_tag 'icons/32x32/list.png'
133
133
  end
134
-
134
+
135
135
  def image_new
136
136
  raw('<i class="fa fa-plus-square"></i>')
137
137
  # image_tag 'icons/32x32/new.png', :alt => '[+]'
138
138
  end
139
-
139
+
140
140
  # @deprecated, should use image_3s
141
141
  def s3_image_tag input
142
142
  image_tag 'https://s3.amazonaws.com/ish-assets/' + input
143
143
  end
144
-
144
+
145
145
  def image_fb
146
146
  image_tag 'http://s3.amazonaws.com/ish-assets/loginWithFacebook.png'
147
147
  end
148
-
148
+
149
149
  def image_3s input
150
150
  image_tag 'https://s3.amazonaws.com/ish-assets/' + input
151
151
  end
152
-
152
+
153
153
  # @TODO:
154
154
  def video_thumb video
155
155
  warn 'todo wtf?'
156
156
  image_tag 'no_image.png'
157
157
  end
158
-
158
+
159
159
  #
160
160
  # missing stuff
161
161
  #
162
-
162
+
163
163
  def image_or_missing photo, size = :thumb
164
-
164
+
165
165
  if defined? photo.photo
166
166
  if defined? photo.photo.url
167
167
  if photo.photo.url == '/photos/original/missing.png'
@@ -171,21 +171,22 @@ module IshManager::ImagesHelper
171
171
  end
172
172
  end
173
173
  end
174
-
174
+
175
175
  image_missing
176
176
  end
177
-
177
+
178
+ ## This needs to be a string url, not an image_tag. _vp_ 2020-02-25
178
179
  def image_missing
179
- # image_tag 'no_photo.png'
180
+ 'missing.png'
180
181
  end
181
182
  def image_missing_tag
182
- image_missing
183
+ image_tag image_missing
183
184
  end
184
-
185
+
185
186
  def missing
186
187
  image_missing
187
188
  end
188
-
189
+
189
190
  def missing? item
190
191
  if defined? item.photo and defined? item.photo.url
191
192
  if item.photo.url == "/photos/original/missing.png"
@@ -194,7 +195,7 @@ module IshManager::ImagesHelper
194
195
  return false
195
196
  end
196
197
  end
197
-
198
+
198
199
  return true
199
200
  end
200
201
 
@@ -236,7 +237,7 @@ module IshManager::ImagesHelper
236
237
  image_tag 'icons/20x20/private.png'
237
238
  end
238
239
  end
239
-
240
+
240
241
  def edit_img
241
242
  raw('<i class="fa fa-pencil-square"></i>')
242
243
  end
@@ -34,6 +34,9 @@ class IshManager::Ability
34
34
  can [ :edit, :update ], ::Gallery do |g|
35
35
  !g.is_trash && ( g.is_public || g.user_profile == user.profile )
36
36
  end
37
+ can [ :edit, :index, :show, :update,
38
+ :new_marker, :edit_marker, :create_marker, :update_marker,
39
+ ], Gameui::Map
37
40
 
38
41
  can [ :cities_index, :home, :sites_index ], ::Manager
39
42
 
@@ -44,10 +47,10 @@ class IshManager::Ability
44
47
  !g.is_trash && ( g.is_public || g.user_profile == user.profile )
45
48
  end
46
49
 
47
- can [ :new, :show, :edit, :update, :create_newsitem, :new_feature, :create_feature, :newsitems_index ], ::Site do |site|
50
+ can [ :show, :edit, :update, :create_newsitem, :new_feature, :create_feature, :newsitems_index ], ::Site do |site|
48
51
  !site.is_private && !site.is_trash
49
52
  end
50
- can [ :manage ], ::Warbler::StockWatch
53
+ # can [ :manage ], ::Warbler::StockWatch
51
54
 
52
55
  can [ :index, :new, :create ], ::Tag
53
56
 
@@ -2,5 +2,6 @@
2
2
 
3
3
  %ul{ style: "margin: 2em;" }
4
4
  %li= params.inspect
5
+ %li= "Cached?: #{Rails.application.config.action_controller.perform_caching}"
5
6
  %li= "Cache key: #{@cache_key.inspect}" if @cache_key
6
- %li= "Cached? #{Rails.application.config.action_controller.perform_caching}"
7
+ %li= "Env: #{Rails.env}"
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- .application--main-header-admin.manager--main-header{ class: ENV['RAILS_ENV'] }
3
+ .application--main-header-admin.manager--main-header{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
4
4
  .container
5
5
  %i.fa.fa-compress.collapse-expand#collapseHeader
6
6
  .content
@@ -32,7 +32,11 @@
32
32
  = link_to '[+]', new_video_path
33
33
  %ul
34
34
  %li{ class: params[:controller] == 'ish_manager/newsitems' ? 'active' : '' }= link_to '+Newsitem', new_newsitem_path
35
- %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches', stock_watches_path
35
+ -# %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches (old m3)', stock_watches_path
36
+ %li= link_to 'Stock Watches', '/iron_warbler/stock_watches'
36
37
  %li{ :class => params[:controller] == 'ish_manager/user_profiles' ? 'active' : '' }= link_to 'Profiles', user_profiles_path
38
+ %li
39
+ = link_to "Ish::ImageAsset's", image_assets_path
40
+ %li= link_to 'GuydMe', 'https://localhost:3002'
37
41
  %hr
38
42
 
@@ -0,0 +1,6 @@
1
+
2
+ .image-assets
3
+ - @image_assets.each do |a|
4
+ .red-border
5
+ |#{a.id}| - <b>#{a.image_file_name}</b><br />
6
+ = image_tag a.image.url, class: 'img-400'
@@ -42,6 +42,10 @@
42
42
  = f.label :image
43
43
  = file_field_tag :image
44
44
  = image_tag @map.image.image.url(:thumb) rescue nil
45
+ .col.s4
46
+ .field
47
+ = f.label :creator_profile
48
+ = f.select :creator_profile, options_for_select(@user_profiles_list, selected: @current_user.profile.id)
45
49
 
46
50
  = render 'ish_manager/application/form_nonpublic', f: f, model: @map
47
51
 
@@ -3,7 +3,14 @@
3
3
  -#
4
4
 
5
5
  .maps-index
6
- %h1 Maps (#{@maps.length}) #{link_to '[+]', new_map_path}
6
+ %h1
7
+ Maps (#{@maps.length})
8
+ = link_to '[+]', new_map_path
9
+ .red-border
10
+ = form_tag import_map_path, :multipart => true do
11
+ = file_field_tag :input
12
+ = submit_tag 'Import Map'
13
+
7
14
  - @maps.each do |map|
8
15
  = render 'index_item', map: map
9
16