X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/6bc896dcaee8f907d4fb46e14720f8b5a51418fa..1c05401638473dda6f220b1a2111a439a7b9108e:/word/edit.plp diff --git a/word/edit.plp b/word/edit.plp index d7f093a..4a6daaa 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,15 @@ 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"; }}, + crop32 => {-json => 'image', type => 'hidden'}, # set by javascript interface 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

+ + <: }