1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <div class="modal modal-with-loading-spinner">
6 <div class="modal-dialog">
7 <div class="modal-content">
9 <div class="modal-header">
10 <button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">×</button>
12 <div class="col-sm-6"> <h4 class="modal-title"><%= params[:title] || 'Choose project' %></h4> </div>
13 <div class="spinner spinner-32px spinner-h-center col-sm-1" hidden="true"></div>
18 <div class="modal-body">
19 <div class="selectable-container" style="height: 15em; overflow-y: scroll">
20 <% starred_projects = my_starred_projects current_user, 'project' %>
21 <% if starred_projects.andand.any? %>
22 <% writable_projects = starred_projects.select(&:editable?) %>
23 <% writable_projects.each do |projectnode| %>
24 <% row_name = projectnode.friendly_link_name || 'New project' %>
25 <div class="selectable project row"
26 style="padding-left: 1em; margin-right: 0px"
27 data-object-uuid="<%= projectnode.uuid %>">
28 <i class="fa fa-fw fa-folder-o"></i> <%= row_name %> <i class="fa fa-fw fa-star"></i>
33 <% my_projects = my_wanted_projects_tree(current_user) %>
34 <% my_projects[0].each do |projectnode| %>
35 <% if projectnode[:object].uuid == current_user.uuid
38 row_name = projectnode[:object].friendly_link_name || 'New project'
40 <div class="selectable project row"
41 style="padding-left: <%= 1 + projectnode[:depth] %>em; margin-right: 0px"
42 data-object-uuid="<%= projectnode[:object].uuid %>">
43 <i class="fa fa-fw fa-folder-o"></i> <%= row_name %>
48 <% if my_projects[1] or my_projects[2] or my_projects[0].size > 200 %>
49 <div>Some of your projects are omitted. Add projects of interest to favorites.</div>
53 <div class="modal-footer">
54 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button>
55 <button class="btn btn-primary" aria-hidden="true" data-enable-if-selection disabled><%= params[:action_name] || 'Select' %></button>
56 <div class="modal-error hide" style="text-align: left; margin-top: 1em;">