Merge branch 'master' into 3141-keep-logging-improvements
[arvados.git] / apps / workbench / app / views / projects / _choose.html.erb
1 <div class="modal">
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="selectable-container" style="height: 15em; overflow-y: scroll">
12           <% [my_project_tree, shared_project_tree].each do |tree| %>
13             <% tree.each do |projectnode| %>
14               <% if projectnode[:object].is_a? String %>
15                 <div class="row" style="padding-left: <%= 1 + projectnode[:depth] %>em; margin-right: 0px">
16                   <i class="fa fa-fw fa-folder-open-o"></i>
17                   <%= projectnode[:object] %>
18                 </div>
19               <% else %>
20                 <div class="<%= 'selectable project' if !params[:editable] || projectnode[:object].editable? %> row"
21                      style="padding-left: <%= 1 + projectnode[:depth] %>em; margin-right: 0px" data-object-uuid="<%= projectnode[:object].uuid %>">
22                   <i class="fa fa-fw fa-folder-o"></i>
23                   <% if projectnode[:object].uuid == current_user.uuid %>
24                     My Projects
25                   <% else %>
26                     <%= projectnode[:object].friendly_link_name || 'New project' %>
27                   <% end %>
28                 </div>
29               <% end %>
30             <% end %>
31           <% end %>
32         </div>
33       </div>
34
35       <div class="modal-footer">
36         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button>
37         <button class="btn btn-primary" aria-hidden="true"><%= params[:action_name] || 'Select' %></button>
38         <div class="modal-error hide" style="text-align: left; margin-top: 1em;">
39         </div>
40       </div>
41     </div>
42   </div>
43 </div>