This is a separate carousel from the one displayed at the bottom with location info; it is, i suppose, a carousel for the hero image. For the database, it works exactly as the home carousel, but on the front had to use AlpineJS instead of Slick because it needs to show a text popping up from the bottom when the slide is show, something i do not know how to do in Slick. It now makes no sense to have the carousel inside the “nature” section, because the heading is no longer in there, and moved it out into a new “hero” div. Since i now have two carousels in home, i had to add additional attributes to carousel.AdminHandler to know which URL to point to when POSTing, PUTting, or redirecting.
23 lines
580 B
PL/PgSQL
23 lines
580 B
PL/PgSQL
-- Deploy camper:remove_cover_carousel_slide to pg
|
|
-- requires: roles
|
|
-- requires: schema_camper
|
|
-- requires: cover_carousel
|
|
-- requires: cover_carousel_i18n
|
|
|
|
begin;
|
|
|
|
set search_path to camper, public;
|
|
|
|
create or replace function remove_cover_carousel_slide (media_id integer) returns void as
|
|
$$
|
|
delete from cover_carousel_i18n where media_id = $1;
|
|
delete from cover_carousel where media_id = $1;
|
|
$$
|
|
language sql
|
|
;
|
|
|
|
revoke execute on function remove_cover_carousel_slide (integer) from public;
|
|
grant execute on function remove_cover_carousel_slide (integer) to admin;
|
|
|
|
commit;
|