[ARVADOS] updated: 09eda24d448ecc47a3afdd7c9276e68e1967e38e

git at public.curoverse.com git at public.curoverse.com
Wed Feb 5 00:36:43 EST 2014


Summary of changes:
 .../app/controllers/user_agreements_controller.rb  |    5 +++++
 apps/workbench/app/controllers/users_controller.rb |    2 ++
 .../app/views/layouts/application.html.erb         |   14 ++++++++++++--
 .../app/views/user_agreements/index.html.erb       |    2 --
 apps/workbench/app/views/users/_home.html.erb      |    1 -
 apps/workbench/app/views/users/welcome.html.erb    |    2 --
 6 files changed, 19 insertions(+), 7 deletions(-)

       via  09eda24d448ecc47a3afdd7c9276e68e1967e38e (commit)
      from  4008255ff579edf745b50599e0368106dc95acaa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 09eda24d448ecc47a3afdd7c9276e68e1967e38e
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 4 21:35:48 2014 -0800

    Hide breadcrumbs and brand drop-down on welcome and user_agreement
    pages.
    
    refs #1979

diff --git a/apps/workbench/app/controllers/user_agreements_controller.rb b/apps/workbench/app/controllers/user_agreements_controller.rb
index 6ab8ae2..0041113 100644
--- a/apps/workbench/app/controllers/user_agreements_controller.rb
+++ b/apps/workbench/app/controllers/user_agreements_controller.rb
@@ -15,4 +15,9 @@ class UserAgreementsController < ApplicationController
     current_user.activate
     redirect_to(params[:return_to] || :back)
   end
+
+  def index
+    @suppress_breadcrumbs = true
+    super
+  end
 end
diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index 70fa3f6..3b23b6a 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -7,6 +7,7 @@ class UsersController < ApplicationController
     if current_user
       home
     end
+    @suppress_breadcrumbs = true
   end
 
   def home
@@ -53,6 +54,7 @@ class UsersController < ApplicationController
     @tutorial_complete = {
       'Run a job' => @my_last_job
     }
+    @suppress_breadcrumbs = true
     respond_to do |f|
       f.js { render template: 'users/home.js' }
       f.html { render template: 'users/home' }
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index 5b1e6b2..26b3410 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -35,11 +35,19 @@
   <div class="navbar navbar-fixed-top">
     <div class="navbar-inner">
       <ul class="nav">
+        <% if !current_user.andand.is_active %>
         <li class="dropdown">
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown" href="/">
+          <a href="/">
+            <b><%= Rails.configuration.site_name rescue Rails.application.class.parent_name %></b>
+          </a>
+        </li>
+        <% else %>
+        <li class="dropdown">
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
             <b><%= Rails.configuration.site_name rescue Rails.application.class.parent_name %></b>
           </a>
           <ul class="dropdown-menu">
+            <% if current_user.andand.is_active %>
             <li><%= link_to 'Home', root_url %></li>
             <li class="divider"></li>
             <li><%= link_to 'Keys', authorized_keys_path %></li>
@@ -63,10 +71,12 @@
             <li><%= link_to 'Groups', groups_path %></li>
             <li><%= link_to 'Compute nodes', nodes_path %></li>
             <li><%= link_to 'Keep disks', keep_disks_path %></li>
+            <% end %>
           </ul>
         </li>
+        <% end %>
       </ul>
-      <%= content_for?(:breadcrumbs) ? yield(:breadcrumbs) : render(partial: 'breadcrumbs') %>
+      <%= yield(:breadcrumbs) unless @suppress_breadcrumbs %>
 
       <ul class="nav pull-right">
         <li>
diff --git a/apps/workbench/app/views/user_agreements/index.html.erb b/apps/workbench/app/views/user_agreements/index.html.erb
index acd5ba1..ed758af 100644
--- a/apps/workbench/app/views/user_agreements/index.html.erb
+++ b/apps/workbench/app/views/user_agreements/index.html.erb
@@ -1,5 +1,3 @@
-<% content_for :breadcrumbs do '' end %>
-
 <% n_files = @required_user_agreements.collect(&:files).flatten(1).count %>
 <% content_for :page_title do %>
 <% if n_files == 1 %>
diff --git a/apps/workbench/app/views/users/_home.html.erb b/apps/workbench/app/views/users/_home.html.erb
index 16e8449..face6c1 100644
--- a/apps/workbench/app/views/users/_home.html.erb
+++ b/apps/workbench/app/views/users/_home.html.erb
@@ -1,4 +1,3 @@
-<% content_for :breadcrumbs do raw '<!-- -->' end %>
 <% content_for :css do %>
       .dash-list {
         padding: 9px 0;
diff --git a/apps/workbench/app/views/users/welcome.html.erb b/apps/workbench/app/views/users/welcome.html.erb
index 4fe5518..b782108 100644
--- a/apps/workbench/app/views/users/welcome.html.erb
+++ b/apps/workbench/app/views/users/welcome.html.erb
@@ -1,5 +1,3 @@
-<% content_for :breadcrumbs do raw '<!-- -->' end %>
-
 <%= image_tag "dax.png", style: "float: left; max-width: 25%; margin-right: 2em" %>
 <h1>Hi there!  Please log in to use <%= Rails.configuration.site_name %>.</h1>
 <div class="row-fluid">

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list