9767: need to parse the json string of the workflow yaml
[arvados.git] / apps / workbench / app / views / users / _repositories.html.erb
1 <div class="panel panel-default">
2   <div class="panel-heading">
3     <div class="pull-right">
4       <%= link_to raw('<i class="fa fa-plus"></i> Add new repository'), "#",
5                    {class: 'btn btn-xs btn-primary', 'data-toggle' => "modal",
6                     'data-target' => '#add-repository-modal'}  %>
7     </div>
8     <h4 class="panel-title">
9       <%= link_to repositories_user_path(current_user) do%>
10         Repositories
11       <%end%>
12     </h4>
13   </div>
14
15 <div id="manage_repositories" class="panel-body">
16   <p>
17     For more information see <%= link_to raw('Writing a pipeline'),
18     "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-firstscript.html", target: "_blank"%>.
19   </p>
20
21   <% if !@my_repositories.any? %>
22     You do not seem to have access to any repositories. If you would like to request access, please contact your system admin.
23   <% else %>
24     <table class="table repositories-table">
25       <colgroup>
26         <col style="width: 30%" />
27         <col style="width: 10%" />
28         <col style="width: 60%" />
29       </colgroup>
30       <thead>
31         <tr>
32           <th> Name </th>
33           <th> Read/Write </th>
34           <th> URL </th>
35           <th> </th>
36         </tr>
37       </thead>
38       <tbody>
39         <% @my_repositories.andand.each do |repo| %>
40           <% writable = @repo_writable[repo.uuid] %>
41           <tr>
42             <td style="word-break:break-all;">
43               <%= repo[:name] %>
44             </td>
45             <td>
46               <%= writable ? 'writable' : 'read-only' %>
47             </td>
48             <td style="word-break:break-all;">
49               <code><%= repo.http_fetch_url %></code><br/>
50               <code><%= writable ? repo.push_url : repo.fetch_url %></code>
51             </td>
52             <td>
53               <% if writable == 'can_manage' %>
54                 <%= link_to "Share", "/repositories/#{repo[:uuid]}#Sharing" %>
55               <% end %>
56             </td>
57           </tr>
58         <% end %>
59       </tbody>
60     </table>
61   <% end %>
62 </div>
63 </div>
64   <p>When you are using an Arvados virtual machine, you should clone the https:// URLs. This will authenticate automatically using your API token.</p>
65   <p>In order to clone git repositories using SSH, <%= link_to ssh_keys_user_path(current_user) do%> add an SSH key to your account<%end%> and clone the git@ URLs.</p>