Merge branch 'master' into 3106-modal-loading-indicator
[arvados.git] / apps / workbench / app / views / projects / _choose.html.erb
1 <div class="modal modal-with-loading-spinner">
2   <div class="modal-dialog">
3     <div class="modal-content">
4
5       <div class="modal-header">
6         <button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">&times;</button>
7         <h4 class="modal-title"><%= params[:title] || 'Choose project' %></h4>
8       </div>
9
10       <div class="modal-body">
11         <div class="spinner spinner-32px spinner-h-center spinner-v-center" hidden="true"></div>
12         <div class="selectable-container" style="height: 15em; overflow-y: scroll">
13           <% [my_project_tree, shared_project_tree].each do |tree| %>
14             <% tree.each do |projectnode| %>
15               <% if projectnode[:object].is_a? String %>
16                 <div class="row" style="padding-left: <%= 1 + projectnode[:depth] %>em; margin-right: 0px">
17                   <i class="fa fa-fw fa-folder-open-o"></i>
18                   <%= projectnode[:object] %>
19                 </div>
20               <% else %>
21                 <div class="<%= 'selectable project' if !params[:editable] || projectnode[:object].editable? %> row"
22                      style="padding-left: <%= 1 + projectnode[:depth] %>em; margin-right: 0px" data-object-uuid="<%= projectnode[:object].uuid %>">
23                   <i class="fa fa-fw fa-folder-o"></i>
24                   <% if projectnode[:object].uuid == current_user.uuid %>
25                     My Projects
26                   <% else %>
27                     <%= projectnode[:object].friendly_link_name || 'New project' %>
28                   <% end %>
29                 </div>
30               <% end %>
31             <% end %>
32           <% end %>
33         </div>
34       </div>
35
36       <div class="modal-footer">
37         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button>
38         <button class="btn btn-primary" aria-hidden="true"><%= params[:action_name] || 'Select' %></button>
39         <div class="modal-error hide" style="text-align: left; margin-top: 1em;">
40         </div>
41       </div>
42     </div>
43   </div>
44 </div>