mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Merge pull request #102 from ZmagoD/zd_SCI_336
implement first time popup logic
This commit is contained in:
commit
0cfc758f43
8 changed files with 49 additions and 0 deletions
10
app/assets/javascripts/projects/introdutory_popup.js
Normal file
10
app/assets/javascripts/projects/introdutory_popup.js
Normal file
|
@ -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');
|
||||
}
|
||||
})();
|
|
@ -130,6 +130,10 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if current_user.confirmed_at < Time.new(2016, 8, 31) %>
|
||||
<%= 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} %>
|
||||
|
|
25
app/views/projects/index/_introductory_popup.html.erb
Normal file
25
app/views/projects/index/_introductory_popup.html.erb
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!-- introductory popup modal -->
|
||||
<div class="modal" id="introductory-popup-modal" tabindex="-1" role="dialog" aria-labelledby="introductory-modal-label">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="introductory-modal-label"><%=t 'introductory.popup-title' %></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><%= t('introductory.sentence_one_html') %></p>
|
||||
<%= image_tag 'introductory_popup/image2.png', class: 'img-responsive' %>
|
||||
<p><%=t 'introductory.sentence_two_html' %></p>
|
||||
<%= image_tag 'introductory_popup/image1.jpg', class: 'img-responsive' %>
|
||||
<p><%=t 'introductory.sentence_three_html' %></p>
|
||||
<p><%=t 'introductory.sentence_four_html' %></p>
|
||||
<p><%=t 'introductory.sentence_five_html' %></p>
|
||||
<p><%=t 'introductory.sentence_six_html' %></p>
|
||||
<%= image_tag 'introductory_popup/image3.png', class: 'img-responsive' %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t 'introductory.confim' %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -58,3 +58,4 @@ Rails.application.config.assets.precompile += %w( jszip.min.js )
|
|||
Rails.application.config.assets.precompile += %w( assets.js )
|
||||
Rails.application.config.assets.precompile += %w( comments.js )
|
||||
Rails.application.config.assets.precompile += %w( projects/show.js )
|
||||
Rails.application.config.assets.precompile += %w( projects/introdutory_popup.js )
|
||||
|
|
|
@ -1500,6 +1500,15 @@ en:
|
|||
new_report_click_org_html: "Click on <strong>%{private_org}</strong> in breadcrumbs to return to the Dashboard."
|
||||
archive_project_html: "Archive demo project by clicking on the down arrow <span class='glyphicon glyphicon-triangle-bottom'></span>. You can always access the archive by clicking the <span class='glyphicon glyphicon-briefcase'></span> button on the top right side of the dashboard and restore any item you have archived."
|
||||
|
||||
introductory:
|
||||
popup-title: "Dear sciNote user,"
|
||||
sentence_one_html: "To give you more flexibility in organization of your work, we have added a new feature to your sciNote: <strong>Experiment level</strong>. Now you are able to organize your Tasks and Workflows into different Experiments inside of an individual project. When you open a project you will see experiments displayed as thumbnails."
|
||||
sentence_two_html: "You can see the changes in the hierarchy in the navigation panel as well."
|
||||
sentence_three_html: "All your existing Tasks and Workflows are now in a single Experiment called \"My first experiment\". You can always rename it, create new Experiments and move workflows between them. To move a Task or a Workflow to a different experiment, do the following:"
|
||||
sentence_four_html: "1. Open experiment that contains a workflow you would like to move and click Edit experiment."
|
||||
sentence_five_html: "2. In the Options dropdown of any task select Move workflow to another experiment."
|
||||
sentence_six_html: "3. Select experiment from the dropdown and click Move workflow. The workflow is now part of the selected experiment. So you can still have multiple workflows in one experiment."
|
||||
confim: "OK, got it"
|
||||
# This section contains general words that can be used in any parts of
|
||||
# application.
|
||||
|
||||
|
|
BIN
public/images/introductory_popup/image1.jpg
Normal file
BIN
public/images/introductory_popup/image1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
BIN
public/images/introductory_popup/image2.png
Normal file
BIN
public/images/introductory_popup/image2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
BIN
public/images/introductory_popup/image3.png
Normal file
BIN
public/images/introductory_popup/image3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in a new issue