forked from MarseyWorld/MarseyWorld
fix hole action kinds
parent
9794dfc061
commit
3bad5a07a5
|
@ -54,11 +54,16 @@ HOLEACTION_TYPES = {
|
||||||
"icon": 'fa-image-slash',
|
"icon": 'fa-image-slash',
|
||||||
"color": 'bg-danger',
|
"color": 'bg-danger',
|
||||||
},
|
},
|
||||||
'change_sidebar_image': {
|
'upload_sidebar_image': {
|
||||||
"str": 'changed the sidebar image',
|
"str": 'uploaded a sidebar image',
|
||||||
"icon": 'fa-image',
|
"icon": 'fa-image',
|
||||||
"color": 'bg-primary'
|
"color": 'bg-primary'
|
||||||
},
|
},
|
||||||
|
'delete_sidebar_image': {
|
||||||
|
"str": 'deleted a sidebar image',
|
||||||
|
"icon": 'fa-image-slash',
|
||||||
|
"color": 'bg-danger',
|
||||||
|
},
|
||||||
'change_marsey': {
|
'change_marsey': {
|
||||||
"str": 'changed the hole marsey',
|
"str": 'changed the hole marsey',
|
||||||
"icon": 'fa-cat',
|
"icon": 'fa-cat',
|
||||||
|
|
|
@ -536,7 +536,7 @@ def upload_hole_sidebar(v, hole):
|
||||||
|
|
||||||
ma = HoleAction(
|
ma = HoleAction(
|
||||||
hole=hole.name,
|
hole=hole.name,
|
||||||
kind='upload_sidebar',
|
kind='upload_sidebar_image',
|
||||||
user_id=v.id
|
user_id=v.id
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
@ -565,7 +565,7 @@ def delete_hole_sidebar(v, hole, index):
|
||||||
|
|
||||||
ma = HoleAction(
|
ma = HoleAction(
|
||||||
hole=hole.name,
|
hole=hole.name,
|
||||||
kind='delete_sidebar',
|
kind='delete_sidebar_image',
|
||||||
_note=index,
|
_note=index,
|
||||||
user_id=v.id
|
user_id=v.id
|
||||||
)
|
)
|
||||||
|
@ -591,7 +591,7 @@ def delete_all_hole_sidebars(v, hole):
|
||||||
|
|
||||||
ma = HoleAction(
|
ma = HoleAction(
|
||||||
hole=hole.name,
|
hole=hole.name,
|
||||||
kind='delete_sidebar',
|
kind='delete_sidebar_image',
|
||||||
_note='all',
|
_note='all',
|
||||||
user_id=v.id
|
user_id=v.id
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
alter table holes add column sidebarurls character varying(60)[] default '{}'::character varying[] not null;
|
alter table holes add column sidebarurls character varying(60)[] default '{}'::character varying[] not null;
|
||||||
update holes set sidebarurls = array_append(sidebarurls, sidebarurl) WHERE sidebarurl is not null;
|
update holes set sidebarurls = array_append(sidebarurls, sidebarurl) WHERE sidebarurl is not null;
|
||||||
alter table holes drop column sidebarurl;
|
alter table holes drop column sidebarurl;
|
||||||
|
update hole_actions set kind='upload_sidebar_image' where kind='change_sidebar_image';
|
||||||
|
|
Loading…
Reference in New Issue