nl => ["\N{REGIONAL INDICATOR SYMBOL LETTER N}\N{REGIONAL INDICATOR SYMBOL LETTER L}", 'nederlands'],
en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
eo => [qq'<span style="color:green">\N{BLACK STAR}</span>', 'esperanto'],
nl => ["\N{REGIONAL INDICATOR SYMBOL LETTER N}\N{REGIONAL INDICATOR SYMBOL LETTER L}", 'nederlands'],
en => ["\N{REGIONAL INDICATOR SYMBOL LETTER G}\N{REGIONAL INDICATOR SYMBOL LETTER B}", 'english'],
eo => [qq'<span style="color:green">\N{BLACK STAR}</span>', 'esperanto'],
return {
('' => 'parent') x (defined $row->{ref}),
map { $_ => $enum[$_] } 0 .. $#enum
return {
('' => 'parent') x (defined $row->{ref}),
map { $_ => $enum[$_] } 0 .. $#enum
return "data/word/org/$_[0]->{id}.jpg";
}},
convert => {-label => 'Convert options', -json => 'image', -multiple => 1, -src => sub {
return "data/word/org/$_[0]->{id}.jpg";
}},
convert => {-label => 'Convert options', -json => 'image', -multiple => 1, -src => sub {
story => {-label => 'Story', type => 'textarea', hidden => 'hidden'},
);
if (my $search = $fields{q}) {
story => {-label => 'Story', type => 'textarea', hidden => 'hidden'},
);
if (my $search = $fields{q}) {
my $results = $db->select(word => '*', \%filter);
say '<h1>Search</h1><ul>';
printf("<li><small>%s</small> %s %s</li>\n",
my $results = $db->select(word => '*', \%filter);
say '<h1>Search</h1><ul>';
printf("<li><small>%s</small> %s %s</li>\n",
my $imagecol = $row->{image}; # backup image subcolumns
ref $_ eq 'HASH' and $_ = encode_json($_) for values %{$row};
my $imagecol = $row->{image}; # backup image subcolumns
ref $_ eq 'HASH' and $_ = encode_json($_) for values %{$row};
} or do {
my ($warn, @details) = ref $@ ? @{$@} : $@;
Alert([ "Thumbnail image not generated", $warn ], @details);
} or do {
my ($warn, @details) = ref $@ ? @{$@} : $@;
Alert([ "Thumbnail image not generated", $warn ], @details);
printf '<span class=inline>';
print $row->input($col => $attr);
if (my $imgsrc = $attr->{-src}) {
printf '<span class=inline>';
print $row->input($col => $attr);
if (my $imgsrc = $attr->{-src}) {
- printf('<img id="%spreview" src="/%s" alt="%s"%s />',
- $col, $_, $row->{form}, $col eq 'source' && ' hidden'
+ my $hide = $col eq 'source';
+ printf '<span id="%spreview">', $col unless $hide;
+ printf('<img src="/%s" alt="%s"%s />',
+ $_, $row->{form}, $hide && qq( id="${col}preview" hidden)
'trans', 'Translations';
my @children = !$row->{id} ? () :
$db->select(word => '*', {ref => $row->{id}}, 'lang, id')->hashes;
'trans', 'Translations';
my @children = !$row->{id} ? () :
$db->select(word => '*', {ref => $row->{id}}, 'lang, id')->hashes;