_repositories.html.erb
41 lines
| 1.4 KiB
| text/plain
|
TextLexer
|
r8530 | <% if @project.repositories.any? %> | ||
|
r8528 | <table class="list"> | ||
<thead> | ||||
|
r8586 | <tr> | ||
|
r8528 | <th><%= l(:label_scm) %></th> | ||
|
r8530 | <th><%= l(:field_identifier) %></th> | ||
<th><%= l(:field_repository_is_default) %></th> | ||||
|
r8528 | <th><%= l(:label_repository) %></th> | ||
<th></th> | ||||
</tr> | ||||
|
r8586 | </thead> | ||
|
r8528 | <tbody> | ||
|
r8549 | <% @project.repositories.sort.each do |repository| %> | ||
|
r8586 | <tr class="<%= cycle 'odd', 'even' %>"> | ||
<td><%=h repository.scm_name %></td> | ||||
|
r8530 | <td><%=h repository.identifier %></td> | ||
<td align="center"><%= checked_image repository.is_default? %></td> | ||||
|
r8586 | <td><%=h repository.url %></td> | ||
<td class="buttons"> | ||||
<% if User.current.allowed_to?(:manage_repository, @project) %> | ||||
<%= link_to(l(:label_user_plural), committers_repository_path(repository), | ||||
|
r8528 | :class => 'icon icon-user') %> | ||
<%= link_to(l(:button_edit), edit_repository_path(repository), | ||||
:class => 'icon icon-edit') %> | ||||
<%= link_to(l(:button_delete), repository_path(repository), | ||||
:confirm => l(:text_are_you_sure), | ||||
:method => :delete, | ||||
:class => 'icon icon-del') %> | ||||
|
r8586 | <% end %> | ||
</td> | ||||
</tr> | ||||
|
r8530 | <% end %> | ||
|
r8528 | </tbody> | ||
</table> | ||||
<% else %> | ||||
<p class="nodata"><%= l(:label_no_data) %></p> | ||||
<% end %> | ||||
|
r8530 | <% if User.current.allowed_to?(:manage_repository, @project) %> | ||
|
r8528 | <p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p> | ||
<% end %> | ||||