ish_manager 0.1.8.246 → 0.1.8.250
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/assets/images/icons/10x10_red-cross.png +0 -0
- data/app/assets/javascripts/ish_manager/application.js +4 -3
- data/app/assets/javascripts/ish_manager/maps.js +53 -0
- data/app/assets/javascripts/ish_manager/shared.js +22 -0
- data/app/assets/stylesheets/ish_manager/application.css +1 -0
- data/app/assets/stylesheets/ish_manager/galleries.scss +42 -0
- data/app/assets/stylesheets/ish_manager/maps.scss +39 -8
- data/app/assets/stylesheets/ish_manager/photos.scss +12 -0
- data/app/controllers/ish_manager/application_controller.rb +3 -1
- data/app/controllers/ish_manager/cities_controller.rb +3 -3
- data/app/controllers/ish_manager/maps_controller.rb +31 -3
- data/app/controllers/ish_manager/markers_controller.rb +32 -10
- data/app/controllers/ish_manager/{ally_controller.rb → trash/ally_controller.rb} +0 -0
- data/app/controllers/ish_manager/user_profiles_controller.rb +1 -0
- data/app/views/ish_manager/galleries/_index.haml +6 -4
- data/app/views/ish_manager/galleries/show.haml +14 -15
- data/app/views/ish_manager/maps/_form.haml +18 -18
- data/app/views/ish_manager/maps/_map_meta_row.haml +1 -0
- data/app/views/ish_manager/maps/index.haml +9 -1
- data/app/views/ish_manager/maps/map_editor.haml +28 -0
- data/app/views/ish_manager/maps/show.haml +19 -3
- data/app/views/ish_manager/markers/_form.haml +29 -14
- data/app/views/ish_manager/photos/_meta_manager.haml +7 -0
- data/app/views/ish_manager/reports/_form.haml +1 -0
- data/app/views/ish_manager/user_profiles/_form.haml +10 -10
- data/app/views/ish_manager/user_profiles/index.haml +8 -0
- data/app/views/ish_manager/videos/_index.haml +1 -1
- data/app/views/layouts/ish_manager/application.haml +1 -1
- data/config/routes.rb +1 -0
- metadata +10 -4
- data/app/assets/stylesheets/ish_manager/galleries.css +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7426a98dcf9ef19629e9e4c49b5cc287484b1341b44186d29aa05d37b4699937
|
4
|
+
data.tar.gz: '09a4061ace477ebc319af781e8164c407a537616a940952e8f27ba2e308850d9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a75d2885a014246802f168275dafd1d1390c96d83273786304bc0d0e3d3d7ee5b2f34456583e199933d5ff4ad37864af4a3f816d388e14f3bf52660d3fab1829
|
7
|
+
data.tar.gz: 8c830b6f62d8c2549c131bd292be647341ad87750e0aa384ba84301a9b11b83ab43c47c5c41ebffecbd15beb09ea6077f0600dc3ed0b72ca194850d72c831f60
|
Binary file
|
@@ -16,7 +16,8 @@
|
|
16
16
|
//= require ish_manager/jquery.ui.widget
|
17
17
|
//= require ish_manager/jquery.fileupload
|
18
18
|
//= require ish_manager/jquery-ui.min
|
19
|
-
|
19
|
+
//= require ish_manager/shared
|
20
|
+
//= require ish_manager/maps
|
20
21
|
|
21
22
|
$(function () {
|
22
23
|
$('#fileupload').fileupload({
|
@@ -29,7 +30,7 @@ $(function () {
|
|
29
30
|
});
|
30
31
|
});
|
31
32
|
|
32
|
-
$(
|
33
|
+
$(function () {
|
33
34
|
|
34
35
|
$('*[data-confirm]').click(function(){
|
35
36
|
return confirm($(this).attr('data-confirm'));
|
@@ -43,7 +44,7 @@ $(document).ready(function () {
|
|
43
44
|
});
|
44
45
|
}
|
45
46
|
|
46
|
-
if ($('body
|
47
|
+
if ($('body').length > 0) {
|
47
48
|
$('select').material_select()
|
48
49
|
}
|
49
50
|
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
/*
|
3
|
+
* only for maps map editor
|
4
|
+
*/
|
5
|
+
$(document).ready(() => {
|
6
|
+
if (!$("body.maps-map_editor").length) { return }
|
7
|
+
logg('maps#map_editor')
|
8
|
+
|
9
|
+
const mapEditorEl = $(".maps-map-editor .map-editor")
|
10
|
+
const mapEditorX = mapEditorEl.offset().left
|
11
|
+
const mapEditorY = mapEditorEl.offset().top
|
12
|
+
|
13
|
+
$(".maps-map-editor .map-editor .marker").each(function() {
|
14
|
+
const m = $(this)
|
15
|
+
const centerOffsetX = parseInt(m.attr('data-center-offset-x'))
|
16
|
+
const centerOffsetY = parseInt(m.attr('data-center-offset-y'))
|
17
|
+
const slug = m.attr('data-slug')
|
18
|
+
logg(slug, 'slug')
|
19
|
+
|
20
|
+
$(m).draggable({
|
21
|
+
drag: function () {
|
22
|
+
const x = $(this).offset().left - mapEditorX + centerOffsetX
|
23
|
+
const y = $(this).offset().top - mapEditorY + centerOffsetY
|
24
|
+
logg(`${x}, ${y}`, 'marker')
|
25
|
+
$(`.${slug} input[name='gameui_marker[x]']`).val(x)
|
26
|
+
$(`.${slug} input[name='gameui_marker[y]']`).val(y)
|
27
|
+
},
|
28
|
+
})
|
29
|
+
})
|
30
|
+
|
31
|
+
})
|
32
|
+
|
33
|
+
/*
|
34
|
+
* only for markers#edit
|
35
|
+
*/
|
36
|
+
$(document).ready(() => {
|
37
|
+
if (!$("body.markers-edit").length) { return }
|
38
|
+
logg('markers#edit')
|
39
|
+
|
40
|
+
$($(".image-thumb img")[0]).click(function (e) {
|
41
|
+
var posX = $(this).offset().left,
|
42
|
+
posY = $(this).offset().top;
|
43
|
+
logg((e.pageX - posX) + ' , ' + (e.pageY - posY));
|
44
|
+
const x = e.pageX - posX
|
45
|
+
const y = e.pageY - posY
|
46
|
+
$(".image-thumb .red-cross").css('top', y-10)
|
47
|
+
$(".image-thumb .red-cross").css('left', x-10)
|
48
|
+
$("#gameui_marker_centerOffsetX").val(x)
|
49
|
+
$("#gameui_marker_centerOffsetY").val(y)
|
50
|
+
})
|
51
|
+
|
52
|
+
})
|
53
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* Usage: logg(someObject, 'label')
|
4
|
+
*
|
5
|
+
* This development-grade logger can be used instead of console.log() with some advantages:
|
6
|
+
* * It encourages consistent labeling of logs. By labeling each log line, you can have dozens of log lines
|
7
|
+
* written per action, and still know which log line comes from where.
|
8
|
+
* The recommended label is the component name, or function name.
|
9
|
+
* * If the label is present, the logged object is placed in the window, allowing you to inspect it in the console. The
|
10
|
+
* label becomes the name of the object (stripped to [0-9a-zA-Z\-_] chars). If you're logging a function, you can execute it.
|
11
|
+
* If you log more than one thing, they can interact, allowing you to validate control flow.
|
12
|
+
* * the logger can be turned off by making this function simply return.
|
13
|
+
*/
|
14
|
+
logg = (a, b="", c=null) => {
|
15
|
+
c = "string" === typeof c ? c : b.replace(/\W/g, "");
|
16
|
+
if (c.length > 0) {
|
17
|
+
window[c] = a;
|
18
|
+
}
|
19
|
+
|
20
|
+
console.log(`+++ ${b}:`, a); // eslint-disable-line no-console
|
21
|
+
};
|
22
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/* utils */
|
2
|
+
|
3
|
+
.thumbnails {
|
4
|
+
display: flex;
|
5
|
+
}
|
6
|
+
|
7
|
+
.row-thumbs .item {
|
8
|
+
margin-bottom: 1em;
|
9
|
+
border: 1px solid red;
|
10
|
+
padding: 10px;
|
11
|
+
img {
|
12
|
+
margin-top: 10px;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.row-large .item {
|
17
|
+
border: 1px solid red;
|
18
|
+
display: block;
|
19
|
+
|
20
|
+
padding: 10px;
|
21
|
+
margin: 10px;
|
22
|
+
|
23
|
+
height: 90vh;
|
24
|
+
max-width: 100vw;
|
25
|
+
|
26
|
+
.goto {
|
27
|
+
display: none;
|
28
|
+
}
|
29
|
+
|
30
|
+
.wrapper {
|
31
|
+
width: 100%;
|
32
|
+
height: 80vh;
|
33
|
+
background-repeat: no-repeat;
|
34
|
+
background-position: center center;
|
35
|
+
background-size: contain;
|
36
|
+
|
37
|
+
img {
|
38
|
+
max-height: 100%;
|
39
|
+
max-width: 100%;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
@@ -1,3 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* utils first
|
3
|
+
*/
|
4
|
+
.red-cross {
|
5
|
+
position: absolute;
|
6
|
+
}
|
7
|
+
|
1
8
|
|
2
9
|
.maps-index {
|
3
10
|
h1 {
|
@@ -22,7 +29,7 @@
|
|
22
29
|
align-content: flex-start;
|
23
30
|
|
24
31
|
height: 3em;
|
25
|
-
line-height: 3em;
|
32
|
+
line-height: 3em;
|
26
33
|
|
27
34
|
width: 100%;
|
28
35
|
margin: 0 0 1em 0;
|
@@ -43,17 +50,41 @@
|
|
43
50
|
border: 1px solid yellow;
|
44
51
|
}
|
45
52
|
}
|
53
|
+
.markers-list {
|
54
|
+
.item {
|
55
|
+
border: 1px solid #d59d05; /* brown*/
|
56
|
+
padding: .5em;
|
57
|
+
margin: 1em 0 0 0;
|
58
|
+
}
|
59
|
+
}
|
46
60
|
}
|
47
61
|
|
48
62
|
.markers--form {
|
49
|
-
|
50
|
-
|
63
|
+
.image-thumb {
|
64
|
+
border: 1px solid yellow;
|
65
|
+
position: relative;
|
66
|
+
display: inline-block;
|
67
|
+
|
68
|
+
|
69
|
+
}
|
51
70
|
}
|
52
71
|
|
53
|
-
.
|
54
|
-
.
|
55
|
-
border: 1px solid
|
56
|
-
|
57
|
-
|
72
|
+
.maps-map-editor {
|
73
|
+
.map-editor {
|
74
|
+
border: 1px solid red;
|
75
|
+
position: relative;
|
76
|
+
|
77
|
+
.marker {
|
78
|
+
position: absolute;
|
79
|
+
top: 0;
|
80
|
+
left: 0;
|
81
|
+
|
82
|
+
border: 1px solid yellow;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
.markers-list {
|
86
|
+
.item {
|
87
|
+
border: 1px solid green;
|
88
|
+
}
|
58
89
|
}
|
59
90
|
}
|
@@ -25,9 +25,11 @@ module IshManager
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def set_lists
|
28
|
-
@sites_list = Site.all.list
|
29
28
|
@cities_list = City.list
|
29
|
+
@locations_list = ::Gameui::Map.list
|
30
|
+
@sites_list = Site.all.list
|
30
31
|
@venues_list = Venue.all.list
|
32
|
+
|
31
33
|
@reports_list = Report.all.list
|
32
34
|
@galleries_list = Gallery.all.list
|
33
35
|
@videos_list = Video.all.list
|
@@ -8,7 +8,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
|
|
8
8
|
@city = City.new
|
9
9
|
@photo = Photo.new
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
def show
|
13
13
|
authorize! :show, @city
|
14
14
|
@videos = @city.videos.page( params[:videos_page] ).per( Video::PER_PAGE )
|
@@ -20,7 +20,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
|
|
20
20
|
@venues = @venues.where({ :name => /#{params[:q]}/i })
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def new
|
25
25
|
@city = City.new
|
26
26
|
authorize! :new, City
|
@@ -44,7 +44,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
|
|
44
44
|
def edit
|
45
45
|
authorize! :edit, @city
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
def update
|
49
49
|
@city = City.find( params[:id] )
|
50
50
|
authorize! :update, @city
|
@@ -1,15 +1,17 @@
|
|
1
1
|
|
2
2
|
class IshManager::MapsController < IshManager::ApplicationController
|
3
3
|
|
4
|
-
before_action :set_map, only: [:
|
4
|
+
before_action :set_map, only: [:destroy, :edit, :map_editor, :show, :update, ]
|
5
5
|
|
6
6
|
def index
|
7
7
|
authorize! :index, ::Gameui::Map
|
8
|
-
@maps = ::Gameui::Map.
|
8
|
+
@maps = ::Gameui::Map.where( parent_slug: "" )
|
9
|
+
@all_maps = Gameui::Map.all
|
9
10
|
end
|
10
11
|
|
11
12
|
def show
|
12
13
|
authorize! :show, @map
|
14
|
+
@maps = Gameui::Map.where( parent_slug: @map.slug )
|
13
15
|
end
|
14
16
|
|
15
17
|
def new
|
@@ -23,6 +25,16 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
23
25
|
|
24
26
|
def create
|
25
27
|
@map = ::Gameui::Map.new(map_params)
|
28
|
+
|
29
|
+
if params[:image]
|
30
|
+
image = ::Ish::ImageAsset.new :image => params[:image]
|
31
|
+
@map.image = image
|
32
|
+
image.save
|
33
|
+
end
|
34
|
+
|
35
|
+
if map_params[:parent_slug].present?
|
36
|
+
@map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
|
37
|
+
end
|
26
38
|
authorize! :create, @map
|
27
39
|
|
28
40
|
respond_to do |format|
|
@@ -36,7 +48,18 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
36
48
|
|
37
49
|
def update
|
38
50
|
authorize! :update, @map
|
51
|
+
|
52
|
+
if params[:image]
|
53
|
+
image = ::Ish::ImageAsset.new :image => params[:image]
|
54
|
+
@map.image = image
|
55
|
+
end
|
56
|
+
|
39
57
|
respond_to do |format|
|
58
|
+
if map_params[:parent_slug].present?
|
59
|
+
@map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
|
60
|
+
else
|
61
|
+
@map.parent = nil
|
62
|
+
end
|
40
63
|
if @map.update(map_params)
|
41
64
|
format.html { redirect_to map_path(@map), notice: 'Map was successfully updated.' }
|
42
65
|
else
|
@@ -53,10 +76,15 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
53
76
|
end
|
54
77
|
end
|
55
78
|
|
79
|
+
def map_editor
|
80
|
+
authorize! :update, @map
|
81
|
+
end
|
82
|
+
|
56
83
|
private
|
57
84
|
|
58
85
|
def set_map
|
59
|
-
@map = ::Gameui::Map.
|
86
|
+
@map = ::Gameui::Map.where(id: params[:id]).first
|
87
|
+
@map ||= Gameui::Map.find_by(slug: params[:id])
|
60
88
|
end
|
61
89
|
|
62
90
|
def map_params
|
@@ -25,8 +25,18 @@ class IshManager::MarkersController < IshManager::ApplicationController
|
|
25
25
|
authorize! :create_marker, @map
|
26
26
|
@map_id = @map.id
|
27
27
|
|
28
|
+
if params[:image]
|
29
|
+
@marker.image = ::Ish::ImageAsset.new :image => params[:image]
|
30
|
+
@marker.image.save
|
31
|
+
end
|
32
|
+
if params[:title_image]
|
33
|
+
@marker.title_image = ::Ish::ImageAsset.new :image => params[:title_image]
|
34
|
+
@marker.title_image.save
|
35
|
+
end
|
36
|
+
|
28
37
|
respond_to do |format|
|
29
38
|
if @marker.save
|
39
|
+
@marker.map.touch
|
30
40
|
format.html { redirect_to map_path(@map), notice: 'Marker was successfully created.' }
|
31
41
|
else
|
32
42
|
format.html { render :new }
|
@@ -36,8 +46,19 @@ class IshManager::MarkersController < IshManager::ApplicationController
|
|
36
46
|
|
37
47
|
def update
|
38
48
|
authorize! :update_marker, @map
|
49
|
+
|
50
|
+
if params[:image]
|
51
|
+
@marker.image = ::Ish::ImageAsset.new :image => params[:image]
|
52
|
+
@marker.image.save
|
53
|
+
end
|
54
|
+
if params[:title_image]
|
55
|
+
@marker.title_image = ::Ish::ImageAsset.new :image => params[:title_image]
|
56
|
+
@marker.title_image.save
|
57
|
+
end
|
58
|
+
|
39
59
|
respond_to do |format|
|
40
60
|
if @marker.update(marker_params)
|
61
|
+
@marker.map.touch
|
41
62
|
format.html { redirect_to maps_path(@map), notice: 'Marker was successfully updated.' }
|
42
63
|
else
|
43
64
|
format.html { render :edit }
|
@@ -49,6 +70,7 @@ class IshManager::MarkersController < IshManager::ApplicationController
|
|
49
70
|
@marker = ::Gameui::Marker.find params[:id]
|
50
71
|
@map = @marker.map
|
51
72
|
authorize! :destroy_marker, @map
|
73
|
+
@marker.map.touch
|
52
74
|
@marker.destroy
|
53
75
|
respond_to do |format|
|
54
76
|
format.html { redirect_to map_path(@map), notice: 'Marker was successfully destroyed.' }
|
@@ -57,17 +79,17 @@ class IshManager::MarkersController < IshManager::ApplicationController
|
|
57
79
|
|
58
80
|
private
|
59
81
|
|
60
|
-
|
61
|
-
|
62
|
-
|
82
|
+
def set_map
|
83
|
+
@map = ::Gameui::Map.find(params[:map_id] || params[:gameui_marker][:map_id])
|
84
|
+
end
|
63
85
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
86
|
+
def set_marker
|
87
|
+
@marker = ::Gameui::Marker.find params[:id]
|
88
|
+
@map = @marker.map
|
89
|
+
end
|
68
90
|
|
69
|
-
|
70
|
-
|
71
|
-
|
91
|
+
def marker_params
|
92
|
+
params.require(:gameui_marker).permit!
|
93
|
+
end
|
72
94
|
|
73
95
|
end
|
File without changes
|
@@ -21,6 +21,7 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
|
|
21
21
|
def update
|
22
22
|
@profile = IshModels::UserProfile.find params[:id]
|
23
23
|
authorize! :update, @profile
|
24
|
+
|
24
25
|
flag = @profile.update_attributes params[:profile].permit!
|
25
26
|
if flag
|
26
27
|
flash[:notice] = "Updated profile #{@profile.email}"
|
@@ -1,5 +1,6 @@
|
|
1
|
-
|
2
|
-
-#
|
1
|
+
-#
|
2
|
+
-# ish_manager / galleries / _index.haml
|
3
|
+
-#
|
3
4
|
|
4
5
|
= render 'ish_manager/galleries/menu'
|
5
6
|
|
@@ -23,8 +24,9 @@
|
|
23
24
|
- if g.photos.length == 0
|
24
25
|
= image_missing
|
25
26
|
- else
|
26
|
-
|
27
|
-
|
27
|
+
.thumbnails
|
28
|
+
- g.photos.limit( n_thumbs ).each do |photo|
|
29
|
+
= link_to image_tag(photo.photo.url(:thumb), :alt => g.name), gallery_path(g.galleryname)
|
28
30
|
|
29
31
|
- if @galleries.respond_to? :total_pages
|
30
32
|
= paginate @galleries, :param_name => param_name, :views_prefix => 'ish_manager'
|
@@ -1,3 +1,6 @@
|
|
1
|
+
-#
|
2
|
+
-# ish_manager / galleries / show.haml
|
3
|
+
-#
|
1
4
|
|
2
5
|
= render 'title', :gallery => @gallery
|
3
6
|
= render 'ish_manager/photos/multinew', :gallery => @gallery
|
@@ -15,28 +18,24 @@
|
|
15
18
|
.row
|
16
19
|
%ul
|
17
20
|
- @photos.each do |photo|
|
18
|
-
%li.col-xs-1
|
21
|
+
%li.col-xs-1
|
22
|
+
= link_to image_tag(photo.photo.url( :mini ), :alt => ''), "#large_#{photo.id}"
|
23
|
+
|
19
24
|
.spacer{ :style => 'height: 500px' }
|
20
25
|
|
21
26
|
-# thumb
|
22
|
-
.row
|
23
|
-
.
|
24
|
-
-
|
25
|
-
.
|
26
|
-
|
27
|
-
|
28
|
-
= link_to "go to", "#large_#{photo.id}"
|
29
|
-
%br
|
30
|
-
= image_tag photo.photo.url( :thumb ), :alt => ''
|
27
|
+
.row.row-thumbs
|
28
|
+
- @photos.each do |photo|
|
29
|
+
.col-xs-3
|
30
|
+
.item
|
31
|
+
= render 'ish_manager/photos/meta_manager', photo: photo
|
32
|
+
= image_tag photo.photo.url( :thumb ), :alt => ''
|
31
33
|
.spacer{ :style => 'height: 100px' }
|
32
34
|
|
33
35
|
-# large
|
34
|
-
.
|
36
|
+
.row.row-large
|
35
37
|
- @photos.each do |photo|
|
36
38
|
.item
|
37
39
|
%a{id: "large_#{photo.id}" }
|
38
|
-
|
39
|
-
= link_to "large", photo.photo.url(:large)
|
40
|
-
|
|
41
|
-
= link_to "original", photo.photo.url(:original)
|
40
|
+
= render 'ish_manager/photos/meta_manager', photo: photo
|
42
41
|
.wrapper{ style: "background-image: url('#{photo.photo.url( :large )}')" }
|
@@ -2,9 +2,9 @@
|
|
2
2
|
-# ish_manager / maps / _form
|
3
3
|
-#
|
4
4
|
|
5
|
-
- url = params[:action] == 'new' ? maps_path : map_path(@map)
|
5
|
+
- url = params[:action] == 'new' ? maps_path : map_path(@map.id)
|
6
6
|
|
7
|
-
= form_for @map, url: url do |f|
|
7
|
+
= form_for @map, :html => { :multipart => true }, url: url do |f|
|
8
8
|
- if @map.errors.any?
|
9
9
|
#error_explanation
|
10
10
|
%h2= "#{pluralize(@map.errors.count, "error")} prohibited this map from being saved:"
|
@@ -12,35 +12,35 @@
|
|
12
12
|
- @map.errors.full_messages.each do |message|
|
13
13
|
%li= message
|
14
14
|
|
15
|
-
|
16
15
|
.row
|
16
|
+
.col-md-3
|
17
|
+
.field
|
18
|
+
= f.label :name
|
19
|
+
= f.text_field :name
|
20
|
+
.field
|
21
|
+
= f.label :map_slug, "Map slug (if any)"
|
22
|
+
= f.text_field :map_slug
|
17
23
|
.col-md-3
|
18
24
|
.field
|
19
25
|
= f.label :slug
|
20
26
|
= f.text_field :slug
|
21
|
-
.col-md-3
|
22
27
|
.field
|
23
28
|
= f.label :parent_slug
|
24
29
|
= f.text_field :parent_slug
|
25
|
-
.col-md-
|
30
|
+
.col-md-2
|
26
31
|
.field
|
27
|
-
= f.label :
|
28
|
-
= f.
|
29
|
-
.col-md-
|
32
|
+
= f.label :ordering_type
|
33
|
+
= f.select :ordering_type, options_for_select(::Gameui::Map::ORDERING_TYPES)
|
34
|
+
.col-md-4
|
35
|
+
|
30
36
|
.field
|
31
|
-
= f.label :
|
32
|
-
=
|
37
|
+
= f.label :image
|
38
|
+
= file_field_tag :image
|
39
|
+
= image_tag @map.image.image.url(:thumb) rescue nil
|
40
|
+
|
33
41
|
.field
|
34
42
|
= f.label :description
|
35
43
|
= f.text_area :description, class: 'tinymce'
|
36
44
|
|
37
|
-
.field
|
38
|
-
= f.label :img_path
|
39
|
-
= f.text_field :img_path
|
40
|
-
.row
|
41
|
-
.col-md-4
|
42
|
-
.field
|
43
|
-
= f.label :ordering_type
|
44
|
-
= select_tag :ordering_type, options_for_select(::Gameui::Map::ORDERING_TYPES)
|
45
45
|
.actions
|
46
46
|
= f.submit 'Save'
|
@@ -2,6 +2,7 @@
|
|
2
2
|
.flat-row
|
3
3
|
.a= link_to map.slug, map_path(map)
|
4
4
|
.a= button_to '~', edit_map_path(map), method: :get
|
5
|
+
.a= button_to 'map editor', location_map_editor_path(map.id), method: :get
|
5
6
|
.a <b>#{map.w}x#{map.h}_#{map.slug}</b>
|
6
7
|
.a= button_to '+marker', new_map_marker_path(map), method: :get
|
7
8
|
.a= button_to '+newsitem', new_map_newsitem_path(map), method: :get
|
@@ -1,6 +1,14 @@
|
|
1
|
+
-#
|
2
|
+
-# ish_manager / maps / index.haml
|
3
|
+
-#
|
1
4
|
|
2
5
|
.maps-index
|
3
|
-
%h1 Maps #{link_to '[+]', new_map_path}
|
6
|
+
%h1 Maps (#{@maps.length}) #{link_to '[+]', new_map_path}
|
4
7
|
- @maps.each do |map|
|
5
8
|
.item
|
6
9
|
= render 'map_meta_row', map: map
|
10
|
+
|
11
|
+
%h1 All Maps (#{@all_maps.length})
|
12
|
+
%ul
|
13
|
+
- @all_maps.each do |m|
|
14
|
+
%li= link_to m.slug, edit_map_path(m.id)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
.maps-map-editor
|
3
|
+
%h1 Map Editor
|
4
|
+
|
5
|
+
.map-editor
|
6
|
+
= image_tag @map.image.image.url(:original)
|
7
|
+
- @map.markers.each do |m|
|
8
|
+
.marker{ data: { 'slug': m.slug, 'center-offset-x': m.centerOffsetX, 'center-offset-y': m.centerOffsetY }, style: "top: #{m.y-m.centerOffsetY}px; left: #{m.x-m.centerOffsetX}px;" }
|
9
|
+
= image_tag m.image.image.url(:original)
|
10
|
+
= image_tag('icons/10x10_red-cross.png', class: 'red-cross', style: "top: #{m.centerOffsetY-10}px; left: #{m.centerOffsetX-10}px;" )
|
11
|
+
|
12
|
+
.markers-list
|
13
|
+
%h1
|
14
|
+
Markers (#{@map.markers.length})
|
15
|
+
= link_to '[+]', new_marker_path({ map_id: @map.id })
|
16
|
+
- @map.markers.each do |m|
|
17
|
+
= form_for m, { html: { class: "item #{m.slug}" }, url: marker_path(m.id) } do |f|
|
18
|
+
= m.slug
|
19
|
+
= link_to '[~]', edit_marker_path(m.id)
|
20
|
+
.field
|
21
|
+
= f.label :x
|
22
|
+
= f.text_field :x
|
23
|
+
.field
|
24
|
+
= f.label :y
|
25
|
+
= f.text_field :y
|
26
|
+
.field
|
27
|
+
= f.submit 'Save'
|
28
|
+
|
@@ -1,14 +1,22 @@
|
|
1
|
+
-#
|
2
|
+
-# ish_manager / maps / show.haml
|
3
|
+
-#
|
1
4
|
|
2
5
|
.maps-show
|
3
6
|
= render 'map_meta_row', map: @map
|
4
7
|
%p.addToggle Description [<>]
|
5
8
|
.descr= raw @map.description
|
6
9
|
|
7
|
-
%p.addToggle
|
10
|
+
%p.addToggle
|
11
|
+
The Map (#{@map.w}x#{@map.h})
|
12
|
+
= link_to 'Map Editor', location_map_editor_path(@map.id)
|
13
|
+
[<>]
|
8
14
|
.the-map
|
9
|
-
= image_tag @map.
|
15
|
+
= image_tag @map.image.image.url(:original) rescue nil
|
10
16
|
- @map.markers.each do |marker|
|
11
|
-
|
17
|
+
-# @TODO: this should be a partial
|
18
|
+
.marker{ style: "position: absolute; left: #{marker.x - marker.centerOffsetX}px; top: #{marker.y - marker.centerOffsetY}px;" }
|
19
|
+
= image_tag marker.image.image.url(:original)
|
12
20
|
|
13
21
|
%p.addToggle Markers (#{@map.markers.count}) [<>]
|
14
22
|
.markers-list
|
@@ -19,6 +27,7 @@
|
|
19
27
|
.a= button_to '~', edit_marker_path(marker), method: :get
|
20
28
|
.a= button_to 'x', marker_path(marker), method: :delete, data: { confirm: 'Are you sure?' }
|
21
29
|
.a= link_to '[api]', api_marker_path(marker)
|
30
|
+
.a= link_to '[this map]', edit_map_path(marker.slug)
|
22
31
|
%ul.bullets
|
23
32
|
%li <b>item_type:</b> #{marker.item_type}
|
24
33
|
|
@@ -27,3 +36,10 @@
|
|
27
36
|
- @map.newsitems.each do |newsitem|
|
28
37
|
.item
|
29
38
|
= newsitem.inspect
|
39
|
+
|
40
|
+
%p.addToggle Maps (#{@maps.count}) [<>]
|
41
|
+
.maps-list
|
42
|
+
- @maps.each do |m|
|
43
|
+
.item
|
44
|
+
= link_to m.slug, edit_map_path(m.id)
|
45
|
+
|
@@ -1,6 +1,13 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
-#
|
3
|
+
-# ish_manager / markers / _form
|
4
|
+
-#
|
5
|
+
|
6
|
+
-# @TODO: can I not have this url at all?
|
7
|
+
- url = %w|new create|.include?(params[:action]) ? markers_path : marker_path(@marker.id)
|
2
8
|
.markers--form
|
3
|
-
= form_for @marker, url: url do |f|
|
9
|
+
= form_for @marker, :html => { :multipart => true }, url: url do |f|
|
10
|
+
-# @TODO: yeah move the map id into this hidden field.
|
4
11
|
-# = f.hidden_field :map_id, value: (params['map_id']||@map_id)
|
5
12
|
|
6
13
|
- if @marker.errors.any?
|
@@ -25,26 +32,34 @@
|
|
25
32
|
.row
|
26
33
|
.col-md-3
|
27
34
|
.field
|
28
|
-
= f.label :
|
29
|
-
=
|
35
|
+
= f.label :image
|
36
|
+
= file_field_tag :image
|
37
|
+
.image-thumb
|
38
|
+
= image_tag(@marker.image.image.url(:thumb)) rescue nil
|
39
|
+
= image_tag('icons/10x10_red-cross.png', class: 'red-cross', style: "top: #{@marker.centerOffsetY-10}px; left: #{@marker.centerOffsetX-10}px;" )
|
30
40
|
.col-md-3
|
31
41
|
.field
|
32
|
-
= f.label :
|
33
|
-
= f.
|
42
|
+
= f.label :centerOffsetX
|
43
|
+
= f.text_field :centerOffsetX
|
44
|
+
.field
|
45
|
+
= f.label :centerOffsetY
|
46
|
+
= f.text_field :centerOffsetY
|
34
47
|
.col-md-3
|
35
48
|
.field
|
36
49
|
= f.label :x
|
37
|
-
= f.
|
38
|
-
.col-md-3
|
50
|
+
= f.text_field :x
|
39
51
|
.field
|
40
52
|
= f.label :y
|
41
|
-
= f.
|
42
|
-
|
43
|
-
|
44
|
-
|
53
|
+
= f.text_field :y
|
54
|
+
.col-md-3
|
55
|
+
.field
|
56
|
+
= f.label :title_image
|
57
|
+
= file_field_tag :title_image
|
58
|
+
= image_tag @marker.title_image.image.url(:thumb) rescue nil
|
59
|
+
|
45
60
|
.field
|
46
|
-
= f.label :
|
47
|
-
= f.text_field :
|
61
|
+
= f.label :url, "URL (if any)"
|
62
|
+
= f.text_field :url
|
48
63
|
.row
|
49
64
|
.col-md-3
|
50
65
|
.col-md-6
|
@@ -0,0 +1,7 @@
|
|
1
|
+
|
2
|
+
.--meta-manager
|
3
|
+
= button_to '[x]', photo_path( :id => photo.id ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
4
|
+
.right-hand
|
5
|
+
= link_to "go to", "#large_#{photo.id}", class: 'goto'
|
6
|
+
= link_to "large", photo.photo.url(:large)
|
7
|
+
= link_to "original", photo.photo.url(:original)
|
@@ -72,6 +72,7 @@
|
|
72
72
|
%button.btn.btn-primary.btn-lg.btn-block{:type => "button", :onClick => "upload()"} Upload File
|
73
73
|
= file_field_tag :photo, :style => "display:none", :id=>"photo"
|
74
74
|
.div.center
|
75
|
+
-# @TODO: wtf?
|
75
76
|
%img#thumbnail_image_boy.img-thumbnail{:alt => "uploaded image", :width=>"200px"}
|
76
77
|
|
77
78
|
|
@@ -5,15 +5,11 @@
|
|
5
5
|
.input-field
|
6
6
|
%label name
|
7
7
|
= f.text_field :name
|
8
|
-
|
9
|
-
.input-field
|
10
|
-
%label username
|
11
|
-
= f.text_field :username
|
12
|
-
|
8
|
+
|
13
9
|
.input-field
|
14
10
|
%label email
|
15
11
|
= f.text_field :email
|
16
|
-
|
12
|
+
|
17
13
|
.input-field
|
18
14
|
= f.select :role_name, options_for_select( [[nil, nil]] + IshModels::UserProfile::ROLES.map { |r| [ r, r ] }, :selected => profile.role_name )
|
19
15
|
%label role name
|
@@ -21,14 +17,18 @@
|
|
21
17
|
.input-field
|
22
18
|
= f.select :current_city, options_for_select( @cities_list, :selected => profile.current_city_id )
|
23
19
|
%label City
|
24
|
-
|
20
|
+
|
25
21
|
.input-field
|
26
22
|
= f.label :fb_access_token
|
27
23
|
= f.text_field :fb_access_token
|
28
24
|
.input-field
|
29
25
|
= f.label :fb_long_access_token
|
30
26
|
= f.text_field :fb_long_access_token
|
31
|
-
|
27
|
+
|
28
|
+
.input-field
|
29
|
+
= f.label :bookmarked_location_ids
|
30
|
+
= f.select :bookmarked_location_ids, @locations_list, {}, { multiple: true }
|
31
|
+
|
32
32
|
= f.submit 'Save', :class => %w(button)
|
33
|
-
|
34
|
-
|
33
|
+
|
34
|
+
|
@@ -28,6 +28,14 @@
|
|
28
28
|
- profile.newsitems.each do |n|
|
29
29
|
= render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
|
30
30
|
<hr />
|
31
|
+
|
32
|
+
%h5 Bookmarked Locations
|
33
|
+
%ul
|
34
|
+
- profile.bookmarked_locations.each do |n|
|
35
|
+
%li
|
36
|
+
= n.id
|
37
|
+
= n.inspect
|
38
|
+
|
31
39
|
.row
|
32
40
|
Address:
|
33
41
|
= profile.addresses[0].inspect
|
@@ -18,7 +18,7 @@
|
|
18
18
|
- if video.youtube_id.present?
|
19
19
|
-## doesn't work with private videos, which are most
|
20
20
|
-# .thumb-youtube= image_tag "https://img.youtube.com/vi/#{video.youtube_id}/1.jpg"
|
21
|
-
= render 'embed_mini', video: video
|
21
|
+
= render 'ish_manager/videos/embed_mini', video: video
|
22
22
|
- else
|
23
23
|
.thumb= image_tag video.thumb.url(:thumb)
|
24
24
|
.a
|
@@ -21,7 +21,7 @@
|
|
21
21
|
= javascript_include_tag "ish_manager/materialize"
|
22
22
|
|
23
23
|
= csrf_meta_tags
|
24
|
-
%body#
|
24
|
+
%body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action]] }
|
25
25
|
.bg-white
|
26
26
|
- role = current_user ? current_user.profile.role_name : ''
|
27
27
|
= render :partial => "ish_manager/application/main_header_#{role}"
|
data/config/routes.rb
CHANGED
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.250
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- app/assets/images/bg/triangular.png
|
137
137
|
- app/assets/images/bg/weather.png
|
138
138
|
- app/assets/images/favicon.gif
|
139
|
+
- app/assets/images/icons/10x10_red-cross.png
|
139
140
|
- app/assets/images/icons/20x20/private.png
|
140
141
|
- app/assets/images/icons/20x20/public2.png
|
141
142
|
- app/assets/images/missing.png
|
@@ -173,20 +174,22 @@ files:
|
|
173
174
|
- app/assets/javascripts/ish_manager/jquery.fileupload.js
|
174
175
|
- app/assets/javascripts/ish_manager/jquery.iframe-transport.js
|
175
176
|
- app/assets/javascripts/ish_manager/jquery.ui.widget.js
|
177
|
+
- app/assets/javascripts/ish_manager/maps.js
|
176
178
|
- app/assets/javascripts/ish_manager/materialize.js
|
179
|
+
- app/assets/javascripts/ish_manager/shared.js
|
177
180
|
- app/assets/stylesheets/ish_manager/application.css
|
178
181
|
- app/assets/stylesheets/ish_manager/bootstrap.css
|
179
|
-
- app/assets/stylesheets/ish_manager/galleries.
|
182
|
+
- app/assets/stylesheets/ish_manager/galleries.scss
|
180
183
|
- app/assets/stylesheets/ish_manager/jquery-ui.css
|
181
184
|
- app/assets/stylesheets/ish_manager/maps.scss
|
182
185
|
- app/assets/stylesheets/ish_manager/materialize.css
|
186
|
+
- app/assets/stylesheets/ish_manager/photos.scss
|
183
187
|
- app/assets/stylesheets/ish_manager/reset.css
|
184
188
|
- app/assets/stylesheets/ish_manager/tags.css
|
185
189
|
- app/assets/stylesheets/ish_manager/trash/bootstrap.min.css
|
186
190
|
- app/assets/stylesheets/ish_manager/trash/bootstrap.min.css.map
|
187
191
|
- app/assets/stylesheets/ish_manager/user_profiles.scss
|
188
192
|
- app/assets/stylesheets/ish_manager/utils.scss
|
189
|
-
- app/controllers/ish_manager/ally_controller.rb
|
190
193
|
- app/controllers/ish_manager/application_controller.rb
|
191
194
|
- app/controllers/ish_manager/campaigns_controller.rb
|
192
195
|
- app/controllers/ish_manager/cities_controller.rb
|
@@ -209,6 +212,7 @@ files:
|
|
209
212
|
- app/controllers/ish_manager/sites_controller.rb
|
210
213
|
- app/controllers/ish_manager/stock_watches_controller.rb
|
211
214
|
- app/controllers/ish_manager/tags_controller.rb
|
215
|
+
- app/controllers/ish_manager/trash/ally_controller.rb
|
212
216
|
- app/controllers/ish_manager/trash/stock_actions_controller.rb
|
213
217
|
- app/controllers/ish_manager/trash/stock_options_controller.rb
|
214
218
|
- app/controllers/ish_manager/user_profiles_controller.rb
|
@@ -291,6 +295,7 @@ files:
|
|
291
295
|
- app/views/ish_manager/maps/edit.haml
|
292
296
|
- app/views/ish_manager/maps/index.haml
|
293
297
|
- app/views/ish_manager/maps/index.haml-trash
|
298
|
+
- app/views/ish_manager/maps/map_editor.haml
|
294
299
|
- app/views/ish_manager/maps/new.haml
|
295
300
|
- app/views/ish_manager/maps/show.haml
|
296
301
|
- app/views/ish_manager/markers/_form.haml
|
@@ -304,6 +309,7 @@ files:
|
|
304
309
|
- app/views/ish_manager/newsitems/new.haml
|
305
310
|
- app/views/ish_manager/payments/index.haml
|
306
311
|
- app/views/ish_manager/photos/_meta.haml
|
312
|
+
- app/views/ish_manager/photos/_meta_manager.haml
|
307
313
|
- app/views/ish_manager/photos/_multinew.haml
|
308
314
|
- app/views/ish_manager/photos/show.haml
|
309
315
|
- app/views/ish_manager/photos/without_gallery.haml
|
@@ -1,28 +0,0 @@
|
|
1
|
-
|
2
|
-
.panel-body img.thumb {
|
3
|
-
display: inline;
|
4
|
-
}
|
5
|
-
|
6
|
-
.large-photos .item {
|
7
|
-
border: 1px solid red;
|
8
|
-
display: block;
|
9
|
-
|
10
|
-
padding: 10px;
|
11
|
-
margin: 10px;
|
12
|
-
|
13
|
-
height: 100vh;
|
14
|
-
max-width: 100vw;
|
15
|
-
}
|
16
|
-
|
17
|
-
.large-photos .item .wrapper {
|
18
|
-
width: 100%;
|
19
|
-
height: 100%;
|
20
|
-
background-repeat: no-repeat;
|
21
|
-
background-position: center center;
|
22
|
-
background-size: contain;
|
23
|
-
}
|
24
|
-
|
25
|
-
.large-photos .item .wrapper img {
|
26
|
-
max-height: 100%;
|
27
|
-
max-width: 100%;
|
28
|
-
}
|