From a65ab09404b466533b7e6d549000adf17e152106 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 21 Jun 2010 14:40:36 +0200 Subject: [PATCH] show dependent or all code snippets button --- lib/MojoFacets/Code.pm | 2 +- templates/code/index.html.ep | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/MojoFacets/Code.pm b/lib/MojoFacets/Code.pm index 8f52d69..0a523ef 100644 --- a/lib/MojoFacets/Code.pm +++ b/lib/MojoFacets/Code.pm @@ -28,7 +28,7 @@ sub index { my $found = -1; $found += $columns->{$_} foreach @deps; warn "# depends $depends $found $#deps\n"; - next unless $found == $#deps; + next unless $found == $#deps || $self->param('all_code'); $snippets->{$depends}->{$description} = read_file $full_path, binmode => ':utf8'; } diff --git a/templates/code/index.html.ep b/templates/code/index.html.ep index d1a408e..31b0d2a 100644 --- a/templates/code/index.html.ep +++ b/templates/code/index.html.ep @@ -24,4 +24,13 @@ % } +
+% if ( param('all_code') ) { + + +% } else { + +% } +
+ <%= dumper stash('snippets') %> -- 2.20.1