[ARVADOS] updated: 692f03def1a915a8e76dc44c480be9d6716887fb

git at public.curoverse.com git at public.curoverse.com
Tue Aug 5 11:03:03 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/application_controller.rb | 8 ++++----
 apps/workbench/app/controllers/users_controller.rb       | 4 ++--
 apps/workbench/app/views/users/_profile.html.erb         | 7 +++----
 apps/workbench/config/application.default.yml            | 2 +-
 4 files changed, 10 insertions(+), 11 deletions(-)

       via  692f03def1a915a8e76dc44c480be9d6716887fb (commit)
      from  91d83dc26c64bb0eff00e1c73e284a2dacafc840 (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 692f03def1a915a8e76dc44c480be9d6716887fb
Author: radhika <radhika at curoverse.com>
Date:   Tue Aug 5 10:47:38 2014 -0400

    3296: tests passing and addressed trailing white spaces

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index b3d4768..4b79cb4 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -512,13 +512,14 @@ class ApplicationController < ActionController::Base
   end
 
   def check_user_profile
-    @profile_config = Rails.configuration.user_profile_form_fields    
-    user_prefs = User.limit(1).where(uuid: current_user.uuid).first.prefs
-    @current_user_profile = user_prefs[:profile] if user_prefs
+    @profile_config = Rails.configuration.user_profile_form_fields
 
     if current_user && @profile_config
       missing_required_profile = false
 
+      user_prefs = User.limit(1).where(uuid: current_user.uuid).first.prefs
+      @current_user_profile = user_prefs[:profile] if user_prefs
+
       @profile_config.andand.each do |entry|
         if entry['required']
           if !@current_user_profile || !@current_user_profile[entry['key'].to_sym]
@@ -529,7 +530,6 @@ class ApplicationController < ActionController::Base
       end
 
       if missing_required_profile
-        #redirect_to_profile
         render 'users/profile'
       end
     end
diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index a880adc..ffa6fe3 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -278,7 +278,7 @@ class UsersController < ApplicationController
   end
 
   def manage_profile
-    @profile_config = Rails.configuration.user_profile_form_fields    
+    @profile_config = Rails.configuration.user_profile_form_fields
     user_prefs = User.limit(1).where(uuid: current_user.uuid).first.prefs
     @current_user_profile = user_prefs[:profile] if user_prefs
 
@@ -293,7 +293,7 @@ class UsersController < ApplicationController
     @current_user_profile ||= {}
 
     profile_keys = []
-    @profile_config = Rails.configuration.user_profile_form_fields    
+    @profile_config = Rails.configuration.user_profile_form_fields
     @profile_config.andand.each do |entry|
       profile_keys << entry['key']
     end
diff --git a/apps/workbench/app/views/users/_profile.html.erb b/apps/workbench/app/views/users/_profile.html.erb
index 33e0292..9946914 100644
--- a/apps/workbench/app/views/users/_profile.html.erb
+++ b/apps/workbench/app/views/users/_profile.html.erb
@@ -7,14 +7,14 @@
         </div>
         <div class="panel-body">
           <div>
-            <p>You can manage your profile using this page. 
-               Any feilds in <font style="color:red">red</font> are required and missing. 
+            <p>You can manage your profile using this page.
+               Any feilds in <font style="color:red">red</font> are required and missing.
                Please fill in those fields before you can accesse Arvados Workbench.</p><br/>
           </div>
           <div>
             <%= form_tag update_profile_path, {method: 'get', id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal', remote: true} do %>
             <% @profile_config.andand.each do |entry| %>
-              <% 
+              <%
                   label = entry['required'] ? '* ' : ''
                   label += entry['form_field_title']
                   value = @current_user_profile[entry['key'].to_sym] if @current_user_profile
@@ -51,4 +51,3 @@
         </div>
       </div>
 </div>
-
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 5c6d6f1..c4de7dd 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -83,7 +83,7 @@ common:
   # This sample configures two fields as represented by the attribute "key".
   # You can specify "type" as "text" or "select".
   # Specify "options" when using the type "select".
-  # Set "required" as "true" for any of the fields to make them required. 
+  # Set "required" as "true" for any of the fields to make them required.
   # If any of the required fields are missing in the user's profile, the user will be
   # redirected to the "/profile" page before they can access any Workbench features.
   #user_profile_form_fields:

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list