Add breadcrumbs bar to #index and #show pages.
[arvados.git] / apps / workbench / app / views / users / _notifications.html.erb
1 <% if current_user.andand.is_active %>
2
3 <% if @my_ssh_keys.count == 0 || @showallalerts %>
4   <div class="alert alert-info daxalert">
5     <button type="button" class="close" data-dismiss="alert">&times;</button>
6     <%= image_tag "dax.png", class: "dax" %>
7     <div>
8       Hi, I noticed that you have not yet set up an SSH public key for use with Arvados.  
9       <%= link_to "Click here to learn about SSH keys in Arvados.",
10           "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access.html", 
11           style: "font-weight: bold",
12           target: "_blank" %>
13       When you have an SSH key you would like to use, paste the SSH public key
14       in the text box.
15     </div>
16     <%= form_for AuthorizedKey.new, remote: true do |f| %>
17       <div class="row-fluid">
18         <div class="span12">
19           <%= hidden_field_tag :return_to, request.original_url %>
20           <%= hidden_field_tag :disable_element, 'input[type=submit]' %>
21           <%= f.text_area :public_key, rows: 4, placeholder: "Paste your public key here", style: "width: 100%" %>
22         </div>
23       </div>
24       <div class="row-fluid">
25         <div class="span4 offset8">
26           <%= f.submit :Save, value: raw("&check;"), class: "btn btn-primary pull-right", style: "width: 100%" %>
27         </div>
28       </div>
29     <% end %>
30   </div>
31 <% end %>
32
33 <% if @my_collections.count == 0 || @showallalerts %>
34 <div class="alert alert-info daxalert">
35   <button type="button" class="close" data-dismiss="alert">&times;</button>
36   <%= image_tag "dax.png", class: "dax" %>
37   <p>
38     Hi, I noticed you haven't uploaded a new collection yet. 
39     <%= link_to "Click here to learn how to upload data to Arvados Keep.", 
40         "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-keep.html", 
41         style: "font-weight: bold", target: "_blank" %>
42   </p>
43 </div>
44
45 <% end %>
46
47 <% if @my_jobs.count == 0 || @showallalerts %>
48 <div class="alert alert-info daxalert">
49   <button type="button" class="close" data-dismiss="alert">&times;</button>  
50   <p><%= image_tag "dax.png", class: "dax" %>
51     Hi, I noticed you haven't run a job yet. 
52     <%= link_to "Click here to learn how to run an Arvados Crunch job.", 
53         "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-job1.html", 
54         style: "font-weight: bold",
55         target: "_blank" %>
56   </p>
57 </div>
58 <% end %>
59
60 <% if @my_pipelines.count == 0 || @showallalerts %>
61 <div class="alert alert-info daxalert">
62   <button type="button" class="close" data-dismiss="alert">&times;</button>
63   <p><%= image_tag "dax.png", class: "dax" %>
64     Hi, I noticed you haven't run a pipeline yet.  
65     <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.", 
66         "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-new-pipeline.html", 
67         style: "font-weight: bold",
68         target: "_blank" %>
69   </p>
70 </div>
71 <% end %>
72
73 <% end %>
74
75 <div class="well">
76   <p><strong>Useful links</strong></p>
77   <p><ul>
78       <li><%= link_to "Arvados project page", "http://arvados.org", target: "_blank" %></li>
79       <li><%= link_to "Tutorials and user guide",
80       "#{Rails.configuration.arvados_docsite}/user/", target: "_blank" %></li>
81     </ul>
82   </p>
83 </div>
84
85 <% if current_user.andand.is_active %>
86 <div class="well">
87   <p><strong>System status</strong></p>
88     <table>
89       <% [Human, Trait, Collection, PipelineTemplate,
90           PipelineInstance].each do |aclass| %>
91         <tr>
92           <td>
93             <span style="margin-right: 2em">
94               <a href="/<%= raw(aclass.to_s.pluralize.underscore) %>">
95                 <%= raw(aclass.to_s.pluralize.underscore.capitalize.gsub '_', '&nbsp;') %>
96               </a>
97             </span>
98           </td>
99           <td>
100             <%= aclass.limit(0).where({}).items_available ||
101                 aclass.limit(4000).where({}).count %>
102           </td>
103         </tr>
104       <% end %>
105     </table>
106 </div>
107 <% end %>