ish_manager 0.1.8.292 → 0.1.8.293
Sign up to get free protection for your applications and to get access to all the features.
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
|
@@ -62,7 +64,15 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
62
64
|
end
|
63
65
|
contents = JSON.parse contents
|
64
66
|
contents.deep_symbolize_keys!
|
65
|
-
|
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
|
+
|
66
76
|
|
67
77
|
##
|
68
78
|
## process content
|
@@ -73,7 +83,6 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
73
83
|
profiles = contents[:profiles]
|
74
84
|
contents.delete :profiles
|
75
85
|
profiles.each do |profile|
|
76
|
-
puts! profile, 'a profile'
|
77
86
|
if Ish::UserProfile.where( _id: profile[:_id] ).first
|
78
87
|
errors.push({ message: "profile #{profile[:email]} already exists." })
|
79
88
|
else
|
@@ -96,11 +105,10 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
96
105
|
|
97
106
|
# everything else
|
98
107
|
contents.each do |k, v|
|
99
|
-
puts! [k,v],
|
108
|
+
# puts! [k, v], "Importing"
|
100
109
|
item = Map.export_key_to_class[k].constantize
|
101
110
|
v.map do |inn|
|
102
111
|
n = item.new inn
|
103
|
-
puts! n, 'n'
|
104
112
|
begin
|
105
113
|
flag = n.save
|
106
114
|
rescue Mongo::Error::OperationFailure => e
|
@@ -109,7 +117,6 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
109
117
|
if flag
|
110
118
|
errors.push({ class: k, id: inn[:_id], messages: 'ok' })
|
111
119
|
else
|
112
|
-
puts! n.errors.full_messages.join(", ")
|
113
120
|
errors.push({ class: k, id: inn[:_id], messages: "Could not save: |#{n.errors.full_messages.join(", ")}|." })
|
114
121
|
end
|
115
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|
|
@@ -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
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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
|
@@ -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
|