ish_manager 0.1.8.294 → 0.1.8.298
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/ish_manager/application.scss +32 -6
- data/app/controllers/ish_manager/galleries_controller.rb +15 -13
- data/app/controllers/ish_manager/videos_controller.rb +1 -1
- data/app/views/ish_manager/application/_form_errors.haml +2 -5
- data/app/views/ish_manager/application/_main_header_admin.haml +2 -0
- data/app/views/ish_manager/maps/_form.haml +27 -3
- data/app/views/ish_manager/maps/show.haml +6 -22
- data/app/views/ish_manager/markers/_form.haml +18 -12
- data/app/views/ish_manager/markers/_header.haml +8 -0
- data/app/views/ish_manager/markers/_index.haml +18 -0
- data/app/views/ish_manager/newsitems/_header.haml +3 -0
- data/app/views/ish_manager/newsitems/_index.haml +2 -16
- data/app/views/ish_manager/newsitems/_item.haml +28 -24
- data/app/views/ish_manager/tags/_form.haml +4 -0
- metadata +5 -12
- data/app/assets/images/bg/weather-development.png~ +0 -0
- data/app/views/ish_manager/trash/option_watches-trash/_form.haml +0 -37
- data/app/views/ish_manager/trash/stock_actions/_form.haml +0 -27
- data/app/views/ish_manager/trash/stock_actions/index.haml +0 -13
- data/app/views/ish_manager/trash/stock_options/_form.haml +0 -22
- data/app/views/ish_manager/trash/stock_options/index.haml +0 -11
- data/app/views/ish_manager/trash/stock_watches/_form.haml +0 -28
- data/app/views/ish_manager/trash/stock_watches/index.haml +0 -24
- data/app/views/layouts/ish_manager/application.haml-trash +0 -40
- data/lib/tasks/warbler_tasks.rake-trash +0 -69
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 633c637aedac1a994211764707c2ebad1b69cd97410a1c90451f77c8a1cc3485
|
4
|
+
data.tar.gz: b4ca5ba260cb3476de1f41c5b2cce4d0bf70c4bb92cf632b297a17cd1af61e21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5ebf371b3be78b358e86b7b9745e8bb8d939eecf0bc34b3ef8248fbe5e8cf33844fa66947ac65e68ecc39000ff67eb9bc6b1e1b1d37a2ad31b3c21805b56452
|
7
|
+
data.tar.gz: c9cf963d8c86ae4e06dfd9067dd7d7a19decfe0aac69ea56f70ed7eb7ff59deea83f9326bc6f8d55edd6bb06d3bcedc77d9ccf95dfe55d4cdaa15025a36c6aa0
|
@@ -62,8 +62,13 @@ ul:not(.browser-default).bullets, {
|
|
62
62
|
|
63
63
|
/* A */
|
64
64
|
|
65
|
-
.addToggle
|
66
|
-
|
65
|
+
.addToggle::after {
|
66
|
+
content: " [<>]";
|
67
|
+
}
|
68
|
+
.addToggle {
|
69
|
+
+ * {
|
70
|
+
display: none;
|
71
|
+
}
|
67
72
|
}
|
68
73
|
.alert {
|
69
74
|
border: 1px solid yellow;
|
@@ -92,11 +97,19 @@ ul:not(.browser-default).bullets, {
|
|
92
97
|
padding: .5em;
|
93
98
|
border-radius: 8px;
|
94
99
|
margin-bottom: .5em;
|
100
|
+
padding: 0.5em;
|
95
101
|
}
|
96
102
|
|
97
103
|
|
98
104
|
/* C */
|
99
105
|
|
106
|
+
.Card {
|
107
|
+
border: 1px solid gray;
|
108
|
+
border-radius: 8px;
|
109
|
+
display: inline-block;
|
110
|
+
margin-bottom: .5em;
|
111
|
+
}
|
112
|
+
|
100
113
|
.center {
|
101
114
|
text-align: center;
|
102
115
|
}
|
@@ -111,8 +124,17 @@ ul:not(.browser-default).bullets, {
|
|
111
124
|
|
112
125
|
/* D */
|
113
126
|
/* E */
|
127
|
+
.error_explanation {
|
128
|
+
border: 1px solid red;
|
129
|
+
padding: .8em;
|
130
|
+
}
|
131
|
+
|
114
132
|
/* F */
|
115
133
|
|
134
|
+
.--form {
|
135
|
+
margin-bottom: 2em;
|
136
|
+
}
|
137
|
+
|
116
138
|
.flat-row {
|
117
139
|
display: flex;
|
118
140
|
flex-direction: row;
|
@@ -226,6 +248,13 @@ textarea.large {
|
|
226
248
|
display: inline;
|
227
249
|
}
|
228
250
|
|
251
|
+
/* N */
|
252
|
+
|
253
|
+
.notice {
|
254
|
+
border: 1px solid green;
|
255
|
+
padding: .8em;
|
256
|
+
}
|
257
|
+
|
229
258
|
/* P */
|
230
259
|
.panel-content {
|
231
260
|
padding: .5em;
|
@@ -246,10 +275,7 @@ ul.inline li {
|
|
246
275
|
padding-right: 1em;
|
247
276
|
}
|
248
277
|
|
249
|
-
|
250
|
-
border: 1px solid green;
|
251
|
-
padding: .8em;
|
252
|
-
}
|
278
|
+
|
253
279
|
|
254
280
|
.youtube_img {
|
255
281
|
width: 100px;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class IshManager::GalleriesController < IshManager::ApplicationController
|
2
2
|
|
3
3
|
before_action :set_lists
|
4
|
+
before_action :set_gallery, only: %w|destroy edit j_show show update|
|
4
5
|
|
5
6
|
# alphabetized! : )
|
6
7
|
|
@@ -24,7 +25,6 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def destroy
|
27
|
-
@gallery = Gallery.unscoped.find params[:id]
|
28
28
|
authorize! :destroy, @gallery
|
29
29
|
@gallery.is_trash = true
|
30
30
|
@gallery.save
|
@@ -33,27 +33,25 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def edit
|
36
|
-
@gallery = Gallery.unscoped.find params[:id]
|
37
36
|
authorize! :edit, @gallery
|
38
37
|
end
|
39
38
|
|
40
39
|
def index
|
41
40
|
authorize! :index, Gallery
|
42
41
|
@galleries = Gallery.unscoped.where(
|
43
|
-
:is_done.in => [false, nil],
|
44
|
-
:is_trash.in => [false, nil],
|
45
|
-
:user_profile => current_user.profile
|
42
|
+
# :is_done.in => [false, nil],
|
43
|
+
# :is_trash.in => [false, nil],
|
44
|
+
# :user_profile => current_user.profile
|
46
45
|
).order_by( :created_at => :desc )
|
47
46
|
if params[:q]
|
48
47
|
@galleries = @galleries.where({ :name => /#{params[:q]}/i })
|
49
|
-
@galleries.selector.delete('is_done')
|
48
|
+
# @galleries.selector.delete('is_done')
|
50
49
|
end
|
51
50
|
@galleries = @galleries.page( params[:galleries_page] ).per( 10 )
|
52
51
|
render params[:render_type]
|
53
52
|
end
|
54
53
|
|
55
54
|
def j_show
|
56
|
-
@gallery = Gallery.unscoped.find( params[:id] )
|
57
55
|
authorize! :show, @gallery
|
58
56
|
respond_to do |format|
|
59
57
|
format.json do
|
@@ -82,18 +80,12 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
82
80
|
end
|
83
81
|
|
84
82
|
def show
|
85
|
-
begin
|
86
|
-
@gallery = Gallery.unscoped.find_by :slug => params[:id]
|
87
|
-
rescue
|
88
|
-
@gallery = Gallery.unscoped.find params[:id]
|
89
|
-
end
|
90
83
|
authorize! :show, @gallery
|
91
84
|
@photos = @gallery.photos.unscoped.where({ :is_trash => false })
|
92
85
|
@deleted_photos = @gallery.photos.unscoped.where({ :is_trash => true })
|
93
86
|
end
|
94
87
|
|
95
88
|
def update
|
96
|
-
@gallery = Gallery.unscoped.find params[:id]
|
97
89
|
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
98
90
|
authorize! :update, @gallery
|
99
91
|
|
@@ -116,5 +108,15 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
116
108
|
end
|
117
109
|
end
|
118
110
|
|
111
|
+
private
|
112
|
+
|
113
|
+
def set_gallery
|
114
|
+
begin
|
115
|
+
@gallery = Gallery.unscoped.find_by :slug => params[:id]
|
116
|
+
rescue
|
117
|
+
@gallery = Gallery.unscoped.find params[:id]
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
119
121
|
end
|
120
122
|
|
@@ -91,7 +91,7 @@ class IshManager::VideosController < IshManager::ApplicationController
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def show
|
94
|
-
@video = Video.unscoped.where( :youtube_id => params[:youtube_id] ).first
|
94
|
+
@video = Video.unscoped.where( :youtube_id => params[:youtube_id] ).first if params[:youtube_id].present?
|
95
95
|
@video ||= Video.unscoped.find params[:id]
|
96
96
|
authorize! :show, @video
|
97
97
|
|
@@ -1,7 +1,4 @@
|
|
1
1
|
|
2
2
|
- if item.errors.any?
|
3
|
-
.
|
4
|
-
|
5
|
-
%ul
|
6
|
-
- item.errors.full_messages.each do |msg|
|
7
|
-
%li= msg
|
3
|
+
.error_explanation
|
4
|
+
= "#{pluralize(item.errors.count, "error")} prohibited this map from being saved: #{item.errors.full_messages.join(", ")}."
|
@@ -30,6 +30,8 @@
|
|
30
30
|
= form_tag videos_path, method: :get do
|
31
31
|
= text_field_tag :q
|
32
32
|
= link_to '[+]', new_video_path
|
33
|
+
%li{ :class => params[:controller] == 'ish_manager/tags' ? 'active' : '' }
|
34
|
+
= link_to 'Tags', tags_path
|
33
35
|
%ul
|
34
36
|
%li{ class: params[:controller] == 'ish_manager/newsitems' ? 'active' : '' }= link_to '+Newsitem', new_newsitem_path
|
35
37
|
-# %li{ :class => params[:controller] == 'ish_manager/stock_watches' ? 'active' : '' }= link_to 'Stock Watches (old m3)', stock_watches_path
|
@@ -4,7 +4,11 @@
|
|
4
4
|
|
5
5
|
- url = params[:action] == 'new' ? maps_path : map_path(@map.id)
|
6
6
|
|
7
|
-
|
7
|
+
|
8
|
+
= form_for @map, :html => { :multipart => true, class: '--form maps--form' }, url: url do |f|
|
9
|
+
.actions
|
10
|
+
= f.submit 'Save'
|
11
|
+
|
8
12
|
- if @map.errors.any?
|
9
13
|
#error_explanation
|
10
14
|
%h2= "#{pluralize(@map.errors.count, "error")} prohibited this map from being saved:"
|
@@ -49,6 +53,11 @@
|
|
49
53
|
|
50
54
|
= render 'ish_manager/application/form_nonpublic', f: f, model: @map
|
51
55
|
|
56
|
+
|
57
|
+
.row
|
58
|
+
= f.label :tags
|
59
|
+
= f.select :tag_ids, @tags_list, {}, { multiple: true }
|
60
|
+
|
52
61
|
.field
|
53
62
|
= f.label :description
|
54
63
|
= f.text_area :description, class: 'tinymce'
|
@@ -66,7 +75,22 @@
|
|
66
75
|
= f.label "Config"
|
67
76
|
= f.text_area :config, class: 'large'
|
68
77
|
%pre.small
|
69
|
-
|
70
|
-
|
78
|
+
:plain
|
79
|
+
description.collapsible: bool
|
80
|
+
map_panel_type: "Equirectangular" |
|
81
|
+
"MapPanel" | "MapPanelNoZoom" |
|
82
|
+
"ThreePanelV1" | "ThreePanelV4" |
|
83
|
+
"GoogleMaps"
|
84
|
+
.row
|
85
|
+
.col.s6
|
86
|
+
.google-maps.row
|
87
|
+
.col.s4
|
88
|
+
= f.label "x, y"
|
89
|
+
.col.s4
|
90
|
+
= f.text_field :x
|
91
|
+
.col.s4
|
92
|
+
= f.text_field :y
|
93
|
+
.col.s6
|
94
|
+
unused
|
71
95
|
.actions
|
72
96
|
= f.submit 'Save'
|
@@ -4,13 +4,12 @@
|
|
4
4
|
|
5
5
|
.maps-show
|
6
6
|
= render 'map_meta_row', map: @map
|
7
|
-
%p.addToggle Description
|
7
|
+
%p.addToggle Description
|
8
8
|
.descr= raw @map.description
|
9
9
|
|
10
10
|
%p.addToggle
|
11
11
|
The Map (#{@map.w}x#{@map.h})
|
12
12
|
= link_to 'Map Editor', location_map_editor_path(@map.id)
|
13
|
-
[<>]
|
14
13
|
.the-map
|
15
14
|
= image_tag @map.image.image.url(:original) rescue nil
|
16
15
|
- @markers.each do |marker|
|
@@ -21,28 +20,13 @@
|
|
21
20
|
- else
|
22
21
|
= image_missing_tag
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- if marker.title_image
|
29
|
-
= image_tag marker.title_image.image.url(:original)
|
30
|
-
- else
|
31
|
-
= image_missing_tag
|
32
|
-
.flat-row
|
33
|
-
.a= marker.slug
|
34
|
-
.a= button_to '~', edit_marker_path(marker), method: :get
|
35
|
-
.a= button_to 'x', marker_path(marker), method: :delete, data: { confirm: 'Are you sure?' }
|
36
|
-
.a= link_to '[api]', api_marker_path(marker)
|
37
|
-
.a= link_to '[this map]', edit_map_path(marker.slug)
|
38
|
-
.hide
|
39
|
-
%ul.bullets
|
40
|
-
%li <b>item_type:</b> #{marker.item_type}
|
41
|
-
|
42
|
-
%p.addToggle Newsitems (#{@map.newsitems.count}) [<>]
|
23
|
+
= render 'ish_manager/markers/header', markers: @markers, map: @map
|
24
|
+
= render 'ish_manager/markers/index', markers: @markers, map: @map
|
25
|
+
|
26
|
+
%p.addToggle= render 'ish_manager/newsitems/header', newsitems: @map.newsitems
|
43
27
|
= render 'ish_manager/newsitems/index', newsitems: @map.newsitems
|
44
28
|
|
45
|
-
%p.addToggle Maps (#{@maps.count})
|
29
|
+
%p.addToggle Maps (#{@maps.count})
|
46
30
|
.maps-list
|
47
31
|
- @maps.each do |m|
|
48
32
|
.item
|
@@ -5,18 +5,12 @@
|
|
5
5
|
|
6
6
|
-# @TODO: can I not have this url at all?
|
7
7
|
- url = %w|new create|.include?(params[:action]) ? markers_path : marker_path(@marker.id)
|
8
|
+
|
8
9
|
.markers--form
|
9
10
|
= form_for @marker, :html => { :multipart => true }, url: url do |f|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
- if @marker.errors.any?
|
14
|
-
#error_explanation
|
15
|
-
%p= "#{pluralize(@marker.errors.count, "error")} prohibited this map from being saved:"
|
16
|
-
%ul.errors
|
17
|
-
- @marker.errors.full_messages.each do |message|
|
18
|
-
%li= message
|
19
|
-
|
11
|
+
= render 'ish_manager/application/form_errors', item: @marker
|
12
|
+
.actions
|
13
|
+
= f.submit 'Save'
|
20
14
|
.row
|
21
15
|
.col.s1
|
22
16
|
= f.label :map
|
@@ -87,5 +81,17 @@
|
|
87
81
|
= f.check_box :is_active
|
88
82
|
= f.label :is_active
|
89
83
|
.col.s6
|
90
|
-
|
91
|
-
|
84
|
+
unused
|
85
|
+
.row
|
86
|
+
.col.s6
|
87
|
+
.google-maps.row
|
88
|
+
.col.s4
|
89
|
+
= f.label "x, y"
|
90
|
+
.col.s4
|
91
|
+
= f.text_field :x
|
92
|
+
.col.s4
|
93
|
+
= f.text_field :y
|
94
|
+
.col.s6
|
95
|
+
unused
|
96
|
+
.actions
|
97
|
+
= f.submit 'Save'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
.markers--index
|
3
|
+
- markers.each do |marker|
|
4
|
+
.Card
|
5
|
+
- if marker.title_image
|
6
|
+
= image_tag marker.title_image.image.url(:original)
|
7
|
+
- else
|
8
|
+
= image_missing_tag
|
9
|
+
.flex-row
|
10
|
+
.a= marker.slug
|
11
|
+
.a= button_to '~', edit_marker_path(marker), method: :get
|
12
|
+
.a= button_to 'x', marker_path(marker), method: :delete, data: { confirm: 'Are you sure?' }
|
13
|
+
.flex-row
|
14
|
+
.a= link_to '[api]', api_marker_path(marker)
|
15
|
+
.a= link_to '[this map]', edit_map_path(marker.slug)
|
16
|
+
.hide
|
17
|
+
%ul.bullets
|
18
|
+
%li <b>item_type:</b> #{marker.item_type}
|
@@ -5,23 +5,9 @@
|
|
5
5
|
- newsitems = newsitems.page( params[:newsitems_page] ).per( 10 )
|
6
6
|
|
7
7
|
.manager-newsitems--index
|
8
|
-
%h5 Newsitems (#{newsitems.count}) #{link_to image_new, new_newsitem_path }
|
9
8
|
= paginate newsitems, :param_name => :newsitems_page, :views_prefix => 'ish_manager'
|
10
9
|
- newsitems.each do |n|
|
11
|
-
|
12
|
-
|
13
|
-
%ul
|
14
|
-
%li
|
15
|
-
.float-left= link_to '[~]', edit_newsitem_path(n)
|
16
|
-
.float-left= button_to '[x]', newsitem_path( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
17
|
-
Name: #{n.name}
|
18
|
-
%li Desc: #{n.descr}
|
19
|
-
%li Created at: #{n.created_at}
|
20
|
-
%li Report id: #{n.report_id}
|
21
|
-
%li Gallery id: #{n.gallery_id}
|
22
|
-
%li username: #{n.username}
|
23
|
-
- if n.photo
|
24
|
-
%li Photo id: #{n.photo.id}
|
25
|
-
= render 'ish_manager/newsitems/item', :newsitem => n
|
10
|
+
= render 'ish_manager/newsitems/item', :newsitem => n
|
11
|
+
|
26
12
|
= paginate newsitems, :param_name => :newsitems_page, :views_prefix => 'ish_manager'
|
27
13
|
|
@@ -1,9 +1,16 @@
|
|
1
|
+
|
2
|
+
-#
|
3
|
+
-# ish_manager / newsitems / _item.haml
|
4
|
+
-#
|
5
|
+
|
1
6
|
- n ||= newsitem
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
.
|
7
|
+
|
8
|
+
.card.newsitems--item{ class: n.item_type }
|
9
|
+
.card-content
|
10
|
+
.float-left= link_to '[~]', edit_newsitem_path(n)
|
11
|
+
.float-left= button_to '[x]', newsitem_path( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
12
|
+
|
13
|
+
- if !n.photo.blank?
|
7
14
|
.the-photo
|
8
15
|
- if n.photo.gallery.blank?
|
9
16
|
= link_to image_tag( n.photo.photo.url(:small) ), n.photo.photo.url(:large), :rel => 'lightbox[newsitem]'
|
@@ -11,8 +18,7 @@
|
|
11
18
|
= link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.slug, n.photo.gallery.photos.index(n.photo) )
|
12
19
|
.meta= render 'ish_manager/photos/meta', :photo => n.photo
|
13
20
|
|
14
|
-
|
15
|
-
.Nreport.newsitem-report
|
21
|
+
- if n.report
|
16
22
|
%ul
|
17
23
|
%li <b>Report</b> #{n.report.id}
|
18
24
|
%li Premium Tier #{n.report.premium_tier}
|
@@ -26,9 +32,7 @@
|
|
26
32
|
.subhead= n.report.subhead
|
27
33
|
.c
|
28
34
|
|
29
|
-
|
30
|
-
.Ngallery
|
31
|
-
|
35
|
+
- if !n.gallery.blank?
|
32
36
|
%h3= link_to n.gallery.name, gallery_path(n.gallery.slug, 0)
|
33
37
|
.meta
|
34
38
|
#{t('newsitems.gallery', :username => n.gallery.username, :date => pretty_date(n.gallery.created_at))}
|
@@ -43,20 +47,20 @@
|
|
43
47
|
.thumbnails
|
44
48
|
- n.gallery.photos.where( :is_trash => false )[0...8].each do |photo|
|
45
49
|
= link_to image_tag( photo.photo.url(:thumb), :alt => photo.name ), photo.photo.url(:small), :rel => "lightbox[#{n.gallery.slug}]"
|
46
|
-
.c
|
47
50
|
|
48
|
-
- if n.video_id
|
49
|
-
- video = Video.unscoped.find n.video_id
|
50
|
-
.Nvideo
|
51
|
-
= link_to video.video.url, video.video.url
|
52
|
-
-# %h3= link_to (video.name.blank? ? t('videos.no_title') : video.name), video_path(video.youtube_id)
|
53
|
-
= render 'ish_manager/application/meta', :item => video
|
54
|
-
= render 'ish_manager/videos/embed_half', :video => video
|
55
|
-
.c
|
56
51
|
|
57
|
-
|
58
|
-
|
59
|
-
.
|
60
|
-
|
61
|
-
|
52
|
+
- if n.video_id
|
53
|
+
- video = Video.unscoped.find n.video_id
|
54
|
+
.a
|
55
|
+
= link_to video.video.url, video.video.url
|
56
|
+
-# %h3= link_to (video.name.blank? ? t('videos.no_title') : video.name), video_path(video.youtube_id)
|
57
|
+
= render 'ish_manager/application/meta', :item => video
|
58
|
+
= render 'ish_manager/videos/embed_half', :video => video
|
59
|
+
.c
|
60
|
+
|
61
|
+
- if !n.descr.blank? && n.gallery.blank? && n.report.blank?
|
62
|
+
.Ndescr.panel
|
63
|
+
.meta= pretty_date n.created_at
|
64
|
+
.subhead= simple_format n.descr
|
65
|
+
.c
|
62
66
|
|
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.
|
4
|
+
version: 0.1.8.298
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -205,7 +205,6 @@ files:
|
|
205
205
|
- app/assets/images/bg/gplaypattern.png
|
206
206
|
- app/assets/images/bg/triangular.png
|
207
207
|
- app/assets/images/bg/weather-development.png
|
208
|
-
- app/assets/images/bg/weather-development.png~
|
209
208
|
- app/assets/images/bg/weather.png
|
210
209
|
- app/assets/images/favicon.gif
|
211
210
|
- app/assets/images/icons/10x10_red-cross.png
|
@@ -366,10 +365,13 @@ files:
|
|
366
365
|
- app/views/ish_manager/maps/new.haml
|
367
366
|
- app/views/ish_manager/maps/show.haml
|
368
367
|
- app/views/ish_manager/markers/_form.haml
|
368
|
+
- app/views/ish_manager/markers/_header.haml
|
369
|
+
- app/views/ish_manager/markers/_index.haml
|
369
370
|
- app/views/ish_manager/markers/_index_small.haml
|
370
371
|
- app/views/ish_manager/markers/edit.haml
|
371
372
|
- app/views/ish_manager/markers/new.haml
|
372
373
|
- app/views/ish_manager/newsitems/_form.haml
|
374
|
+
- app/views/ish_manager/newsitems/_header.haml
|
373
375
|
- app/views/ish_manager/newsitems/_index.haml
|
374
376
|
- app/views/ish_manager/newsitems/_item.haml
|
375
377
|
- app/views/ish_manager/newsitems/edit.haml
|
@@ -406,13 +408,6 @@ files:
|
|
406
408
|
- app/views/ish_manager/tags/index.haml
|
407
409
|
- app/views/ish_manager/tags/new.haml
|
408
410
|
- app/views/ish_manager/tags/show.haml
|
409
|
-
- app/views/ish_manager/trash/option_watches-trash/_form.haml
|
410
|
-
- app/views/ish_manager/trash/stock_actions/_form.haml
|
411
|
-
- app/views/ish_manager/trash/stock_actions/index.haml
|
412
|
-
- app/views/ish_manager/trash/stock_options/_form.haml
|
413
|
-
- app/views/ish_manager/trash/stock_options/index.haml
|
414
|
-
- app/views/ish_manager/trash/stock_watches/_form.haml
|
415
|
-
- app/views/ish_manager/trash/stock_watches/index.haml
|
416
411
|
- app/views/ish_manager/user_profiles/_form.haml
|
417
412
|
- app/views/ish_manager/user_profiles/edit.haml
|
418
413
|
- app/views/ish_manager/user_profiles/index.haml
|
@@ -444,7 +439,6 @@ files:
|
|
444
439
|
- app/views/ish_manager/videos/show.haml
|
445
440
|
- app/views/layouts/ish_manager/README.txt
|
446
441
|
- app/views/layouts/ish_manager/application.haml
|
447
|
-
- app/views/layouts/ish_manager/application.haml-trash
|
448
442
|
- app/views/layouts/ish_manager/application2.haml
|
449
443
|
- app/views/layouts/ish_manager/application_no_material.haml
|
450
444
|
- config/routes.rb
|
@@ -456,7 +450,6 @@ files:
|
|
456
450
|
- lib/ish_manager/version.rb
|
457
451
|
- lib/tasks/ish_manager_tasks.rake
|
458
452
|
- lib/tasks/migrate.rake
|
459
|
-
- lib/tasks/warbler_tasks.rake-trash
|
460
453
|
homepage: http://wasya.co
|
461
454
|
licenses:
|
462
455
|
- MIT
|
Binary file
|
@@ -1,37 +0,0 @@
|
|
1
|
-
|
2
|
-
- if option_watch.persisted?
|
3
|
-
.float-left= button_to '[X]', option_watch_path(option_watch.id), method: :delete, data: { confirm: 'Are you sure?' }
|
4
|
-
|
5
|
-
|
6
|
-
- url = option_watches_path if !option_watch.persisted?
|
7
|
-
- url = option_watch_path( option_watch ) if option_watch.persisted?
|
8
|
-
|
9
|
-
= form_for option_watch, :url => url, :html => { :class => 'form-inline well' } do |f|
|
10
|
-
.flex-row
|
11
|
-
.form-group
|
12
|
-
= f.label :action
|
13
|
-
= f.select :action, options_for_select( Warbler::StockWatch::ACTIONS.map{|a|[a,a]}, :selected => option_watch.action )
|
14
|
-
.form-group
|
15
|
-
= f.label :profile
|
16
|
-
= f.select :profile, options_for_select( [[nil,nil]]+@profiles.map{|p|[p.email,p.id]}, :selected => option_watch.profile ? option_watch.profile.id : nil )
|
17
|
-
.form-group
|
18
|
-
%label.control-label When
|
19
|
-
= f.text_field :ticker, :class => 'form-control', :placeholder => 'ticker'
|
20
|
-
.form-group
|
21
|
-
%label.control-label Type
|
22
|
-
= f.select :contractType, options_for_select( [['none',nil],['PUT', 'PUT'], ['CALL', 'CALL']], :selected => option_watch.contractType )
|
23
|
-
.form-group
|
24
|
-
%label.control-label On date
|
25
|
-
= f.text_field :date, :class => 'form-control', :placeholder => 'date'
|
26
|
-
.form-group
|
27
|
-
%label.control-label Strike
|
28
|
-
= f.number_field :strike, :step => 0.01, :placeholder => "0.01"
|
29
|
-
.form-group
|
30
|
-
%label.control-label Is
|
31
|
-
= f.select :direction, options_for_select( Warbler::StockWatch::DIRECTIONS.map{|d|[d,d]}, :selected => option_watch.direction )
|
32
|
-
.form-group
|
33
|
-
%label.control-label Price
|
34
|
-
= f.number_field :price, :step => 0.01, :placeholder => "0.01"
|
35
|
-
.form-group
|
36
|
-
= f.submit ">", :class => %w(btn blue)
|
37
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
-#
|
3
|
-
-# ish_manager / stock_actions / _form
|
4
|
-
-#
|
5
|
-
|
6
|
-
- url = stock_actions_path if !stock_action.persisted?
|
7
|
-
- url = stock_action_path( stock_action ) if stock_action.persisted?
|
8
|
-
|
9
|
-
- if stock_action.profile
|
10
|
-
Belongs to #{stock_action.profile.email}
|
11
|
-
= form_for stock_action, :url => url, :html => { :class => 'form-inline well' } do |f|
|
12
|
-
.form-group
|
13
|
-
%label.control-label Active?
|
14
|
-
= f.check_box :is_active
|
15
|
-
.form-group
|
16
|
-
- which_selected = stock_action.stock_watch ? stock_action.stock_watch.id : nil
|
17
|
-
%label.control-label When stock watch
|
18
|
-
= f.select :stock_watch, options_for_select( @stock_watches_list, :selected => which_selected )
|
19
|
-
.form-group
|
20
|
-
%label.control-label Sell options
|
21
|
-
- @stock_options_list.each do |item|
|
22
|
-
- checked = stock_action.stock_options.map(&:id).include?(item[1])
|
23
|
-
.stock-option
|
24
|
-
= f.check_box :stock_options, { :multiple => true, :checked => checked }, item[1], nil
|
25
|
-
= item[0]
|
26
|
-
.form-group
|
27
|
-
= f.submit ">", :class => %w(btn blue)
|
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
%h4 Stock Actions
|
3
|
-
|
4
|
-
%p <b>Note:</b> a stock option cannot belong to two actions.
|
5
|
-
|
6
|
-
%hr
|
7
|
-
- @stock_actions.each do |stock_action|
|
8
|
-
= render 'form', :stock_action => stock_action
|
9
|
-
|
10
|
-
%hr
|
11
|
-
%h5 New
|
12
|
-
= render 'form', :stock_action => @stock_action
|
13
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
|
2
|
-
- url = stock_options_path if !stock_option.persisted?
|
3
|
-
- url = stock_options_path( stock_option ) if stock_option.persisted?
|
4
|
-
|
5
|
-
- if stock_option.profile
|
6
|
-
Belongs to #{stock_option.profile.email}
|
7
|
-
= form_for stock_option, :url => url, :html => { :class => 'form-inline well' } do |f|
|
8
|
-
.form-group
|
9
|
-
= f.text_field :ticker, :class => 'form-control', :placeholder => 'ticker'
|
10
|
-
.form-group
|
11
|
-
= f.text_field :expires_on, :class => 'form-control', :placeholder => 'YYYYMMDD' # :placeholder => 'MON(TH) DD YYYY'
|
12
|
-
.form-group
|
13
|
-
%label.control-label $
|
14
|
-
= f.number_field :strike, :step => 0.01, :class => 'form-control', :placeholder => '0.01'
|
15
|
-
.form-group
|
16
|
-
%label.control-label CALL/PUT?
|
17
|
-
= f.select :direction, options_for_select( Ish::StockOption::DIRECTIONS.map{|d|[d,d]}, :selected => stock_option.direction )
|
18
|
-
.form-group
|
19
|
-
%label.control-label quantity:
|
20
|
-
= f.number_field :quantity, :placeholder => 0
|
21
|
-
.form-group
|
22
|
-
= f.submit ">", :class => %w(btn blue)
|
@@ -1,28 +0,0 @@
|
|
1
|
-
|
2
|
-
- if stock_watch.persisted?
|
3
|
-
.float-left= button_to '[X]', stock_watch_path(stock_watch.id), method: :delete, data: { confirm: 'Are you sure?' }
|
4
|
-
|
5
|
-
|
6
|
-
- url = stock_watches_path if !stock_watch.persisted?
|
7
|
-
- url = stock_watch_path( stock_watch ) if stock_watch.persisted?
|
8
|
-
|
9
|
-
= form_for stock_watch, :url => url, :html => { :class => 'form-inline well' } do |f|
|
10
|
-
.flex-row
|
11
|
-
.form-group
|
12
|
-
= f.label :action
|
13
|
-
= f.select :action, options_for_select( Warbler::StockWatch::ACTIONS.map{|a|[a,a]}, :selected => stock_watch.action )
|
14
|
-
.form-group
|
15
|
-
= f.label :profile
|
16
|
-
= f.select :profile, options_for_select( [[nil,nil]]+@profiles.map{|p|[p.email,p.id]}, :selected => stock_watch.profile ? stock_watch.profile.id : nil )
|
17
|
-
.form-group
|
18
|
-
%label.control-label When
|
19
|
-
= f.text_field :ticker, :class => 'form-control', :placeholder => 'ticker'
|
20
|
-
.form-group
|
21
|
-
%label.control-label Price
|
22
|
-
= f.select :direction, options_for_select( Warbler::StockWatch::DIRECTIONS.map{|d|[d,d]}, :selected => stock_watch.direction )
|
23
|
-
.form-group
|
24
|
-
%label.control-label $
|
25
|
-
= f.number_field :price, :step => 0.01, :placeholder => "0.01"
|
26
|
-
.form-group
|
27
|
-
= f.submit ">", :class => %w(btn blue)
|
28
|
-
|
@@ -1,24 +0,0 @@
|
|
1
|
-
|
2
|
-
%h4 Stock Watches
|
3
|
-
|
4
|
-
- @stock_watches.each do |stock|
|
5
|
-
%hr
|
6
|
-
= render 'form', :stock_watch => stock
|
7
|
-
|
8
|
-
%hr
|
9
|
-
%h5 New
|
10
|
-
= render 'form', :stock_watch => @stock_watch
|
11
|
-
|
12
|
-
|
13
|
-
%hr
|
14
|
-
%hr
|
15
|
-
|
16
|
-
%h4 Option Watches
|
17
|
-
|
18
|
-
- @option_watches.each do |option|
|
19
|
-
%hr
|
20
|
-
= render 'ish_manager/option_watches/form', option_watch: option
|
21
|
-
|
22
|
-
%hr
|
23
|
-
%h5 New
|
24
|
-
= render 'ish_manager/option_watches/form', option_watch: @option_watch
|
@@ -1,40 +0,0 @@
|
|
1
|
-
!!!
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%title Ish Manager
|
5
|
-
%link{ :rel => 'icon', :href => "/favicon_#{ENV['RAILS_ENV']}.gif" }
|
6
|
-
%meta{ :name => :viewport, :content => 'width=device-width, initial-scale=1.0' }
|
7
|
-
%meta{ :charset => 'UTF-8' }
|
8
|
-
%meta{ :description => 'some description' }
|
9
|
-
%script{ :src => "//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" }
|
10
|
-
%script{ :src => "//cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/jquery.tinymce.min.js" }
|
11
|
-
%script{ :src => "//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"
|
14
|
-
= stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
|
15
|
-
= stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
|
16
|
-
|
17
|
-
= stylesheet_link_tag "ish_manager/materialize", media: "all"
|
18
|
-
= stylesheet_link_tag "ish_manager/application", media: "all"
|
19
|
-
|
20
|
-
= javascript_include_tag "ish_manager/application"
|
21
|
-
= javascript_include_tag "ish_manager/materialize"
|
22
|
-
|
23
|
-
= csrf_meta_tags
|
24
|
-
%body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action]] }
|
25
|
-
.bg-white
|
26
|
-
- role = current_user ? current_user.profile.role_name : ''
|
27
|
-
= render :partial => "ish_manager/application/main_header_#{role}"
|
28
|
-
.container
|
29
|
-
.row
|
30
|
-
.col.s12
|
31
|
-
- if notice
|
32
|
-
%p.notice= notice
|
33
|
-
- if alert
|
34
|
-
%p.alert= alert
|
35
|
-
.container
|
36
|
-
= yield
|
37
|
-
= render 'ish_manager/application/main_footer'
|
38
|
-
= render 'analytics' unless Rails.env.development?
|
39
|
-
= render 'debug' if Rails.env.development?
|
40
|
-
|
@@ -1,69 +0,0 @@
|
|
1
|
-
|
2
|
-
def puts! a, b=''
|
3
|
-
puts "+++ +++ #{b}:"
|
4
|
-
pp a
|
5
|
-
end
|
6
|
-
|
7
|
-
namespace :warbler do
|
8
|
-
|
9
|
-
desc 'test placing orders for stock' do
|
10
|
-
task place_order_stock: :environment do
|
11
|
-
opts = {
|
12
|
-
"instruction": "BUY",
|
13
|
-
"price": "1.10",
|
14
|
-
"quantity": 1,
|
15
|
-
"symbol": "BAC",
|
16
|
-
}
|
17
|
-
out = Warbler::Ameritrade::Api.place_stock_limit_order opts
|
18
|
-
puts! out, 'out'
|
19
|
-
end
|
20
|
-
|
21
|
-
## @TODO: this is still in ish_manager namespace, need to actually move it here.
|
22
|
-
desc 'watch the stocks, and trigger actions - not alphavantage, tda now. 2021-08-08'
|
23
|
-
task watch_stocks: :environment do
|
24
|
-
while true
|
25
|
-
stocks = Warbler::StockWatch.where( notification_type: :EMAIL )
|
26
|
-
stocks.each do |stock|
|
27
|
-
begin
|
28
|
-
Timeout::timeout( 10 ) do
|
29
|
-
out = Warbler::Ameritrade::Api.get_quote({ symbol: stock.ticker })
|
30
|
-
r = out[:lastPrice]
|
31
|
-
if stock.direction == :ABOVE && r >= stock.price ||
|
32
|
-
stock.direction == :BELOW && r <= stock.price
|
33
|
-
IshManager::ApplicationMailer.stock_alert( stock ).deliver
|
34
|
-
end
|
35
|
-
end
|
36
|
-
rescue Exception => e
|
37
|
-
puts! e, 'Error in ish_manager:watch_stocks :'
|
38
|
-
end
|
39
|
-
end
|
40
|
-
print '.'
|
41
|
-
sleep Warbler::StockWatch::SLEEP_TIME_SECONDS
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
desc 'watch option: contractType=PUT|CALL strike symbol date=yyyy-mm-dd'
|
46
|
-
task watch_options: :environment do
|
47
|
-
while true
|
48
|
-
option_watches = Warbler::OptionWatch.where( notification_type: :EMAIL )
|
49
|
-
option_watches.each do |option|
|
50
|
-
begin
|
51
|
-
Timeout::timeout( 10 ) do
|
52
|
-
## opts = { contractType: 'PUT', strike: 355.0, symbol: 'NVDA', date: '2022-02-18' }
|
53
|
-
out = Warbler::Ameritrade::Api.get_option( option )
|
54
|
-
r = out[:last]
|
55
|
-
if option.direction == :ABOVE && r >= option.price ||
|
56
|
-
option.direction == :BELOW && r <= option.price
|
57
|
-
IshManager::ApplicationMailer.option_alert( option ).deliver
|
58
|
-
end
|
59
|
-
end
|
60
|
-
rescue Exception => e
|
61
|
-
puts! e, 'Error in ish_manager:watch_options :'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
print '.'
|
65
|
-
sleep Warbler::OptionWatch::SLEEP_TIME_SECONDS
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
end
|