Merge branch 'master' into 3686-sharing-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         </tr>
22       </thead>
23       <tbody>
24         <% @my_repositories.andand.each do |repo| %>
25           <% writable = @repo_writable[repo.uuid] %>
26           <tr>
27             <td style="word-break:break-all;">
28               <% if writable == 'can_manage' %>
29                 <%= link_to raw("#{repo[:name]}"), "/repositories/#{repo[:uuid]}" %>
30               <% else %>
31                 <%= repo[:name] %>
32               <% end %>
33             </td>
34             <td>
35               <%= writable ? 'writable' : 'read-only' %>
36             </td>
37             <td style="word-break:break-all;">
38               <code><%= writable ? repo[:push_url] : repo[:fetch_url] %></code>
39             </td>
40           </tr>
41         <% end %>
42       </tbody>
43     </table>
44   <% end %>
45 </div>