[ARVADOS] created: bf5d503e0ccc0a8b08c1c0a5e0c53677357c476d

git at public.curoverse.com git at public.curoverse.com
Fri Jan 31 20:38:32 EST 2014


        at  bf5d503e0ccc0a8b08c1c0a5e0c53677357c476d (commit)


commit bf5d503e0ccc0a8b08c1c0a5e0c53677357c476d
Author: Peter Amstutz <tetron at cosmos>
Date:   Fri Jan 31 20:38:47 2014 -0500

    Concept layout puts right hand sidebar on all pages.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 201c063..d9001c1 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base
   before_filter :find_object_by_uuid, :except => [:index, :render_exception, :render_not_found]
   before_filter :check_user_agreements, :except => [:render_exception, :render_not_found]
   theme :select_theme
+  before_filter :populate_side_panel
 
   begin
     rescue_from Exception,
@@ -262,4 +263,50 @@ class ApplicationController < ActionController::Base
   def select_theme
     return Rails.configuration.arvados_theme
   end
+
+  def populate_side_panel
+    @showallalerts = false
+    @my_ssh_keys = AuthorizedKey.where(authorized_user_uuid: current_user.uuid)
+    # @my_vm_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#virtual_machine', link_class: 'permission', name: 'can_login')
+    # @my_repo_perms = Link.where(tail_uuid: current_user.uuid, head_kind: 'arvados#repository', link_class: 'permission', name: 'can_write')
+
+    @my_tag_links = {}
+
+    @my_jobs = Job.
+      limit(10).
+      order('created_at desc').
+      where(created_by: current_user.uuid)
+
+    @my_collections = Collection.
+      limit(10).
+      order('created_at desc').
+      where(created_by: current_user.uuid)
+
+    Link.limit(1000).where(head_uuid: @my_collections.collect(&:uuid),
+                           link_class: 'tag').each do |link|
+      (@my_tag_links[link.head_uuid] ||= []) << link
+    end
+
+    @my_pipelines = PipelineInstance.
+      limit(10).
+      order('created_at desc').
+      where(created_by: current_user.uuid)
+
+
+    # A Tutorial is a Link which has link_class "resources" and name
+    # "wants", and is owned by the Tutorials Group (i.e., named
+    # "Arvados Tutorials" and owned by the system user).
+    @tutorial_group = Group.where(owner_uuid: User.system.uuid,
+                                  name: 'Arvados Tutorials').first
+    if @tutorial_group
+      @tutorial_links = Link.where(tail_uuid: @tutorial_group.uuid,
+                                   link_class: 'resources',
+                                   name: 'wants')
+    else
+      @tutorial_links = []
+    end
+    @tutorial_complete = {
+      'Run a job' => @my_last_job
+    }
+  end
 end
diff --git a/apps/workbench/app/views/users/_notifications.html.erb b/apps/workbench/app/views/application/_notifications.html.erb
similarity index 87%
rename from apps/workbench/app/views/users/_notifications.html.erb
rename to apps/workbench/app/views/application/_notifications.html.erb
index 9b9fc12..80a17e1 100644
--- a/apps/workbench/app/views/users/_notifications.html.erb
+++ b/apps/workbench/app/views/application/_notifications.html.erb
@@ -1,3 +1,32 @@
+<% content_for :css do %>
+      .dash-list {
+        padding: 9px 0;
+      }
+      .dash-list>ul>li>a>span {
+      min-width: 1.5em;
+      margin-left: auto;
+      margin-right: auto;
+      }
+      .centerme {
+      margin-left: auto;
+      margin-right: auto;
+      text-align: center;
+      }
+      .bigfatnumber {
+      font-size: 4em;
+      font-weight: bold;
+      }
+      .dax {
+      max-width: 10%;
+      margin-right: 1em;
+      float: left
+      }
+      .daxalert {
+      overflow: hidden;
+      }
+<% end %>
+
+
 <% if current_user.andand.is_active %>
 
 <% if @my_ssh_keys.count == 0 || @showallalerts %>
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index 1def50e..d286cae 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -112,7 +112,41 @@
 
   <div class="container">
 
+  <div class="span3 pull-right">
+    <br/>
+
+    <div class="well">
+<% if current_user.andand.is_active %>
+  <p>Your account status:<br/>
+    <strong>Active</strong></p>
+<% elsif current_user %>
+      <p>Your account status:<br/>
+	<strong>New / inactive</strong></p>
+      <p>
+	Your account must be activated by an Arvados administrator.  If this
+	is your first time accessing Arvados and would like to request
+	access, or you believe you are seeing the page in error, please 
+	<%= link_to "contact us", Rails.configuration.activation_contact_link %>.  
+	You should receive an email at the address you used to log in when
+	your account is activated.
+      </p>
+      <p>
+	<%= link_to raw('Contact us &#x2709;'),
+	    Rails.configuration.activation_contact_link, class: "btn btn-primary" %></p>
+<% end %>
+    </div>
+
+
+    <%= render :partial => 'notifications' %>
+  </div>
+
+<div class="container-fluid">
+  
+  <div class="span8" >
+
     <%= yield %>
+    </div>
+  </div>
 
   </div> <!-- /container -->
 
diff --git a/apps/workbench/app/views/users/_home.html.erb b/apps/workbench/app/views/users/_home.html.erb
index 9ec9d80..8e7fac2 100644
--- a/apps/workbench/app/views/users/_home.html.erb
+++ b/apps/workbench/app/views/users/_home.html.erb
@@ -1,59 +1,5 @@
-<% content_for :css do %>
-      .dash-list {
-        padding: 9px 0;
-      }
-      .dash-list>ul>li>a>span {
-      min-width: 1.5em;
-      margin-left: auto;
-      margin-right: auto;
-      }
-      .centerme {
-      margin-left: auto;
-      margin-right: auto;
-      text-align: center;
-      }
-      .bigfatnumber {
-      font-size: 4em;
-      font-weight: bold;
-      }
-      .dax {
-      max-width: 10%;
-      margin-right: 1em;
-      float: left
-      }
-      .daxalert {
-      overflow: hidden;
-      }
-<% end %>
 
 <div class="container-fluid">
-
-  <div class="span3 pull-right">
-    <br/>
-
-    <div class="well">
-<% if current_user.andand.is_active %>
-  <p>Your account status:<br/>
-    <strong>Active</strong></p>
-<% elsif current_user %>
-      <p>Your account status:<br/>
-	<strong>New / inactive</strong></p>
-      <p>
-	Your account must be activated by an Arvados administrator.  If this
-	is your first time accessing Arvados and would like to request
-	access, or you believe you are seeing the page in error, please 
-	<%= link_to "contact us", Rails.configuration.activation_contact_link %>.  
-	You should receive an email at the address you used to log in when
-	your account is activated.
-      </p>
-      <p>
-	<%= link_to raw('Contact us &#x2709;'),
-	    Rails.configuration.activation_contact_link, class: "btn btn-primary" %></p>
-<% end %>
-    </div>
-
-    <%= render :partial => 'notifications' %>
-  </div>
   
   <div class="span8">
     <%= render :partial => 'tables' %>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list