graphical filtering of accession search
[sgn.git] / mason / site / toolbar / login.mas
blobe6792af8fbd7e0df3938ff7fbb4bf7a0b825bb00
2 % # if the site is a mirror, gray out the login/logout links
3 % if( $c->config->{'is_mirror'} ) {
4     <a style="line-height: 1.2; text-decoration: underline; background: none" href="<% $c->config->{main_production_site_url} %>" title="log in on main site">main site</a>
5 % } elsif ( $c->config->{disable_login} ) {
7   <li class="dropdown">
8     <div class="btn-group" role="group" aria-label="..." style="height:34px; margin: 1px 0px 0px 0px" >
9        <button class="btn btn-primary disabled" type="button" style="margin: 7px 7px 0px 0px">Login</button>
10     </div>
12   </li>
14 % } elsif ( $c->req->uri->path_query =~ "logout=yes") {
16   <li class="dropdown">
18     <div class="btn-group" role="group" aria-label="..." style="height:34px; margin: 1px 0px 0px 0px" >
19       <a href="/solpeople/login.pl">
20         <button class="btn btn-primary" type="button" style="margin: 7px 7px 0px 0px">Login</button>
21       </a>
22     </div>
24   </li>
26 % } elsif ( $c->user_exists ) {
27 %   my $sp_person_id = $c->user->get_object->get_sp_person_id;
28   <li>
30     <div class="btn-group" role="group" aria-label="..." style="height:34px; margin: 1px 3px 0px 0px">
31       <button id="navbar_profile" class="btn btn-primary" type="button" onclick='location.href="/solpeople/profile/<% $sp_person_id %>"'' style="margin: 7px 0px 0px 0px" title="My Profile"><% $c->user->get_object->get_username || '' %></button>
32       <button id="navbar_lists" name="lists_link" class="btn btn-info" style="margin:7px 0px 0px 0px" type="button" title="Lists">
33         Lists <span class="glyphicon glyphicon-list-alt" ></span>
34       </button>
35       <!-- button id="navbar_datasets" name="datasets_link" class="btn btn-info" style="margin:7px 0px 0px 0px" type="button" title="Datasets">
36         Datasets <span class="glyphicon glyphicon-list-alt" ></span>
37       </button -->
38       <button id="navbar_personal_calendar" name="personal_calendar_link" class="btn btn-primary" style="margin:7px 0px 0px 0px" type="button" title="Your Calendar">Calendar&nbsp;<span class="glyphicon glyphicon-calendar" ></span>
39       </button>
40       <button id="navbar_logout" class="btn btn-default glyphicon glyphicon-log-out" style="margin:6px 0px 0px 0px" type="button" onclick="location.href='/solpeople/login.pl?logout=yes';" title="Logout"></button>
41     </div>
43   </li>
45 % } else {
47   <li class="dropdown">
49     <div class="btn-group" role="group" aria-label="..." style="height:34px; margin: 1px 0px 0px 0px" >
50       <a href="/solpeople/login.pl">
51         <button class="btn btn-primary" type="button" style="margin: 7px 7px 0px 0px">Login</button>
52       </a>
53     </div>
55   </li>
56 % }