$cookie->{ 'ASSEMBLY' } = $cgi->param( 'assembly' ) || '';
$cookie->{ 'CONTIG' } = $cgi->param( 'contig' ) || '';
$cookie->{ 'Q_ID' } = $cgi->param( 'q_id' );
+ $cookie->{ 'NAV_START' } ||= $cgi->param( 'nav_start' );
+ $cookie->{ 'NAV_END' } ||= $cgi->param( 'nav_end' );
$cookie->{ 'S_BEG' } = $cgi->param( 's_beg' );
$cookie->{ 'S_END' } = $cgi->param( 's_end' );
$cookie->{ 'STRAND' } = $cgi->param( 'strand' );
push @html, section_taxonomy_table( $cookie );
push @html, section_navigate( $cookie );
push @html, section_browse( $cookie );
+ push @html, section_permalink( $cookie );
return wantarray ? @html : \@html;
}
}
+sub section_permalink
+{
+ # Martin A. Hansen, December 2009.
+
+ # Return HTML with a permanent link to current browser view.
+
+ my ( $cookie, # cookie hash
+ ) = @_;
+
+ # Returns a list.
+
+ my ( $href, @html );
+
+ $href = join( "&",
+ "$cookie->{ 'SCRIPT' }?page=browse",
+ "user=$cookie->{ 'USER' }",
+ "clade=$cookie->{ 'CLADE' }",
+ "genome=$cookie->{ 'GENOME' }",
+ "assembly=$cookie->{ 'ASSEMBLY' }",
+ "contig=$cookie->{ 'CONTIG' }",
+ "nav_start=$cookie->{ 'NAV_START' }",
+ "nav_end=$cookie->{ 'NAV_END' }",
+ "session_id=$cookie->{ 'SESSION_ID' }",
+ );
+
+ push @html, Maasha::XHTML::p( txt => Maasha::XHTML::ln( txt => "Permalink", href => $href ), class => 'center' );
+
+ return wantarray ? @html : \@html;
+}
+
+
sub section_export
{
# Martin A. Hansen, November 2009.