ish_manager 0.1.8.243 → 0.1.8.244

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
  SHA256:
3
- metadata.gz: 9ea7280723a81047ae129c4bc0de3b3c3c0329aeb69f10c260ca8a9f5a159d27
4
- data.tar.gz: 9319e58a879bc865678839607091684c5a529f2ab62788cbedc904ab14bc5e70
3
+ metadata.gz: 63fbcf375a430c186dd0bfca172e3b5826a7bbc417d252eb3e3960af2d7e86bf
4
+ data.tar.gz: 19314dbe96dc251ea4bd6cfadc466d9a7f4123de691ba8ca61619976d00ed860
5
5
  SHA512:
6
- metadata.gz: d4ef061a68c19be3792a144506adbc1df91e8cfcf0e234ad3a7476391687a1baf34f46e960bbc7c0df03319b24abfb0a451e7d6b6c2155429363742350d95a84
7
- data.tar.gz: d4049361f28d18b007f4fb042243d4b612e30bba6d81f75223874b76c64f2790147e7abd6fd77f8a4598e23e2a117f63815761d3c510526ad666cfd36713540e
6
+ metadata.gz: 74dbbf731cdf117c165a7ec7fa8117c3425559ef1848ffc22342dc597fd0c6e440c43ef1e1c6b0dfa730e642888de1485d18ed192e15065ece9eb198e4412865
7
+ data.tar.gz: 48a6f72e6bfa6f8260b1c8d25c1639665d1cc097a2ac90bb0548652836e4415e888879a593fd3d78b3d1991db8b7ae413ad355cd463586b45ee42c1854e254b1
@@ -3,9 +3,12 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
3
3
 
4
4
  def new
5
5
  @newsitem = Newsitem.new
6
- @sites = Site.list
7
- @cities = City.list
8
- @tags = Tag.list
6
+
7
+ @cities_list = City.list
8
+ @maps_list = ::Gameui::Map.list
9
+ @sites_list = Site.list
10
+ @tags_list = Tag.list
11
+
9
12
  if params[:city_id]
10
13
  @city = City.find params[:city_id]
11
14
  @newsitem.city = @city
@@ -30,6 +33,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
30
33
  @resource ||= Tag.find params[:tag_id] if params[:tag_id]
31
34
  @resource ||= Tag.find params[:newsitem][:tag_id] if !params[:newsitem][:tag_id].blank?
32
35
  @resource ||= IshModels::UserProfile.find params[:newsitem][:user_profile_id] if !params[:newsitem][:user_profile_id].blank?
36
+ @resource ||= ::Gameui::Map.find params[:newsitem][:map_id] if !params[:newsitem][:map_id].blank?
33
37
  @resource.newsitems << @newsitem
34
38
 
35
39
  authorize! :create_newsitem, @resource
@@ -52,7 +56,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
52
56
  else
53
57
  root_path
54
58
  end
55
-
59
+
56
60
  flag = @newsitem.save && @resource.save
57
61
  if flag
58
62
  @resource.touch
@@ -66,7 +70,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
66
70
  render :action => :new
67
71
  end
68
72
  end
69
-
73
+
70
74
  def destroy
71
75
  authorize! :destroy, Newsitem
72
76
  if params[:city_id]
@@ -121,7 +125,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
121
125
  end
122
126
  authorize! :update, @newsitem
123
127
  flag = @newsitem.update_attributes params[:newsitem].permit!
124
-
128
+
125
129
  if flag
126
130
  flash[:notice] = 'Success'
127
131
  else
@@ -130,7 +134,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
130
134
 
131
135
  redirect_to url
132
136
  end
133
-
137
+
134
138
  def edit
135
139
  out = Gallery.unscoped.where( :is_trash => false, :user_profile => current_user.profile ).order_by( :created_at => :desc )
136
140
  @galleries_list = [['', nil]] + out.map { |item| [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ] }
@@ -144,7 +148,7 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
144
148
  @newsitem = @city.newsitems.find( params[:id] )
145
149
  end
146
150
  authorize! :edit, @newsitem
147
-
151
+
148
152
  end
149
153
 
150
154
  def index
@@ -37,4 +37,6 @@
37
37
  %a{id: "large_#{photo.id}" }
