diff --git a/app/assets/javascripts/projects/introdutory_popup.js b/app/assets/javascripts/projects/introdutory_popup.js new file mode 100644 index 000000000..052bb71f4 --- /dev/null +++ b/app/assets/javascripts/projects/introdutory_popup.js @@ -0,0 +1,10 @@ +(function(){ + // display introductory modal + if( Cookies.get('popup-already-shown') !== 'yes'){ + $("#introductory-popup-modal").modal('show',{ + backdrop: true, + keyboard: false, + }); + Cookies.set('popup-already-shown', 'yes'); + } +})(); diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 7a42ba1b0..4c2eec669 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -130,6 +130,10 @@ <% end %> +<% if current_user.created_at < Time.new(2016, 8, 25) %> + <%= render partial: 'projects/index/introductory_popup' %> + <%= javascript_include_tag "projects/introdutory_popup"%> +<% end %> <% if @projects_by_orgs.length > 0 %> <% @projects_by_orgs.each do |org, projects| %> <%= render partial: "projects/index/org_projects", locals: {org: org, projects: projects} %> diff --git a/app/views/projects/index/_introductory_popup.html.erb b/app/views/projects/index/_introductory_popup.html.erb new file mode 100644 index 000000000..d42dc7744 --- /dev/null +++ b/app/views/projects/index/_introductory_popup.html.erb @@ -0,0 +1,17 @@ + +