2659: show tab buttons, selection actions etc only when the current_user is_active...
[arvados.git] / apps / workbench / app / views / users / _manage_repositories.html.erb
index 281909f42cf2fe9a06b76ac79f7e640c227809de..83ec30a8146f9311a03f817568ccd46f14d05075 100644 (file)
@@ -5,7 +5,7 @@
   </p>
 
   <% if !@my_repositories.any? %>
-    You do not seem to have access to any repositories. If you would like to request access, please contact your system admin at <b><%= "#{Rails.configuration.activation_contact_link}".split(':')[-1] %></b>
+    You do not seem to have access to any repositories. If you would like to request access, please contact your system admin.
   <% else %>
     <table class="table repositories-table">
       <colgroup>
           <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><%= 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 %>