[ARVADOS] updated: 15303f9cf99f00ccdef948e5ce593d9a3a88d21a
git at public.curoverse.com
git at public.curoverse.com
Mon Mar 30 21:52:48 EDT 2015
Summary of changes:
.../views/application/_getting_started_popup.html.erb | 12 +-----------
.../views/application/_getting_started_shown.html.erb | 9 +++++++++
.../app/views/application/getting_started_popup.js.erb | 2 --
apps/workbench/app/views/layouts/body.html.erb | 16 +++++++---------
apps/workbench/config/routes.rb | 1 -
.../test/integration/application_layout_test.rb | 4 ++--
6 files changed, 19 insertions(+), 25 deletions(-)
create mode 100644 apps/workbench/app/views/application/_getting_started_shown.html.erb
delete mode 100644 apps/workbench/app/views/application/getting_started_popup.js.erb
via 15303f9cf99f00ccdef948e5ce593d9a3a88d21a (commit)
from 7a54e370484b9adb7479fde69665d4adcbb7331f (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 15303f9cf99f00ccdef948e5ce593d9a3a88d21a
Author: Radhika Chippada <radhika at curoverse.com>
Date: Mon Mar 30 21:51:38 2015 -0400
5493: getting_started modal is served from layout html
diff --git a/apps/workbench/app/views/application/_getting_started_popup.html.erb b/apps/workbench/app/views/application/_getting_started_popup.html.erb
index be20362..3575202 100644
--- a/apps/workbench/app/views/application/_getting_started_popup.html.erb
+++ b/apps/workbench/app/views/application/_getting_started_popup.html.erb
@@ -1,14 +1,4 @@
-<%
- if current_user
- prefs = current_user.prefs
- if !prefs[:getting_started_shown]
- prefs[:getting_started_shown] = Time.now
- current_user.update_attributes prefs: prefs.to_json
- end
- end
-%>
-
-<div class="modal">
+<div id="getting-started-modal-window" class="modal">
<div class="modal-dialog modal-with-loading-spinner">
<div class="modal-content">
<div class="modal-header">
diff --git a/apps/workbench/app/views/application/_getting_started_shown.html.erb b/apps/workbench/app/views/application/_getting_started_shown.html.erb
new file mode 100644
index 0000000..bbf2314
--- /dev/null
+++ b/apps/workbench/app/views/application/_getting_started_shown.html.erb
@@ -0,0 +1,9 @@
+<%
+ if current_user
+ prefs = current_user.prefs
+ if !prefs[:getting_started_shown]
+ prefs[:getting_started_shown] = Time.now
+ current_user.update_attributes prefs: prefs.to_json
+ end
+ end
+%>
diff --git a/apps/workbench/app/views/application/getting_started_popup.js.erb b/apps/workbench/app/views/application/getting_started_popup.js.erb
deleted file mode 100644
index d9c4fa8..0000000
--- a/apps/workbench/app/views/application/getting_started_popup.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#getting-started-modal-window").html("<%= escape_javascript(render partial: 'getting_started_popup') %>");
-$("#getting-started-modal-window .modal").modal('show');
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 526513d..8550535 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -118,13 +118,12 @@
<span class="fa fa-lg fa-question-circle"></span>
</a>
<ul class="dropdown-menu">
- <li> <%= link_to getting_started_popup_path(),
- {class: 'getting-started-modal-window', remote: true, return_to: request.url} do %>
- <i class="fa fa-fw fa-info"></i> Getting Started ...
- <% end %>
+ <li>
+ <%= link_to raw('<i class="fa fa-fw fa-info"></i> Getting Started ...'), "#",
+ {'data-toggle' => "modal", 'data-target' => '#getting-started-modal-window'} %>
</li>
<% if Rails.configuration.arvados_public_data_doc_url %>
- <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Public Pipelines and Datasets'), "#{Rails.configuration.arvados_public_data_doc_url}", target: "_blank" %></li>
+ <li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Public Pipelines and Data sets'), "#{Rails.configuration.arvados_public_data_doc_url}", target: "_blank" %></li>
<% end %>
<li><%= link_to raw('<i class="fa fa-book fa-fw"></i> Tutorials and User guide'), "#{Rails.configuration.arvados_docsite}/user", target: "_blank" %></li>
<li><%= link_to raw('<i class="fa fa-book fa-fw"></i> API Reference'), "#{Rails.configuration.arvados_docsite}/api", target: "_blank" %></li>
@@ -199,6 +198,7 @@
<% end %>
<%= render partial: 'browser_unsupported' %><%# requires JS support below %>
+ <%= render partial: 'getting_started_popup' %><%# requires JS support below %>
<div id="page-wrapper">
<%= yield %>
@@ -211,14 +211,12 @@
<div id="report-issue-modal-window"></div>
<script src="/browser_unsupported.js"></script>
-<div id="getting-started-modal-window"></div>
-
<% if current_user and !current_user.prefs[:getting_started_shown] and
!request.url.include?("/profile") and
!request.url.include?("/user_agreements") and
!request.url.include?("/inactive")%>
<script>
- $("#getting-started-modal-window").html("<%= escape_javascript(render partial: 'getting_started_popup') %>");
- $("#getting-started-modal-window .modal").modal('show');
+ $("#getting-started-modal-window").modal('show');
</script>
+ <%= render partial: 'getting_started_shown' %>
<% end %>
diff --git a/apps/workbench/config/routes.rb b/apps/workbench/config/routes.rb
index 2e152c7..7ed02e7 100644
--- a/apps/workbench/config/routes.rb
+++ b/apps/workbench/config/routes.rb
@@ -12,7 +12,6 @@ ArvadosWorkbench::Application.routes.draw do
get "users/setup" => 'users#setup', :as => :setup_user
get "report_issue_popup" => 'actions#report_issue_popup', :as => :report_issue_popup
post "report_issue" => 'actions#report_issue', :as => :report_issue
- get "getting_started_popup" => 'actions#getting_started_popup', :as => :getting_started_popup
resources :nodes
resources :humans
resources :traits
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index fe0c012..b85977f 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -70,7 +70,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
page.find("#arv-help").click
within('.dropdown-menu') do
assert_selector 'a', text:'Getting Started ...'
- assert_selector 'a', text:'Public Pipelines and Datasets'
+ assert_selector 'a', text:'Public Pipelines and Data sets'
assert page.has_link?('Tutorials and User guide'), 'No link - Tutorials and User guide'
assert page.has_link?('API Reference'), 'No link - API Reference'
assert page.has_link?('SDK Reference'), 'No link - SDK Reference'
@@ -172,7 +172,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
within '.navbar-fixed-top' do
find('.help-menu > a').click
- assert_no_selector 'a', text:'Public Pipelines and Datasets'
+ assert_no_selector 'a', text:'Public Pipelines and Data sets'
assert_selector 'a', text:'Getting Started ...'
assert page.has_link?('Tutorials and User guide'), 'No link - Tutorials and User guide'
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list