4253: Users can manage their own repositories.
[arvados.git] / apps / workbench / app / views / users / _manage_repositories.html.erb
1 <div>
2   <p>
3     For more information see <%= link_to raw('Writing a pipeline'),
4     "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-firstscript.html", target: "_blank"%>.
5   </p>
6
7   <% if !@my_repositories.any? %>
8     You do not seem to have access to any repositories. If you would like to request access, please contact your system admin.
9   <% else %>
10     <table class="table repositories-table">
11       <colgroup>
12         <col style="width: 30%" />
13         <col style="width: 10%" />
14         <col style="width: 60%" />
15       </colgroup>
16       <thead>
17         <tr>
18           <th> Name </th>
19           <th> Read/Write </th>
20           <th> URL </th>
21           <th> </th>
22         </tr>
23       </thead>
24       <tbody>
25         <% @my_repositories.andand.each do |repo| %>
26           <% writable = @repo_writable[repo.uuid] %>
27           <tr>
28             <td style="word-break:break-all;">
29               <%= repo[:name] %>
30             </td>
31             <td>
32               <%= writable ? 'writable' : 'read-only' %>
33             </td>
34             <td style="word-break:break-all;">
35               <code><%= writable ? repo.push_url : repo.fetch_url %></code>
36             </td>
37             <td>
38               <% if writable == 'can_manage' %>
39                 <%= link_to "Share", "/repositories/#{repo[:uuid]}#Sharing" %>
40               <% end %>
41             </td>
42           </tr>
43         <% end %>
44       </tbody>
45     </table>
46   <% end %>
47 </div>