11065: Merge branch 'master' into 11065-rotate-logs
[arvados.git] / apps / workbench / app / views / users / _add_repository_modal.html.erb
1 <%
2    if current_user.uuid.ends_with?("-000000000000000")
3      repo_prefix = ""
4    else
5      repo_prefix = current_user.username + "/"
6    end
7 -%>
8 <div class="modal" id="add-repository-modal" tabindex="-1" role="dialog" aria-labelledby="add-repository-label" aria-hidden="true">
9   <div class="modal-dialog">
10     <div class="modal-content">
11       <form id="add-repository-form">
12         <input type="hidden" id="add_repo_owner_uuid" name="add_repo_owner_uuid" value="<%= current_user.uuid %>">
13         <input type="hidden" id="add_repo_prefix" name="add_repo_prefix" value="<%= repo_prefix %>">
14         <div class="modal-header">
15           <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
16           <h4 class="modal-title" id="add-repository-label">Add new repository</h4>
17         </div>
18         <div class="modal-body form-horizontal">
19           <div class="form-group">
20             <label for="add_repo_basename" class="col-sm-2 control-label">Name</label>
21             <div class="col-sm-10">
22               <div class="input-group arvados-uuid">
23                 <% unless repo_prefix.empty? %>
24                   <span class="input-group-addon"><%= repo_prefix %></span>
25                 <% end %>
26                 <input type="text" class="form-control" id="add_repo_basename" name="add_repo_basename">
27                 <span class="input-group-addon">.git</span>
28               </div>
29             </div>
30           </div>
31           <p class="alert alert-info">It may take a minute or two before you can clone your new repository.</p>
32           <p id="add-repository-error" class="alert alert-danger"></p>
33         </div>
34         <div class="modal-footer">
35           <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
36           <input type="submit" class="btn btn-primary" id="add-repository-submit" name="submit" value="Create">
37         </div>
38       </form>
39     </div>
40   </div>
41 </div>