Skip to content
Browse files

Fix consistency of the breadcrumb links

  • Loading branch information...
1 parent 4099c0e commit 057f9a13b121b4262c706a328c8317eddc839ddf @kimrutherford kimrutherford committed Apr 5, 2013
Showing with 20 additions and 12 deletions.
  1. +2 −2 lib/PomCur/Controller/Root.pm
  2. +2 −1 pomcur.yaml
  3. +7 −9 root/breadcrumbs.mhtml
  4. +9 −0 root/curs/breadcrumbs.mhtml
View
4 lib/PomCur/Controller/Root.pm
@@ -90,7 +90,7 @@ sub front :Path :Args(0)
{
my ($self, $c) = @_;
- $c->forward($c->config()->{home_path});
+ $c->forward($c->config()->{instance_front_path});
$c->detach();
}
@@ -228,7 +228,7 @@ sub login : Global {
{ title => "Login successful" };
if ($return_path =~ m/logout|login/) {
- $c->forward($c->config()->{home_path});
+ $c->forward($c->config()->{instance_front_path});
return 0;
}
} else {
View
3 pomcur.yaml
@@ -12,7 +12,8 @@ app_version: v540
schema_version: 1
# the path that the home link goes to
-home_path: /docs/instance_front
+instance_front_path: /docs/instance_front
+canto_front_path: /docs/canto_front
help_path: /docs/index
# if zero, the user will need to log in before the links on the front page are
View
16 root/breadcrumbs.mhtml
@@ -1,26 +1,24 @@
<div id="breadcrumbs">
-% if ($current_uri ne $home_path) {
<div class="breadcrumbs-link">
<a id="breadcrumbs-home-link"
- href="<% $home_path %>" title="Go to the home page">
- Home
+ href="<% $instance_top_uri %>" title="Go to <% $instance_text %>">
+ <% $instance_text %>
</a>
-% if ($current_path ne '/' && $current_path !~ m|/local/| &&
-% $current_path !~ m:/(account|login)$:) {
+% if ($current_path =~ m|/view/|) {
<div class="breadcrumbs-link">
<a id="breadcrumbs-admin-link"
href="<% $admin_path %>" title="Go to the admin page">
- Admin
+ Admin page
</a>
</div>
% }
</div>
-% }
</div>
<%init>
+my $config = $c->config();
my $admin_path = $c->uri_for('/track/');
my $current_path = $c->local_path();
-my $home_path = $c->uri_for($c->config()->{home_path});
-my $current_uri = $c->req->uri();
+my $instance_text = $config->{database_name} . ' ' . $config->{name};
+my $instance_top_uri = $c->uri_for('/');
</%init>
View
9 root/curs/breadcrumbs.mhtml
@@ -1,4 +1,9 @@
<div id="breadcrumbs">
+ <div class="breadcrumbs-link">
+ <a id="breadcrumbs-home-link"
+ href="<% $instance_top_uri %>" title="Go to <% $instance_text %>">
+ <% $instance_text %>
+ </a>
% if ($is_admin) {
<div id="breadcrumbs-admin-link" class="breadcrumbs-link">
<a href="<% $admin_path %>" title="Go to the admin page">
@@ -22,12 +27,16 @@
</div>
% }
</div>
+</div>
<%init>
+my $config = $c->config();
my $current_path_uri = $c->stash()->{current_path_uri};
my $gene = $c->stash()->{gene};
my $pub = $c->stash()->{pub};
my $curs_root_uri = $c->stash()->{curs_root_uri};
+my $instance_text = $config->{database_name} . ' ' . $config->{name};
+my $instance_top_uri = $c->uri_for('/');
my $gene_url;
if (defined $gene) {

0 comments on commit 057f9a1

Please sign in to comment.
Something went wrong with that request. Please try again.