Skip to content

Commit

Permalink
Link to the surnames page from the surnames popularity page
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jul 28, 2024
1 parent f3e111c commit 7cd3e50
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion dynamic-site/lib/Ged2site/Display/graphs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1207,9 +1207,14 @@ sub create_cloud
foreach my $name(@all) {
my $count = $name->{'count'};
if($count == 1) {
# Go straight to the person
$cloud->add($name->{'name'}, "/cgi-bin/page.fcgi?page=people&entry=$name->{people}", 1);
} else {
} elsif($sex) {
# First names - no links
$cloud->add_static($name->{'name'}, $count);
} else {
# Surnames - add links
$cloud->add($name->{'name'}, "/cgi-bin/page.fcgi?page=surnames&surname=$name->{name}", $count);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
[% END %]
<dt>[% initial %]</dt><dd>
[% END %]
<a href="?page=surnames&amp;filename=[%- surname.filename | uri -%]&amp;surname=[%- surname.surname | uri -%]">[% surname.surname %]</a>
<a href="?page=surnames&amp;surname=[%- surname.surname | uri -%]">[% surname.surname %]</a>
[% END %]
</dd></dl>
[% ELSIF people %]
Expand Down
3 changes: 2 additions & 1 deletion dynamic-site/templates/en/web/Ged2site/Display/surnames.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
</div>
<div id="container">
<center>
[ <a href="?page=home">Home</a> ] |
[ <a href="?page=people&amp;home=1">Home Person</a> ] |
[ <a href="?page=censuses">Census Index</a> ] |
[% IF surname %]
Expand Down Expand Up @@ -78,7 +79,7 @@
<ul id="nav">
[% END %]
<li>
<a href="?page=surnames&amp;filename=[%- surname.filename | uri -%]&amp;surname=[%- surname.surname | uri -%]">[% surname.surname %]</a>
<a href="?page=surnames&amp;surname=[%- surname.surname | uri -%]">[% surname.surname %]</a>
</li>
[% END %]
</ul>
Expand Down
2 changes: 1 addition & 1 deletion ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ my %censusmaps = (

# $ged->validate();

my $home = $opts{h};
my $home = $opts{'h'};
if((!defined($home)) && defined($config)) {
$home = $config->{'home'};
if(ref($home) eq 'ARRAY') {
Expand Down

0 comments on commit 7cd3e50

Please sign in to comment.