X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/027a60ece8b12690c09b5e433339b03e55df065b..2304fc9d1a391372a6714502fb769c9d1a5ed182:/word/edit.plp diff --git a/word/edit.plp b/word/edit.plp index 1aade3e..0f212b8 100644 --- a/word/edit.plp +++ b/word/edit.plp @@ -10,6 +10,8 @@ Html({ raw => <<'EOT', + + EOT }); @@ -72,6 +74,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 +92,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 +111,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 => {-label => 'Crop 3:2', -json => 'image'}, 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

+ + <: }