latin: hardcoded tetromino block cascades
[sheet.git] / writer.plp
index a5aa431cf188dca558183c9aec9738c16b8944bd..c6d5898b77a93870ba9e3f1fbace448b44c13e89 100644 (file)
@@ -105,7 +105,7 @@ my %wordcol = (
        thumb   => {-label => 'Convert options', -multiple => 1, -src => sub {
                return "data/word/en/$_[0]->{id}.jpg";
        }},
-       story   => {-label => 'Story', type => 'textarea'},
+       story   => {-label => 'Story', type => 'textarea', hidden => 'hidden'},
 );
 
 if (my $search = $fields{q}) {
@@ -228,6 +228,7 @@ bless $row, 'Shiar_Sheet::FormRow';
 for my $col (@wordcols) {
        my $info = $wordcol{$col} or next;
        my ($attr, @span) = ref $info eq 'ARRAY' ? @{$info} : $info;
+       next if delete $attr->{hidden} and not $row->{$col};
        my $title = ref $attr ? delete $attr->{-label} : $attr;
        printf '<li><label for="%s">%s</label><p>', $col, $title;
                printf '<span class=inline>';