ish_manager 0.1.8.249 → 0.1.8.253
Sign up to get free protection for your applications and to get access to all the features.
- 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 → application.scss} +85 -93
- data/app/assets/stylesheets/ish_manager/galleries.scss +42 -0
- data/app/assets/stylesheets/ish_manager/maps.scss +38 -8
- data/app/assets/stylesheets/ish_manager/photos.scss +12 -0
- data/app/controllers/ish_manager/application_controller.rb +7 -5
- data/app/controllers/ish_manager/cities_controller.rb +3 -3
- data/app/controllers/ish_manager/features_controller.rb +7 -7
- data/app/controllers/ish_manager/maps_controller.rb +23 -3
- data/app/controllers/ish_manager/markers_controller.rb +19 -0
- data/app/controllers/ish_manager/newsitems_controller.rb +57 -96
- data/app/controllers/ish_manager/reports_controller.rb +39 -71
- data/app/controllers/ish_manager/tags_controller.rb +40 -37
- data/app/controllers/ish_manager/{ally_controller.rb → trash/ally_controller.rb} +0 -0
- data/app/controllers/ish_manager/user_profiles_controller.rb +4 -1
- data/app/views/ish_manager/application/_main_footer.haml +3 -3
- data/app/views/ish_manager/application/_main_header.haml +1 -1
- data/app/views/ish_manager/application/_main_header_admin.haml +34 -39
- data/app/views/ish_manager/application/_main_header_guy.haml +1 -1
- data/app/views/ish_manager/application/_main_header_manager.haml +1 -1
- data/app/views/ish_manager/cities/_form.haml +5 -5
- data/app/views/ish_manager/cities/edit_feature.haml +1 -1
- data/app/views/ish_manager/cities/index.haml +2 -2
- data/app/views/ish_manager/cities/show.haml +15 -15
- data/app/views/ish_manager/events/_form.haml +7 -7
- data/app/views/ish_manager/features/_form.haml +6 -6
- data/app/views/ish_manager/features/_index.haml +42 -28
- data/app/views/ish_manager/features/_index.haml-trash +36 -0
- data/app/views/ish_manager/features/_item.haml +1 -1
- data/app/views/ish_manager/features/index.haml +4 -25
- data/app/views/ish_manager/galleries/_form.haml +15 -15
- data/app/views/ish_manager/galleries/_index.haml +6 -4
- data/app/views/ish_manager/galleries/_index_thumbs.haml +1 -1
- data/app/views/ish_manager/galleries/_menu.haml +1 -1
- data/app/views/ish_manager/galleries/_thumbs.haml +1 -1
- data/app/views/ish_manager/galleries/_title.haml +1 -1
- data/app/views/ish_manager/galleries/show.haml +15 -16
- data/app/views/ish_manager/invoices/index.haml +1 -1
- data/app/views/ish_manager/invoices/new.haml +1 -1
- data/app/views/ish_manager/leads/new.haml +1 -1
- data/app/views/ish_manager/maps/_form.haml +19 -18
- data/app/views/ish_manager/maps/_index_item.haml +7 -0
- data/app/views/ish_manager/maps/_map_meta_row.haml +1 -1
- data/app/views/ish_manager/maps/index.haml +13 -3
- data/app/views/ish_manager/maps/map_editor.haml +28 -0
- data/app/views/ish_manager/maps/show.haml +19 -6
- data/app/views/ish_manager/markers/_form.haml +44 -29
- data/app/views/ish_manager/newsitems/_form.haml +45 -35
- data/app/views/ish_manager/newsitems/_index.haml +23 -34
- data/app/views/ish_manager/newsitems/_item.haml +6 -6
- data/app/views/ish_manager/newsitems/edit.haml +11 -10
- data/app/views/ish_manager/photos/_meta_manager.haml +7 -0
- data/app/views/ish_manager/reports/_form.haml +25 -14
- data/app/views/ish_manager/reports/_index.haml +1 -1
- data/app/views/ish_manager/reports/_show_mini.haml +1 -1
- data/app/views/ish_manager/reports/new.haml +1 -1
- data/app/views/ish_manager/reports/show.haml +2 -1
- data/app/views/ish_manager/sites/_header.haml +8 -3
- data/app/views/ish_manager/sites/galleries.haml +1 -1
- data/app/views/ish_manager/sites/index.haml +1 -1
- data/app/views/ish_manager/sites/show.haml +4 -4
- data/app/views/ish_manager/stock_watches/_form.haml +1 -1
- data/app/views/ish_manager/tags/_features.haml +2 -2
- data/app/views/ish_manager/tags/_form.haml +12 -16
- data/app/views/ish_manager/tags/_list.haml +1 -1
- data/app/views/ish_manager/tags/_list_simple.haml +1 -1
- data/app/views/ish_manager/tags/_meta.haml +9 -0
- data/app/views/ish_manager/tags/edit.haml +1 -1
- data/app/views/ish_manager/tags/show.haml +8 -12
- data/app/views/ish_manager/user_profiles/_form.haml +10 -10
- data/app/views/ish_manager/user_profiles/index.haml +9 -2
- data/app/views/ish_manager/user_profiles/new.haml +1 -1
- data/app/views/ish_manager/venues/_form.haml +19 -16
- data/app/views/ish_manager/venues/_index.haml +1 -1
- data/app/views/ish_manager/videos/_form.haml +8 -8
- data/app/views/ish_manager/videos/_index.haml +4 -3
- data/app/views/ish_manager/videos/_index_title.haml +2 -2
- data/app/views/layouts/ish_manager/application.haml +2 -2
- data/app/views/layouts/ish_manager/application_no_materialize.haml +2 -2
- data/config/routes.rb +2 -1
- metadata +14 -5
- 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: f22a877e38fa81c26881bef942e43cef7f203b84aeb78867478b46e1e215d0e9
|
4
|
+
data.tar.gz: d40cd5edbdb7bd40024f2de398f9b37b8d9df25da62f187b7ac67f28b637945f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fa6e95114f3f01275e8cfe1567ba98d42ccc7b1e8edf7c85b7fb89cf1357559dbe8f4f73ef7411475872b0f342d38f4c90278e6133ace095f341008d13274d8
|
7
|
+
data.tar.gz: 6d4b9633e0e8de2ad33b0351affeca4ab4360cfc616ff34474183713e2ea4506b26e3fcf597b632efe0d8ccdff9feb0b1904c1d4ba52bbd08a5acd669d1d0728
|
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
|
+
|
@@ -10,60 +10,72 @@
|
|
10
10
|
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
11
|
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
|
-
*= require ish_manager/bootstrap
|
14
|
-
*= require ish_manager/reset
|
15
13
|
*= require_self
|
16
14
|
*= require ish_manager/tags
|
17
15
|
*= require ish_manager/maps
|
18
16
|
*= require ish_manager/utils
|
19
17
|
*= require ish_manager/jquery-ui
|
20
18
|
*= require ish_manager/galleries
|
19
|
+
*= require ish_manager/photos
|
21
20
|
*= require ish_manager/user_profiles
|
22
21
|
*/
|
23
22
|
|
23
|
+
body {
|
24
|
+
background: #dedede;
|
25
|
+
font-size: 20px;
|
26
|
+
}
|
24
27
|
|
25
28
|
/**
|
26
29
|
* utils
|
27
30
|
*/
|
31
|
+
|
32
|
+
/* A */
|
33
|
+
|
34
|
+
.addToggle + * {
|
35
|
+
display: none;
|
36
|
+
}
|
37
|
+
.alert {
|
38
|
+
boroder: 1px solid yellow;
|
39
|
+
padding: .8em;
|
40
|
+
}
|
41
|
+
|
42
|
+
/* B */
|
43
|
+
|
28
44
|
.bg-white {
|
29
45
|
background: url('/assets/bg/confectionary.png');
|
30
46
|
padding-bottom: 1em;
|
31
47
|
}
|
32
48
|
|
33
|
-
|
34
|
-
background: #
|
49
|
+
.blue {
|
50
|
+
background: #5bc0de;
|
51
|
+
color: white;
|
52
|
+
}
|
53
|
+
|
54
|
+
.border-red {
|
55
|
+
border: 1px solid red;
|
56
|
+
padding: 1em;
|
35
57
|
}
|
36
58
|
|
59
|
+
/* C */
|
60
|
+
|
37
61
|
.center {
|
38
62
|
text-align: center;
|
39
63
|
}
|
40
64
|
|
41
|
-
.
|
42
|
-
|
65
|
+
.clearfix {
|
66
|
+
clear: both;
|
43
67
|
}
|
44
68
|
|
45
|
-
.
|
46
|
-
|
47
|
-
padding: .8em;
|
48
|
-
}
|
49
|
-
.alert {
|
50
|
-
boroder: 1px solid yellow;
|
51
|
-
padding: .8em;
|
69
|
+
.collapse-expand {
|
70
|
+
cursor: pointer;
|
52
71
|
}
|
53
72
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
}
|
73
|
+
/* D */
|
74
|
+
/* E */
|
75
|
+
/* F */
|
58
76
|
|
59
|
-
.
|
60
|
-
|
61
|
-
border: 1px solid red;
|
62
|
-
width: 100px;
|
63
|
-
height: 100px;
|
64
|
-
}
|
65
|
-
.large-photos img {
|
66
|
-
width: 100%;
|
77
|
+
.flex-row {
|
78
|
+
display: flex;
|
67
79
|
}
|
68
80
|
|
69
81
|
.float-left {
|
@@ -73,40 +85,31 @@ hr {
|
|
73
85
|
.float-right {
|
74
86
|
float: right;
|
75
87
|
}
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
.blue {
|
80
|
-
background: #5bc0de;
|
81
|
-
color: white;
|
82
|
-
}
|
83
|
-
|
84
|
-
.panel-content {
|
85
|
-
padding: .5em;
|
88
|
+
hr {
|
89
|
+
background: red;
|
90
|
+
height: 1px !important;
|
86
91
|
}
|
87
92
|
|
88
|
-
|
89
|
-
cursor: pointer;
|
90
|
-
}
|
93
|
+
/* I */
|
91
94
|
|
92
|
-
.
|
93
|
-
|
95
|
+
.inline {
|
96
|
+
display: inline-block;
|
94
97
|
}
|
95
|
-
|
96
98
|
ul.inline li {
|
97
99
|
display: inline;
|
98
100
|
}
|
99
101
|
|
100
|
-
|
101
|
-
.
|
102
|
-
|
103
|
-
padding: 1em;
|
102
|
+
/* L */
|
103
|
+
textarea.large {
|
104
|
+
height: 400px;
|
104
105
|
}
|
105
106
|
|
106
|
-
.
|
107
|
-
|
107
|
+
.large-photos img {
|
108
|
+
width: 100%;
|
108
109
|
}
|
109
110
|
|
111
|
+
/* M */
|
112
|
+
|
110
113
|
.menu-secondary {}
|
111
114
|
.menu-secondary li {
|
112
115
|
display: inline;
|
@@ -116,12 +119,47 @@ ul.inline li {
|
|
116
119
|
background: white;
|
117
120
|
}
|
118
121
|
|
122
|
+
.panel-content {
|
123
|
+
padding: .5em;
|
124
|
+
}
|
125
|
+
.thumb {
|
126
|
+
background: dedede;
|
127
|
+
border: 1px solid red;
|
128
|
+
width: 100px;
|
129
|
+
height: 100px;
|
130
|
+
}
|
131
|
+
ul.inline li {
|
132
|
+
padding-right: 1em;
|
133
|
+
}
|
134
|
+
|
135
|
+
.notice {
|
136
|
+
border: 1px solid green;
|
137
|
+
padding: .8em;
|
138
|
+
}
|
139
|
+
|
140
|
+
.youtube_img {
|
141
|
+
width: 100px;
|
142
|
+
}
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
119
151
|
/**
|
120
152
|
* manager...
|
121
153
|
*/
|
122
154
|
|
123
155
|
.manager--main-header {
|
124
156
|
background: url('/assets/bg/weather.png');
|
157
|
+
ul {
|
158
|
+
li {
|
159
|
+
display: inline;
|
160
|
+
padding: 1em;
|
161
|
+
}
|
162
|
+
}
|
125
163
|
}
|
126
164
|
.manager--main-header hr {
|
127
165
|
margin-top: 0;
|
@@ -137,17 +175,6 @@ ul.inline li {
|
|
137
175
|
border-bottom: 1px solid red;
|
138
176
|
}
|
139
177
|
|
140
|
-
/**
|
141
|
-
* pagination
|
142
|
-
*/
|
143
|
-
|
144
|
-
/* nav.pagination {
|
145
|
-
padding-left: 1em;
|
146
|
-
background: transparent;
|
147
|
-
}
|
148
|
-
nav.pagination
|
149
|
-
*/
|
150
|
-
|
151
178
|
|
152
179
|
/**
|
153
180
|
* reports
|
@@ -160,41 +187,6 @@ nav.pagination
|
|
160
187
|
}
|
161
188
|
|
162
189
|
|
163
|
-
/**
|
164
|
-
* ally, stock watches
|
165
|
-
*/
|
166
|
-
.price {
|
167
|
-
/* margin-left: 1em; */
|
168
|
-
}
|
169
|
-
.descriptive {
|
170
|
-
line-height: 2em;
|
171
|
-
}
|
172
|
-
.price::before {
|
173
|
-
content: "$";
|
174
|
-
position: absolute;
|
175
|
-
top: 1em;
|
176
|
-
left: 0;
|
177
|
-
}
|
178
|
-
table.stock_watches td {
|
179
|
-
border-right: 1px solid cyan;
|
180
|
-
padding: 15px;
|
181
|
-
}
|
182
|
-
table.stock_watches .trashy {
|
183
|
-
background: #cecece;
|
184
|
-
}
|
185
|
-
|
186
|
-
.stock-option {
|
187
|
-
/* border: 1px solid red; */
|
188
|
-
border-radius: 5px;
|
189
|
-
display: inline-block;
|
190
|
-
padding: 5px;
|
191
|
-
box-shadow: 2px 2px 5px grey;
|
192
|
-
margin: 5px;
|
193
|
-
}
|
194
|
-
.stock-option:hover {
|
195
|
-
box-shadow: 3px 3px 5px grey;
|
196
|
-
}
|
197
|
-
|
198
190
|
/*
|
199
191
|
* newsitems
|
200
192
|
*/
|
@@ -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,9 @@
|
|
1
|
+
/**
|
2
|
+
* utils first
|
3
|
+
*/
|
4
|
+
.red-cross {
|
5
|
+
position: absolute;
|
6
|
+
}
|
1
7
|
|
2
8
|
.maps-index {
|
3
9
|
h1 {
|
@@ -22,7 +28,7 @@
|
|
22
28
|
align-content: flex-start;
|
23
29
|
|
24
30
|
height: 3em;
|
25
|
-
line-height: 3em;
|
31
|
+
line-height: 3em;
|
26
32
|
|
27
33
|
width: 100%;
|
28
34
|
margin: 0 0 1em 0;
|
@@ -43,17 +49,41 @@
|
|
43
49
|
border: 1px solid yellow;
|
44
50
|
}
|
45
51
|
}
|
52
|
+
.markers-list {
|
53
|
+
.item {
|
54
|
+
border: 1px solid #d59d05; /* brown*/
|
55
|
+
padding: .5em;
|
56
|
+
margin: 1em 0 0 0;
|
57
|
+
}
|
58
|
+
}
|
46
59
|
}
|
47
60
|
|
48
61
|
.markers--form {
|
49
|
-
|
50
|
-
|
62
|
+
.image-thumb {
|
63
|
+
border: 1px solid yellow;
|
64
|
+
position: relative;
|
65
|
+
display: inline-block;
|
66
|
+
|
67
|
+
|
68
|
+
}
|
51
69
|
}
|
52
70
|
|
53
|
-
.
|
54
|
-
.
|
55
|
-
border: 1px solid
|
56
|
-
|
57
|
-
|
71
|
+
.maps-map-editor {
|
72
|
+
.map-editor {
|
73
|
+
border: 1px solid red;
|
74
|
+
position: relative;
|
75
|
+
|
76
|
+
.marker {
|
77
|
+
position: absolute;
|
78
|
+
top: 0;
|
79
|
+
left: 0;
|
80
|
+
|
81
|
+
border: 1px solid yellow;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
.markers-list {
|
85
|
+
.item {
|
86
|
+
border: 1px solid green;
|
87
|
+
}
|
58
88
|
}
|
59
89
|
}
|
@@ -25,14 +25,16 @@ module IshManager
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def set_lists
|
28
|
-
@sites_list = Site.all.list
|
29
28
|
@cities_list = City.list
|
30
|
-
@venues_list = Venue.all.list
|
31
|
-
@reports_list = Report.all.list
|
32
29
|
@galleries_list = Gallery.all.list
|
33
|
-
@
|
34
|
-
@
|
30
|
+
@locations_list = ::Gameui::Map.list
|
31
|
+
@maps_list = ::Gameui::Map.list
|
32
|
+
@reports_list = Report.all.list
|
33
|
+
@sites_list = Site.all.list
|
35
34
|
@tags_list = Tag.list
|
35
|
+
@user_profiles_list = IshModels::UserProfile.all.list
|
36
|
+
@venues_list = Venue.all.list
|
37
|
+
@videos_list = Video.all.list
|
36
38
|
end
|
37
39
|
|
38
40
|
def access_denied exception
|
@@ -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
|
@@ -2,7 +2,7 @@
|
|
2
2
|
class IshManager::FeaturesController < IshManager::ApplicationController
|
3
3
|
|
4
4
|
before_action :set_lists
|
5
|
-
|
5
|
+
|
6
6
|
def new
|
7
7
|
if params[:city_id]
|
8
8
|
@city = City.find params[:city_id]
|
@@ -70,7 +70,7 @@ class IshManager::FeaturesController < IshManager::ApplicationController
|
|
70
70
|
@feature = @tag.features.find params[:id]
|
71
71
|
authorize! :edit_feature, @tag
|
72
72
|
end
|
73
|
-
|
73
|
+
|
74
74
|
if params[:venue_id]
|
75
75
|
@venue = Tag.find params[:venue_id]
|
76
76
|
@feature = @venue.features.find params[:id]
|
@@ -81,13 +81,13 @@ class IshManager::FeaturesController < IshManager::ApplicationController
|
|
81
81
|
|
82
82
|
def update
|
83
83
|
unless params[:city_id].blank?
|
84
|
-
@city = City.find params[:city_id]
|
84
|
+
@city = City.find params[:city_id]
|
85
85
|
authorize! :update_feature, @city
|
86
86
|
@feature = @city.features.find params[:id]
|
87
87
|
redirect_path = city_path( @city )
|
88
88
|
end
|
89
89
|
unless params[:site_id].blank?
|
90
|
-
@site = Site.find params[:site_id]
|
90
|
+
@site = Site.find params[:site_id]
|
91
91
|
authorize! :update_feature, @site
|
92
92
|
@feature = @site.features.find params[:id]
|
93
93
|
redirect_path = site_path( @site )
|
@@ -98,7 +98,7 @@ class IshManager::FeaturesController < IshManager::ApplicationController
|
|
98
98
|
@feature = @tag.features.find params[:id]
|
99
99
|
redirect_path = tag_path( @tag )
|
100
100
|
end
|
101
|
-
|
101
|
+
|
102
102
|
authorize! :update, @feature
|
103
103
|
|
104
104
|
if @feature.update_attributes params[:feature].permit!
|
@@ -111,7 +111,7 @@ class IshManager::FeaturesController < IshManager::ApplicationController
|
|
111
111
|
else
|
112
112
|
flash[:alert] = 'No Luck. ' + @feature.errors.messages
|
113
113
|
render :action => :edit
|
114
|
-
end
|
114
|
+
end
|
115
115
|
end
|
116
116
|
|
117
117
|
def index
|
@@ -145,6 +145,6 @@ class IshManager::FeaturesController < IshManager::ApplicationController
|
|
145
145
|
end
|
146
146
|
redirect_to request.referrer
|
147
147
|
end
|
148
|
-
|
148
|
+
|
149
149
|
end
|
150
150
|
|
@@ -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: "" ).order( slug: :asc )
|
9
|
+
@all_maps = Gameui::Map.all.order( slug: :asc )
|
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,13 @@ 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
|
+
|
26
35
|
if map_params[:parent_slug].present?
|
27
36
|
@map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
|
28
37
|
end
|
@@ -39,6 +48,12 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
39
48
|
|
40
49
|
def update
|
41
50
|
authorize! :update, @map
|
51
|
+
|
52
|
+
if params[:image]
|
53
|
+
image = ::Ish::ImageAsset.new :image => params[:image]
|
54
|
+
@map.image = image
|
55
|
+
end
|
56
|
+
|
42
57
|
respond_to do |format|
|
43
58
|
if map_params[:parent_slug].present?
|
44
59
|
@map.parent = ::Gameui::Map.find_by({ slug: map_params[:parent_slug] })
|
@@ -61,10 +76,15 @@ class IshManager::MapsController < IshManager::ApplicationController
|
|
61
76
|
end
|
62
77
|
end
|
63
78
|
|
79
|
+
def map_editor
|
80
|
+
authorize! :update, @map
|
81
|
+
end
|
82
|
+
|
64
83
|
private
|
65
84
|
|
66
85
|
def set_map
|
67
|
-
@map = ::Gameui::Map.
|
86
|
+
@map = ::Gameui::Map.where(id: params[:id]).first
|
87
|
+
@map ||= Gameui::Map.find_by(slug: params[:id])
|
68
88
|
end
|
69
89
|
|
70
90
|
def map_params
|
@@ -25,6 +25,15 @@ 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
|
30
39
|
@marker.map.touch
|
@@ -37,6 +46,16 @@ class IshManager::MarkersController < IshManager::ApplicationController
|
|
37
46
|
|
38
47
|
def update
|
39
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
|
+
|
40
59
|
respond_to do |format|
|
41
60
|
if @marker.update(marker_params)
|
42
61
|
@marker.map.touch
|