38
38
  .float-left= button_to '[x]', photo_path( :id => photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
39
39
  = link_to "large", photo.photo.url(:large)
40
+ &nbsp;|&nbsp;
41
+ = link_to "original", photo.photo.url(:original)
40
42
  .wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
@@ -12,7 +12,7 @@
12
12
  - @map.errors.full_messages.each do |message|
13
13
  %li= message
14
14
 
15
-
15
+
16
16
  .row
17
17
  .col-md-3
18
18
  .field
@@ -32,7 +32,8 @@
32
32
  = f.number_field :h
33
33
  .field
34
34
  = f.label :description
35
- = f.text_field :description
35
+ = f.text_area :description, class: 'tinymce'
36
+
36
37
  .field
37
38
  = f.label :img_path
38
39
  = f.text_field :img_path
@@ -4,5 +4,6 @@
4
4
  .a= button_to '~', edit_map_path(map), method: :get
5
5
  .a <b>#{map.w}x#{map.h}_#{map.slug}</b>
6
6
  .a= button_to '+marker', new_map_marker_path(map), method: :get
7
+ .a= button_to '+newsitem', new_map_newsitem_path(map), method: :get
7
8
  .a= link_to '[api]', api_map_path(map)
8
9
  .a= button_to 'x', map_path(map), method: :delete, data: { confirm: 'Are you sure?' }
@@ -3,17 +3,4 @@
3
3
  %h1 Maps #{link_to '[+]', new_map_path}
4
4
  - @maps.each do |map|
5
5
  .item
6
- .col
7
- = render 'map_flat_row', map: map
8
- %p= map.description
9
- = image_tag map.img_path, width: 400
10
- .col
11
- .row
12
- .a Markers (#{map.markers.length})
13
- .a #{button_to '+', new_map_marker_path(map), method: :get}
14
- %ul.markers
15
- - map.markers.each do |marker|
16
- %li
17
- = marker.slug
18
- = link_to '[~]', edit_marker_path(marker)
19
-
6
+ = render 'map_meta_row', map: map
@@ -0,0 +1,17 @@
1
+
2
+ .maps-index
3
+ %h1 Maps #{link_to '[+]', new_map_path}
4
+ - @maps.each do |map|
5
+ .item
6
+ .col
7
+ = render 'map_meta_row', map: map
8
+ .col
9
+ .row
10
+ .a Markers (#{map.markers.length})
11
+ .a #{button_to '+', new_map_marker_path(map), method: :get}
12
+ %ul.markers
13
+ - map.markers.each do |marker|
14
+ %li
15
+ = marker.slug
16
+ = link_to '[~]', edit_marker_path(marker)
17
+
@@ -1,13 +1,16 @@
1
1
 
2
2
  .maps-show
3
- = render 'map_flat_row', map: @map
4
- .descr= @map.description
3
+ = render 'map_meta_row', map: @map
4
+ %p.addToggle Description [<>]
5
+ .descr= raw @map.description
5
6
 
7
+ %p.addToggle The Map [<>]
6
8
  .the-map
7
9
  = image_tag @map.img_path, width: @map.w
8
10
  - @map.markers.each do |marker|
9
11
  .marker{ style: "position: absolute; left: #{marker.x}px; top: #{marker.y}px;" }= image_tag marker.img_path
10
12
 
13
+ %p.addToggle Markers (#{@map.markers.count}) [<>]
11
14
  .markers-list
12
15
  - @map.markers.each do |marker|
13
16
  .item
@@ -18,3 +21,9 @@
18
21
  .a= link_to '[api]', api_marker_path(marker)
19
22
  %ul.bullets
20
23
  %li <b>item_type:</b> #{marker.item_type}
24
+
25
+ %p.addToggle Newsitems (#{@map.newsitems.count}) [<>]
26
+ .newsitems-list
27
+ - @map.newsitems.each do |newsitem|
28
+ .item
29
+ = newsitem.inspect
@@ -2,17 +2,21 @@
2
2
  = form_for newsitem, :html => { :multipart => true } do |f|
3
3
  .row
4
4
  .col-sm-6{ style: 'border-right: 1px solid red;' }
5
+ %br
6
+ = f.label :map
7
+ = f.select :map_id, options_for_select( @maps_list, selected:( @map ? @map.id : params[:map_id] || nil ) )
8
+ %br
5
9
  = f.label :site
6
- = f.select :site_id, options_for_select( @sites_list, :selected => ( @site ? @site.id : nil ) )
10
+ = f.select :site_id, options_for_select( @sites_list, :selected => ( @site ? @site.id : params[:site_id] || nil ) )
7
11
  %br
8
12
  = f.label :city
9
- = f.select :city_id, options_for_select( @cities_list, :selected => ( @city ? @city.id : nil ) )
13
+ = f.select :city_id, options_for_select( @cities_list, :selected => ( @city ? @city.id : params[:city_id] || nil ) )
10
14
  %br
11
15
  = f.label :tag
12
- = f.select :tag_id, options_for_select( @tags_list, (@tag||Tag.new).id )
16
+ = f.select :tag_id, options_for_select( @tags_list, selected:( @tag ? @tag.id : params[:tag_id] || nil ) )
13
17
  %br
14
18
  = f.label :user_profile
15
- = f.select :user_profile_id, options_for_select( @user_profiles_list )
19
+ = f.select :user_profile_id, options_for_select( @user_profiles_list, selected: ( @user_profile ? @user_profile.id : params[:user_profile_id] || nil ) )
16
20
 
17
21
  .col-sm-6
18
22
  = f.label :name
@@ -33,7 +37,7 @@
33
37
  = f.label :report
34
38
  = f.select :report_id, options_for_select( @reports_list, :selected => @newsitem.report_id )
35
39
  .a
36
-
40
+
37
41
  .a
38
42
  = f.submit :submit
39
-
43
+
data/config/routes.rb CHANGED
@@ -16,7 +16,7 @@ IshManager::Engine.routes.draw do
16
16
  end
17
17
 
18
18
  resources :covered_calls
19
-
19
+
20
20
  resources :email_templates
21
21
  resources :events
22
22
 
@@ -27,12 +27,12 @@ IshManager::Engine.routes.draw do
27
27
  get 'galleries/index_titles', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_TITLES }
28
28
  get 'galleries/index_thumbs', :to => 'galleries#index', :defaults => { :render_type => Gallery::RENDER_THUMBS }
29
29
  get 'galleries/shared', to: 'galleries#shared_with_me', defaults: { render_type: Gallery::RENDER_THUMBS }
30
- get 'galleries/shared_titles', to: 'galleries#shared_with_me', defaults: { render_type: Gallery::RENDER_TITLES
30
+ get 'galleries/shared_titles', to: 'galleries#shared_with_me', defaults: { render_type: Gallery::RENDER_TITLES
31
31
  }, as: :galleries_shared_titles
32
32
  resources :galleries do
33
33
  post 'multiadd', :to => 'photos#j_create', :as => :multiadd
34
34
  end
35
-
35
+
36
36
  resources :invoices do
37
37
  # resources :payments
38
38
  end
@@ -45,6 +45,7 @@ IshManager::Engine.routes.draw do
45
45
  scope 'gameui' do
46
46
  resources 'maps' do
47
47
  resources 'markers'
48
+ resources 'newsitems'
48
49
  end
49
50
  resources 'markers' # redundant
50
51
  end
@@ -59,7 +60,7 @@ IshManager::Engine.routes.draw do
59
60
  resources :photos
60
61
  resources :payments
61
62
  ## profiles, see user_profiles
62
-
63
+
63
64
  resources :reports
64
65
 
65
66
  resources :sites do
@@ -75,7 +76,7 @@ IshManager::Engine.routes.draw do
75
76
  resources :videos
76
77
  resources :tags
77
78
  end
78
-
79
+
79
80
  # resources :stock_actions
80
81
  # resources :stock_options
81
82
  resources :stock_watches
@@ -98,5 +99,5 @@ IshManager::Engine.routes.draw do
98
99
 
99
100
  resources :venues
100
101
  resources :videos
101
-
102
+
102
103
  end
@@ -50,7 +50,7 @@ namespace :ish_manager do
50
50
  end
51
51
  =end
52
52
 
53
- desc 'watch the stocks 2, and trigger actions - not alphavantage, tda now. 2021-08-08'
53
+ desc 'watch the stocks, and trigger actions - not alphavantage, tda now. 2021-08-08'
54
54
  task watch_stocks: :environment do
55
55
  while true
56
56
  stocks = Ish::StockWatch.where( :notification_type => :EMAIL )
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.243
4
+ version: 0.1.8.244
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-08 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -285,9 +285,10 @@ files:
285
285
  - app/views/ish_manager/leads/index.haml
286
286
  - app/views/ish_manager/leads/new.haml
287
287
  - app/views/ish_manager/maps/_form.haml
288
- - app/views/ish_manager/maps/_map_flat_row.haml
288
+ - app/views/ish_manager/maps/_map_meta_row.haml
289
289
  - app/views/ish_manager/maps/edit.haml
290
290
  - app/views/ish_manager/maps/index.haml
291
+ - app/views/ish_manager/maps/index.haml-trash
291
292
  - app/views/ish_manager/maps/new.haml
292
293
  - app/views/ish_manager/maps/show.haml
293
294
  - app/views/ish_manager/markers/_form.haml