X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/9e973bc5fa6723a0ab712c6272a8fbbd9800eff8..91810a36f31f93d25209e62f40aa24851aa33351:/word/edit.plp diff --git a/word/edit.plp b/word/edit.plp index f7d3948..426fb5c 100644 --- a/word/edit.plp +++ b/word/edit.plp @@ -72,6 +72,7 @@ my $user = eval { }; my %lang = ( + '' => ['(reference)'], 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'\N{BLACK STAR}', 'esperanto'], @@ -89,7 +90,9 @@ my %wordcol = ( prio => [ {-label => 'Level', -select => sub { my ($row) = @_; - my @enum = qw[ essential basic common distinctive optional invisible ]; + my @enum = qw[ + essential ubiquitous basic common distinctive specialised rare invisible + ]; return { ('' => 'parent') x (defined $row->{ref}), map { $_ => $enum[$_] } 0 .. $#enum @@ -106,13 +109,14 @@ my %wordcol = ( return "data/word/org/$_[0]->{id}.jpg"; }}, convert => {-label => 'Convert options', -json => 'image', -multiple => 1, -src => sub { - return "data/word/en/$_[0]->{id}.jpg"; + return "data/word/32/$_[0]->{id}.jpg"; }}, story => {-label => 'Story', type => 'textarea', hidden => 'hidden'}, ); if (my $search = $fields{q}) { - my %filter = (form => {ilike => '%'.$search.'%'}); + my %filter = $search eq '^' ? (cat => undef, ref => undef) : + (form => {ilike => '%'.parseinput($search).'%'}); my $results = $db->select(word => '*', \%filter); say '

Search