This one has an input to select the icon. It makes no sense to choose an icon only by name, thus a <select> is not appropriate, and had to use a hidden input with a row of button to choose the icon from. This works now only because there are very few icons; we’ll need to choose a different approach when there are many more icons. Since now the icons have to be defined in CSS for both the public and admin sections, i had to split it into a separate file that both sites can use. I considered the option to “include” that CSS with m4, like i do for images in demo.sql, but it made everything too complicated (e.g., having to call make for each change in the CSS), and decided to load that CSS in a separate <link>.
23 lines
653 B
PL/PgSQL
23 lines
653 B
PL/PgSQL
-- Test translation
|
|
set client_min_messages to warning;
|
|
create extension if not exists pgtap;
|
|
reset client_min_messages;
|
|
|
|
begin;
|
|
|
|
select plan(5);
|
|
|
|
set search_path to camper, public;
|
|
|
|
select has_composite('camper', 'translation', 'Composite type camper.translation should exist');
|
|
select columns_are('camper', 'translation', array['lang_tag', 'endonym', 'missing']);
|
|
select col_type_is('camper'::name, 'translation'::name, 'lang_tag'::name, 'text');
|
|
select col_type_is('camper'::name, 'translation'::name, 'endonym'::name, 'text');
|
|
select col_type_is('camper'::name, 'translation'::name, 'missing'::name, 'boolean');
|
|
|
|
|
|
select *
|
|
from finish();
|
|
|
|
rollback;
|