6587: minor text updates
[arvados.git] / apps / workbench / app / views / users / _manage_repositories.html.erb
index 4f22ae9cd3a4e2e47d684133b953ea06730dd4fd..b616b6d6347fe2056d1f2666bbb060cac44ffb50 100644 (file)
@@ -1,4 +1,18 @@
-<div>
+<div class="panel panel-default">
+  <div class="panel-heading">
+    <div class="pull-right">
+      <%= link_to raw('<i class="fa fa-plus"></i> Add new repository'), "#",
+                   {class: 'btn btn-xs btn-primary', 'data-toggle' => "modal",
+                    'data-target' => '#add-repository-modal'}  %>
+    </div>
+    <h4 class="panel-title">
+      <a data-parent="#arv-adv-accordion" href="#manage_repositories">
+        Repositories
+      </a>
+    </h4>
+  </div>
+
+<div id="manage_repositories" class="panel-body">
   <p>
     For more information see <%= link_to raw('Writing a pipeline'),
     "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-firstscript.html", target: "_blank"%>.
           <th> Name </th>
           <th> Read/Write </th>
           <th> URL </th>
+          <th> </th>
         </tr>
       </thead>
       <tbody>
         <% @my_repositories.andand.each do |repo| %>
+          <% writable = @repo_writable[repo.uuid] %>
           <tr>
             <td style="word-break:break-all;">
               <%= repo[:name] %>
             </td>
             <td>
-              <%= repo[:push_url] ? 'writable' : 'read-only' %>
+              <%= writable ? 'writable' : 'read-only' %>
             </td>
             <td style="word-break:break-all;">
-              <code><%= repo[:fetch_url] %></code>
+              <code><%= repo.http_fetch_url %></code><br/>
+              <code><%= writable ? repo.push_url : repo.fetch_url %></code>
+            </td>
+            <td>
+              <% if writable == 'can_manage' %>
+                <%= link_to "Share", "/repositories/#{repo[:uuid]}#Sharing" %>
+              <% end %>
             </td>
           </tr>
         <% end %>
@@ -38,3 +60,4 @@
     </table>
   <% end %>
 </div>
+</div>