X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7a5a843993ad8502bfe1a290d0b0a5f3d9692bf3..4c8559157a16bf3d2781714fdec0275fb7f53ac6:/apps/workbench/app/views/users/profile.html.erb diff --git a/apps/workbench/app/views/users/profile.html.erb b/apps/workbench/app/views/users/profile.html.erb index 193c8b5115..af7a71dc72 100644 --- a/apps/workbench/app/views/users/profile.html.erb +++ b/apps/workbench/app/views/users/profile.html.erb @@ -2,6 +2,8 @@ profile_config = Rails.configuration.user_profile_form_fields current_user_profile = current_user.prefs[:profile] show_save_button = false + + profile_message = Rails.configuration.user_profile_form_message %>
@@ -12,41 +14,44 @@
-
- <% profile_message = 'You can manage your profile using this page. Any feilds in red are required and missing. - Please fill in those fields before you can accesse Arvados Workbench.' - profile_config.kind_of?(Array) && profile_config.andand.each do |entry| - if entry['message'] - profile_message = entry['message'] - break - end - end %> -

<%=profile_message%>


-
-
- <%= form_tag "/users/#{current_user.uuid}", {method: 'patch', id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal'} do %> - <%= hidden_field_tag :return_to, request.url %> + <% if !missing_required_profile? && params[:offer_return_to] %> +
+ <% if current_user.prefs[:getting_started_shown] %> +

Thank you for filling in your profile. <%= link_to 'Back to work!', params[:offer_return_to], class: 'btn btn-sm btn-primary' %>

+ <% else %> +

Thank you for filling in your profile. <%= link_to 'Get started', params[:offer_return_to], class: 'btn btn-sm btn-primary' %>

+ <% end %> +
+ <% else %> +
+

<%=raw(profile_message)%>

+
+ <% end %> + + <%= form_for current_user, html: {id: 'save_profile_form', name: 'save_profile_form', class: 'form-horizontal'} do %> + <%= hidden_field_tag :offer_return_to, params[:offer_return_to] %> + <%= hidden_field_tag :return_to, profile_user_path(current_user.uuid, offer_return_to: params[:offer_return_to]) %>
- -
+ +

<%=current_user.email%>

- -
+ +

<%=current_user.first_name%>

- -
+ +

<%=current_user.last_name%>

-
+

<%=current_user.andand.identity_url%>

@@ -62,34 +67,40 @@
<% if entry['type'] == 'select' %> -
- <% entry['options'].each do |option| %> <% end %>
<% else %> -
- +
+
<% end %>
<% end %> <% end %> + <%# If the user has other prefs, we need to preserve them %> + <% current_user.prefs.each do |key, value| %> + <% if key != :profile %> + + <% end %> + <% end %> + <% if show_save_button %>
-
+
<% end %> <% end %> -