ish_manager 0.1.8.290 → 0.1.8.293
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 +4 -4
- data/app/controllers/ish_manager/maps_controller.rb +14 -5
- data/app/views/ish_manager/maps/index.haml +4 -0
- data/app/views/ish_manager/maps/show.haml +3 -0
- data/app/views/ish_manager/newsitems/_form.haml +3 -10
- data/app/views/layouts/ish_manager/application_no_material.haml +43 -0
- data/config/routes.rb +2 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 003ba4fc5ca38c36425d1f37b39d8b20b1867ce3fb40d335981f5642b056107a
|
4
|
+
data.tar.gz: 07f4a1584f2e74dca16ba689bc21191db95b70110f03fb50235852f25bf88ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e18578b798026116b629a2a00c0c928175d07ea0ee6e9bc8dfafcbeaac09942b589737edcb15270ac1cd4f5a851bb187116c334f7a972294db793d9ff5101c4b
|
7
|
+
data.tar.gz: 8ddbc3c909e71fc40df9695fe98f963b833ee07973162f9452e9fd68c549c3ec9081b315eedc6417a63d2b55be8af46ef7dc87da91e97156e55739ab0fb9a70c
|
@@ -4,6 +4,8 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
4
4
|
before_action :set_map, only: [ :destroy, :edit, :export, :map_editor, :show, :update, ] # alphabetized
|
5
5
|
before_action :set_lists
|
6
6
|
|
7
|
+
layout 'ish_manager/application_no_material', only: %w| index |
|
8
|
+
|
7
9
|
# alphabetized
|
8
10
|
|
9
11
|
def create
|
@@ -37,8 +39,10 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
42
|
+
## @TODO: @obsolete, remove
|
40
43
|
def edit
|
41
44
|
authorize! :edit, @map
|
45
|
+
redirect_to action: 'show'
|
42
46
|
end
|
43
47
|
|
44
48
|
def export
|
@@ -60,7 +64,15 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
60
64
|
end
|
61
65
|
contents = JSON.parse contents
|
62
66
|
contents.deep_symbolize_keys!
|
63
|
-
|
67
|
+
|
68
|
+
if params[:delete_existing]
|
69
|
+
map_ids = contents[:maps].map { |m| m[:_id] }
|
70
|
+
Map.where( :_id.in => map_ids ).destroy_all
|
71
|
+
|
72
|
+
marker_ids = contents[:markers].map { |m| m[:_id] }
|
73
|
+
Marker.where( :_id.in => marker_ids ).destroy_all
|
74
|
+
end
|
75
|
+
|
64
76
|
|
65
77
|
##
|
66
78
|
## process content
|
@@ -71,7 +83,6 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
71
83
|
profiles = contents[:profiles]
|
72
84
|
contents.delete :profiles
|
73
85
|
profiles.each do |profile|
|
74
|
-
puts! profile, 'a profile'
|
75
86
|
if Ish::UserProfile.where( _id: profile[:_id] ).first
|
76
87
|
errors.push({ message: "profile #{profile[:email]} already exists." })
|
77
88
|
else
|
@@ -94,11 +105,10 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
94
105
|
|
95
106
|
# everything else
|
96
107
|
contents.each do |k, v|
|
97
|
-
puts! [k,v],
|
108
|
+
# puts! [k, v], "Importing"
|
98
109
|
item = Map.export_key_to_class[k].constantize
|
99
110
|
v.map do |inn|
|
100
111
|
n = item.new inn
|
101
|
-
puts! n, 'n'
|
102
112
|
begin
|
103
113
|
flag = n.save
|
104
114
|
rescue Mongo::Error::OperationFailure => e
|
@@ -107,7 +117,6 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
107
117
|
if flag
|
108
118
|
errors.push({ class: k, id: inn[:_id], messages: 'ok' })
|
109
119
|
else
|
110
|
-
puts! n.errors.full_messages.join(", ")
|
111
120
|
errors.push({ class: k, id: inn[:_id], messages: "Could not save: |#{n.errors.full_messages.join(", ")}|." })
|
112
121
|
end
|
113
122
|
end
|
@@ -6,9 +6,13 @@
|
|
6
6
|
%h1
|
7
7
|
Maps (#{@maps.length})
|
8
8
|
= link_to '[+]', new_map_path
|
9
|
+
|
9
10
|
.red-border
|
10
11
|
= form_tag import_map_path, :multipart => true do
|
11
12
|
= file_field_tag :input
|
13
|
+
.a
|
14
|
+
= label_tag :delete_existing
|
15
|
+
= check_box_tag :delete_existing
|
12
16
|
= submit_tag 'Import Map'
|
13
17
|
|
14
18
|
- @maps.each do |map|
|
@@ -10,14 +10,12 @@
|
|
10
10
|
= f.label :name
|
11
11
|
= f.text_field :name
|
12
12
|
.field
|
13
|
-
=
|
14
|
-
=
|
13
|
+
= label_tag :photo
|
14
|
+
= file_field_tag :photo
|
15
15
|
.field
|
16
16
|
= f.label :descr
|
17
17
|
= f.text_area :descr, :class => :tinymce
|
18
|
-
|
19
|
-
= label_tag :photo
|
20
|
-
= file_field_tag :photo
|
18
|
+
|
21
19
|
|
22
20
|
.col.s6
|
23
21
|
.field
|
@@ -29,11 +27,6 @@
|
|
29
27
|
.field
|
30
28
|
= f.label :city
|
31
29
|
= f.select :city_id, options_for_select( @cities_list, :selected => ( newsitem[:city_id] || params[:city_id] ) )
|
32
|
-
-# @TODO: tags must be multi-select, not 1x1
|
33
|
-
.field
|
34
|
-
= f.label :user_profile
|
35
|
-
= f.select :user_profile_id, options_for_select( @user_profiles_list, selected: ( newsitem[:user_profile_id] || params[:user_profile_id] ) )
|
36
|
-
|
37
30
|
|
38
31
|
%hr
|
39
32
|
.row
|
@@ -0,0 +1,43 @@
|
|
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/application", media: "all"
|
18
|
+
|
19
|
+
= javascript_include_tag "ish_manager/application"
|
20
|
+
|
21
|
+
= csrf_meta_tags
|
22
|
+
%body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action]] }
|
23
|
+
.bg-white
|
24
|
+
= render :partial => "ish_manager/application/main_header_#{current_user.profile.role_name}"
|
25
|
+
.container
|
26
|
+
.row
|
27
|
+
.col.s12
|
28
|
+
- if notice
|
29
|
+
- if notice.class == Array
|
30
|
+
%ul
|
31
|
+
- notice.map do |n|
|
32
|
+
%li
|
33
|
+
- n.map do |k,v|
|
34
|
+
<b>#{k} :</b> #{v}
|
35
|
+
%p.notice= notice
|
36
|
+
- if alert
|
37
|
+
%p.alert= alert
|
38
|
+
.container
|
39
|
+
= yield
|
40
|
+
= render 'ish_manager/application/main_footer'
|
41
|
+
= render 'analytics' if Rails.env.production?
|
42
|
+
= render 'debug' if !Rails.env.production?
|
43
|
+
|
data/config/routes.rb
CHANGED
@@ -51,7 +51,7 @@ IshManager::Engine.routes.draw do
|
|
51
51
|
resources 'newsitems'
|
52
52
|
end
|
53
53
|
post 'maps/import', to: 'maps#import', as: :import_map
|
54
|
-
get 'maps/:id', to: 'maps#
|
54
|
+
get 'maps/:id', to: 'maps#show'
|
55
55
|
post 'maps/:id/export', to: 'maps#export', as: :export_map
|
56
56
|
|
57
57
|
resources 'markers'
|
@@ -84,8 +84,7 @@ IshManager::Engine.routes.draw do
|
|
84
84
|
resources :tags
|
85
85
|
end
|
86
86
|
|
87
|
-
|
88
|
-
# resources :stock_options
|
87
|
+
## @TODO: move these to iron warbler
|
89
88
|
resources :stock_watches
|
90
89
|
resources :option_watches
|
91
90
|
|
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.293
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -446,6 +446,7 @@ files:
|
|
446
446
|
- app/views/layouts/ish_manager/application.haml
|
447
447
|
- app/views/layouts/ish_manager/application.haml-trash
|
448
448
|
- app/views/layouts/ish_manager/application2.haml
|
449
|
+
- app/views/layouts/ish_manager/application_no_material.haml
|
449
450
|
- config/routes.rb
|
450
451
|
- config/systemd/system/README.txt
|
451
452
|
- config/systemd/system/stockwatcher.service
|