Customer does not want the new “masonry-like” design of the surroundings page, and wants the same style they already had: a regular list with text and photo, alternating the photo’s side. And, of course, they want to be able to add and edit them themselves. It is like another carousel, but with an additional rich-text description. The photos that we had in that page are no longer of use.
24 lines
719 B
PL/PgSQL
24 lines
719 B
PL/PgSQL
-- Deploy camper:add_surroundings_highlight to pg
|
|
-- requires: roles
|
|
-- requires: schema_camper
|
|
-- requires: surroundings_highlight
|
|
|
|
begin;
|
|
|
|
set search_path to camper, public;
|
|
|
|
create or replace function add_surroundings_highlight(company integer, media_id integer, name text, description text) returns integer as
|
|
$$
|
|
insert into surroundings_highlight (company_id, media_id, name, description)
|
|
values (company, media_id, name, xmlparse(content description))
|
|
returning surroundings_highlight_id
|
|
;
|
|
$$
|
|
language sql
|
|
;
|
|
|
|
revoke execute on function add_surroundings_highlight(integer, integer, text, text) from public;
|
|
grant execute on function add_surroundings_highlight(integer, integer, text, text) to admin;
|
|
|
|
commit;
|